[LLVMdev] RFC - A tool to convert profiles from external profilers

Diego Novillo dnovillo at google.com
Mon Jul 21 05:41:33 PDT 2014


On Wed, Jul 16, 2014 at 3:34 PM, Justin Bogner <mail at justinbogner.com> wrote:

> Do you have a plan in mind on how this will decide between input profile
> file formats once there are options other than perf? The two obvious
> approaches are autodetection/a format flag or having a different
> profile-converter tool per format. I think I'm in favour of the former.

Initially a format flag (--type={perf,text,...}). It's easier to
implement than autodetection, which can always be added later.


> This sounds like the right direction to me. Arguably, the readers could
> go into lib/ProfileData as well, leaving only the tool logic under
> llvm/tools. I think either split would be fine.

Yeah. I am splitting the tool, so the Perf reader goes into its own
library in llvm/lib/PerfReader (or somesuch) and the driver goes in
llvm/tools.

I quite liked Bob's idea of adding functionality to the existing
llvm-profdata driver. Seems natural to add a --convert flag to it.


Diego.



More information about the llvm-dev mailing list