Ravi Bangoria
3149733584
perf annotate: Add fusion logic for AMD microarchs
...
AMD family 15h and above microarchs fuse a subset of cmp/test/ALU
instructions with branch instructions[1][2]. Add perf annotate
fused instruction support for these microarchs.
Before:
│ testb $0x80,0x51(%rax)
│ ┌──jne 5b3
0.78 │ │ mov %r13,%rdi
│ │→ callq mark_page_accessed
1.08 │5b3:└─→mov 0x8(%r13),%rax
After:
│ ┌──testb $0x80,0x51(%rax)
│ ├──jne 5b3
0.78 │ │ mov %r13,%rdi
│ │→ callq mark_page_accessed
1.08 │5b3:└─→mov 0x8(%r13),%rax
[1] https://bugzilla.kernel.org/attachment.cgi?id=298553
[2] https://bugzilla.kernel.org/attachment.cgi?id=298555
Committer testing:
On a:
$ grep -m1 "model name" /proc/cpuinfo
model name : AMD Ryzen 9 3900X 12-Core Processor
$
Samples: 44K of event 'cycles', 4000 Hz, Event count (approx.): 7533249650
_int_malloc /usr/lib64/libc-2.33.so [Percent: local period]
Percent│ ┌──test %eax,%eax
│ ├──jne 884
│ │↓ jmpq 943
│ │ nop
│878:│ add $0x10,%rdx
0.64 │ │ add %eax,%eax
0.57 │ │↓ je cc9
0.77 │884:└─→test %esi,%eax
│ ↑ je 878
│ mov 0x18(%rdx),%r15
Reported-by: Kim Phillips <kim.phillips@amd.com>
Signed-off-by: Ravi Bangoria <ravi.bangoria@amd.com>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Jin Yao <yao.jin@linux.intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: https //lore.kernel.org/r/20210911043854.8373-2-ravi.bangoria@amd.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2021-09-15 17:54:52 -03:00
..
2021-09-15 17:54:52 -03:00
2021-09-08 12:55:35 -07:00
2021-08-11 09:35:44 -03:00
2021-08-11 09:34:31 -03:00
2021-08-11 09:35:24 -03:00
2021-08-10 15:19:49 -03:00
2021-09-10 11:45:19 -03:00
2021-09-10 11:45:19 -03:00
2021-09-10 18:15:22 -03:00
2021-08-03 17:04:04 -03:00
2021-09-15 17:54:52 -03:00
2021-09-11 15:36:16 -03:00
2021-08-02 10:06:51 -03:00
2021-08-10 11:32:37 -03:00
2021-08-02 10:06:51 -03:00
2021-08-02 10:06:51 -03:00
2021-09-08 12:55:35 -07:00
2021-08-31 15:12:00 -03:00
2021-08-02 10:06:51 -03:00
2021-08-02 10:06:51 -03:00
2021-08-02 10:14:34 -03:00
2021-08-02 10:06:51 -03:00
2021-08-02 10:06:51 -03:00
2021-08-02 10:06:51 -03:00
2021-08-02 10:06:51 -03:00
2021-07-07 10:28:10 -03:00
2021-09-08 12:55:35 -07:00
2021-08-02 10:06:51 -03:00
2021-08-02 10:06:51 -03:00
2021-09-03 08:18:25 -03:00
2021-08-30 18:22:23 -03:00
2021-08-02 10:06:51 -03:00
2021-08-02 10:06:51 -03:00
2021-08-02 10:06:51 -03:00
2021-09-10 18:13:20 -03:00
2021-09-11 16:06:52 -03:00
2021-08-31 15:11:55 -03:00
2021-05-27 13:24:22 -03:00