[BOLT] Control aggregation mode output profile file format
authorAmir Ayupov <aaupov@fb.com>
Mon, 19 Sep 2022 20:36:50 +0000 (13:36 -0700)
committerAmir Ayupov <aaupov@fb.com>
Mon, 19 Sep 2022 20:37:10 +0000 (13:37 -0700)
commit39336fc09cac61fa38a6bc2d30731fe0e38d38a2
treed2c8213b0dadf2e83e85b115be14a32d7f2840f0
parent6f3276d57e265be0996e2f67e2e872401da8f511
[BOLT] Control aggregation mode output profile file format

In perf2bolt and `-aggregate-only` BOLT mode, the output profile file is written
in fdata format by default. Provide a knob `-profile-format=[fdata,yaml]` to
control the format.
Note that `-w` option still dumps in YAML format.

Reviewed By: #bolt, maksfb

Differential Revision: https://reviews.llvm.org/D133995
bolt/include/bolt/Utils/CommandLineOpts.h
bolt/lib/Profile/DataAggregator.cpp
bolt/lib/Rewrite/RewriteInstance.cpp
bolt/lib/Utils/CommandLineOpts.cpp
bolt/test/X86/pre-aggregated-perf.test