[BOLT] Options to facilitate debugging

Summary:
Some helpful options:

  -print-dyno-stats-only
    while printing functions output dyno-stats and skip instructions

  -report-stale
    print a list of functions with a stale profile

(cherry picked from FBD6505141)
This commit is contained in:
Maksim Panchenko
2017-12-06 15:45:57 -08:00
parent 70d44ab20a
commit 10274633ee
2 changed files with 25 additions and 3 deletions

View File

@@ -124,6 +124,13 @@ PrintDynoStats("dyno-stats",
cl::desc("print execution info based on profile"),
cl::cat(BoltCategory));
static cl::opt<bool>
PrintDynoStatsOnly("print-dyno-stats-only",
cl::desc("while printing functions output dyno-stats and skip instructions"),
cl::init(false),
cl::Hidden,
cl::cat(BoltCategory));
static cl::opt<bool>
PrintJumpTables("print-jump-tables",
cl::desc("print jump tables"),
@@ -441,7 +448,7 @@ void BinaryFunction::print(raw_ostream &OS, std::string Annotation,
OS << "\n}\n";
if (!PrintInstructions || !BC.InstPrinter)
if (opts::PrintDynoStatsOnly || !PrintInstructions || !BC.InstPrinter)
return;
// Offset of the instruction in function.