[PATCH] D24376: [XRay] Implement `llvm-xray convert` -- trace file conversion

Dean Michael Berris via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 31 20:58:17 PDT 2016


dberris planned changes to this revision.
dberris added a comment.

In https://reviews.llvm.org/D24376#581421, @dblaikie wrote:

> Before I get into all the details - this seems similar to the extract tool, except it deals with the log rather than the instrumentation map, right?
>
> So pretty much all the same feedback as there (& I don't necessarily remember the original answers). We ended up with a one way conversion last time (to yaml, but not back again), should this one be different? If we only convert one way, is 'convert' the right name? Should be be more explicit about the difference between these two things, or just detect based on file magic & use one command name for both kinds of input files? (check if it's an ELF file then assume the user is trying to extract an instrumentation map, and otherwise assume the file's a log?)


The value of having a convert function is so that we can support other formats specifically for the xray log. Here are some future things we need to support:

- Convert from an old version of the log into a newer version.
- Convert from the XRay log format to another format. One of them is the Chrome Trace Viewer format, something that the Google Performance Tools (https://github.com/gperftools/gperftools) can consume, etc.

For now, the most convenient thing we can do is create YAML files. The important part here is the log file loading library, that we use in the accounting implementation (stacked on top of this change).

So the verb really is to "convert", as opposed to just "extract".

Does this make sense?

That said, I'll apply most of the changes in the 'extract' review here.

Cheers


https://reviews.llvm.org/D24376





More information about the llvm-commits mailing list