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

Dean Michael Berris via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 4 22:41:57 PST 2017


dberris added a comment.

In https://reviews.llvm.org/D24376#634790, @echristo wrote:

> I think that the format reading should definitely be a part of the llvm library and not the tool in particular. The tool should just wrap the library.


Cool, thanks Eric -- https://reviews.llvm.org/D28345 does just the log reading library which depends on this change landing.

>> So the compromise/trade-off being made here is that we localize the knowledge of dealing with the different XRay binary log formats to this tool, that can turn it into "the simplest XRay log format", that can be read by simpler libraries for consumption. Given that, and the plan of being able to convert these XRay log files into other non-XRay specific formats (Chrome trace viewer format which is JSON, or the perftools utilities, etc.) is a huge convenience. This convenience is not only for testing purposes but also for building and integrating with other existing tools that deal with all sorts of traces.
>> 
>> Does this make sense?
> 
> Being able to convert seems useful in general. You want to be able to write testcases in something human readable, but you want the default output to be binary for compactness.

Good point. So I think "conversion" is a bit more loaded than just "dump", where "dump" really just makes the representation more human-readable (for debugging, or just turning machine-readable form to human-readable form).

Will renaming this from 'convert' to 'dump' make that better?

> -eric




https://reviews.llvm.org/D24376





More information about the llvm-commits mailing list