perf report: Implement visual marker for macro fusion in annotate
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v4 Latest2 patches 2 repliesIn review
- v32 patches 3 repliesSuperseded
- v23 patches 5 repliesSuperseded
Earlier versions · 1
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v1 | 2 patches | 4 replies | Superseded |
Patches in v4 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | perf util: Check for fused instructiontools/ tools/ tools/ +3 more | +73 | 0 replies | |
| 2/2 | perf report: Implement visual marker for macro fusion in annotatetools/ tools/ tools/ +2 more | +63 | 2 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v4 yet.
Cover letter [PATCH v4 0/2] perf report: Implement visual marker for macro fusion in annotate
Macro fusion merges two instructions to a single micro-op. Intel core platform performs this hardware optimization under limited circumstances. For example, CMP + JCC can be "fused" and executed /retired together. While with sampling this can result in the sample sometimes being on the JCC and sometimes on the CMP. So for the fused instruction pair, they could be considered together.
On Nehalem, fused instruction pairs:
cmp/test + jcc.
On other new CPU:
cmp/test/add/sub/and/inc/dec + jcc.
This patch series marks the case clearly by joining the fused instruction pair in the arrow of the jump.
For example:
│ ┌──cmpl $0x0,argp_program_version_hook
81.93 │ ├──je 20
│ │ lock cmpxchg %esi,0x38a9a4(%rip)
│ │↓ jne 29
│ │↓ jmp 43
11.47 │20:└─→cmpxch %esi,0x38a999(%rip)Change-log:
-----------
v4: Move the CPU model checking to symbol__disassemble and save
the family/model in arch structure. It avoids checking everytime when display the jump arrows.
The patch set is still performing the fused checking when user moves the cursor on the jump instruction.
v3: 1. Add checking for Nehalem (CMP, TEST). For other newer
Intel CPUs just check it by default (CMP, TEST, ADD, SUB, AND, INC, DEC).
2. Use Arnaldo's fix to let the display be better
v2: According to Arnaldo's comments, remove the weak function and
use an arch-specific function instead to check fused instruction pair.
v1: Inital post
Jin Yao (2):
perf util: Check for fused instruction
perf report: Implement visual marker for macro fusion in annotate
tools/perf/arch/x86/annotate/instructions.c | 46 +++++++++++++++++++++++++++++ tools/perf/builtin-top.c | 2 +- tools/perf/ui/browser.c | 29 ++++++++++++++++++ tools/perf/ui/browser.h | 2 ++ tools/perf/ui/browsers/annotate.c | 30 ++++++++++++++++++- tools/perf/ui/gtk/annotate.c | 2 +- tools/perf/util/annotate.c | 27 +++++++++++++++-- tools/perf/util/annotate.h | 4 ++- 8 files changed, 136 insertions(+), 6 deletions(-)
Signature · 1 line
2.7.4