diff options
author | Maksim Panchenko <maks@fb.com> | 2023-01-09 19:14:38 -0800 |
---|---|---|
committer | Maksim Panchenko <maks@fb.com> | 2023-01-12 13:25:36 -0800 |
commit | 27cf96c4ec4a2a2906fef7479341c5b9d8616887 (patch) | |
tree | bd4940f7431877b6eeedcee1f53d460924bc6da7 /bolt/include | |
parent | 4d67b278173167caa0f06f3ec6cdd36f2549a952 (diff) | |
download | llvm-27cf96c4ec4a2a2906fef7479341c5b9d8616887.tar.gz |
[BOLT] Minor refactoring for -print-sorted-by option
Only display used values for -print-sorted-by option when printing help.
Differential Revision: https://reviews.llvm.org/D141209
Diffstat (limited to 'bolt/include')
-rw-r--r-- | bolt/include/bolt/Core/DynoStats.h | 55 |
1 files changed, 28 insertions, 27 deletions
diff --git a/bolt/include/bolt/Core/DynoStats.h b/bolt/include/bolt/Core/DynoStats.h index 3f5c64f92c8e..7f24c8c99c94 100644 --- a/bolt/include/bolt/Core/DynoStats.h +++ b/bolt/include/bolt/Core/DynoStats.h @@ -28,33 +28,34 @@ class BinaryFunction; /// Class encapsulating runtime statistics about an execution unit. class DynoStats { -#define DYNO_STATS\ - D(FIRST_DYNO_STAT, "<reserved>", Fn)\ - D(FORWARD_COND_BRANCHES, "executed forward branches", Fn)\ - D(FORWARD_COND_BRANCHES_TAKEN, "taken forward branches", Fn)\ - D(BACKWARD_COND_BRANCHES, "executed backward branches", Fn)\ - D(BACKWARD_COND_BRANCHES_TAKEN, "taken backward branches", Fn)\ - D(UNCOND_BRANCHES, "executed unconditional branches", Fn)\ - D(FUNCTION_CALLS, "all function calls", Fn)\ - D(INDIRECT_CALLS, "indirect calls", Fn)\ - D(PLT_CALLS, "PLT calls", Fn)\ - D(INSTRUCTIONS, "executed instructions", Fn)\ - D(LOADS, "executed load instructions", Fn)\ - D(STORES, "executed store instructions", Fn)\ - D(JUMP_TABLE_BRANCHES, "taken jump table branches", Fn)\ - D(UNKNOWN_INDIRECT_BRANCHES, "taken unknown indirect branches", Fn)\ - D(ALL_BRANCHES, "total branches",\ - Fadd(ALL_CONDITIONAL, UNCOND_BRANCHES))\ - D(ALL_TAKEN, "taken branches",\ - Fadd(TAKEN_CONDITIONAL, UNCOND_BRANCHES))\ - D(NONTAKEN_CONDITIONAL, "non-taken conditional branches",\ - Fsub(ALL_CONDITIONAL, TAKEN_CONDITIONAL))\ - D(TAKEN_CONDITIONAL, "taken conditional branches",\ - Fadd(FORWARD_COND_BRANCHES_TAKEN, BACKWARD_COND_BRANCHES_TAKEN))\ - D(ALL_CONDITIONAL, "all conditional branches",\ - Fadd(FORWARD_COND_BRANCHES, BACKWARD_COND_BRANCHES))\ - D(VENEER_CALLS_AARCH64, "linker-inserted veneer calls", Fn)\ - D(LAST_DYNO_STAT, "<reserved>", 0) +#define REAL_DYNO_STATS \ + D(FORWARD_COND_BRANCHES, "executed forward branches", Fn) \ + D(FORWARD_COND_BRANCHES_TAKEN, "taken forward branches", Fn) \ + D(BACKWARD_COND_BRANCHES, "executed backward branches", Fn) \ + D(BACKWARD_COND_BRANCHES_TAKEN, "taken backward branches", Fn) \ + D(UNCOND_BRANCHES, "executed unconditional branches", Fn) \ + D(FUNCTION_CALLS, "all function calls", Fn) \ + D(INDIRECT_CALLS, "indirect calls", Fn) \ + D(PLT_CALLS, "PLT calls", Fn) \ + D(INSTRUCTIONS, "executed instructions", Fn) \ + D(LOADS, "executed load instructions", Fn) \ + D(STORES, "executed store instructions", Fn) \ + D(JUMP_TABLE_BRANCHES, "taken jump table branches", Fn) \ + D(UNKNOWN_INDIRECT_BRANCHES, "taken unknown indirect branches", Fn) \ + D(ALL_BRANCHES, "total branches", Fadd(ALL_CONDITIONAL, UNCOND_BRANCHES)) \ + D(ALL_TAKEN, "taken branches", Fadd(TAKEN_CONDITIONAL, UNCOND_BRANCHES)) \ + D(NONTAKEN_CONDITIONAL, "non-taken conditional branches", \ + Fsub(ALL_CONDITIONAL, TAKEN_CONDITIONAL)) \ + D(TAKEN_CONDITIONAL, "taken conditional branches", \ + Fadd(FORWARD_COND_BRANCHES_TAKEN, BACKWARD_COND_BRANCHES_TAKEN)) \ + D(ALL_CONDITIONAL, "all conditional branches", \ + Fadd(FORWARD_COND_BRANCHES, BACKWARD_COND_BRANCHES)) \ + D(VENEER_CALLS_AARCH64, "linker-inserted veneer calls", Fn) + +#define DYNO_STATS \ + D(FIRST_DYNO_STAT, "<reserved>", 0) \ + REAL_DYNO_STATS \ + D(LAST_DYNO_STAT, "<reserved>", 0) public: #define D(name, ...) name, |