diff options
author | Amir Ayupov <aaupov@fb.com> | 2022-09-19 13:36:50 -0700 |
---|---|---|
committer | Amir Ayupov <aaupov@fb.com> | 2022-09-19 13:37:10 -0700 |
commit | 39336fc09cac61fa38a6bc2d30731fe0e38d38a2 (patch) | |
tree | d2c8213b0dadf2e83e85b115be14a32d7f2840f0 /bolt/lib/Utils/CommandLineOpts.cpp | |
parent | 6f3276d57e265be0996e2f67e2e872401da8f511 (diff) | |
download | llvm-39336fc09cac61fa38a6bc2d30731fe0e38d38a2.zip llvm-39336fc09cac61fa38a6bc2d30731fe0e38d38a2.tar.gz llvm-39336fc09cac61fa38a6bc2d30731fe0e38d38a2.tar.bz2 |
[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
Diffstat (limited to 'bolt/lib/Utils/CommandLineOpts.cpp')
-rw-r--r-- | bolt/lib/Utils/CommandLineOpts.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/bolt/lib/Utils/CommandLineOpts.cpp b/bolt/lib/Utils/CommandLineOpts.cpp index b90a735..d17d68a 100644 --- a/bolt/lib/Utils/CommandLineOpts.cpp +++ b/bolt/lib/Utils/CommandLineOpts.cpp @@ -154,6 +154,15 @@ cl::opt<bool> PrintSections("print-sections", cl::desc("print all registered sections"), cl::Hidden, cl::cat(BoltCategory)); +cl::opt<ProfileFormatKind> ProfileFormat( + "profile-format", + cl::desc( + "format to dump profile output in aggregation mode, default is fdata"), + cl::init(PF_Fdata), + cl::values(clEnumValN(PF_Fdata, "fdata", "offset-based plaintext format"), + clEnumValN(PF_YAML, "yaml", "dense YAML reprensentation")), + cl::ZeroOrMore, cl::Hidden, cl::cat(BoltCategory)); + cl::opt<bool> SplitEH("split-eh", cl::desc("split C++ exception handling code"), cl::Hidden, cl::cat(BoltOptCategory)); |