Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge tag 'perf-tools-fixes-for-v6.5-3-2023-08-09' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux

Pull perf tools fixes from Arnaldo Carvalho de Melo:

- Revert a patch that unconditionally resolved addresses to inlines in
callchains, something that was done before when DWARF mode was asked
for, but could as well be done when just frame pointers (the default)
was selected.

This enriches the callchains with inlines but the way to resolve it
is gross right now, relying on addr2line, and even if we come up with
an efficient way of processing all the associated DWARF info for a
big file as vmlinux is, this has to be something people opt-in, as it
will still result in overheads, so revert it until we get this done
in a saner way.

- Update the x86 msr-index.h header with the kernel original, no change
in tooling output, just addresses a tools/perf build warning.

- Resolve a regression where special "tool events", such as
"duration_time" were being presented for all CPUs, when it only
makes sense to show it for the workload, that is, just once.

* tag 'perf-tools-fixes-for-v6.5-3-2023-08-09' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux:
perf stat: Don't display zero tool counts
tools arch x86: Sync the msr-index.h copy with the kernel sources
Revert "perf report: Append inlines to non-DWARF callchains"

+6 -5
+1
tools/arch/x86/include/asm/msr-index.h
··· 545 545 #define MSR_AMD64_DE_CFG 0xc0011029 546 546 #define MSR_AMD64_DE_CFG_LFENCE_SERIALIZE_BIT 1 547 547 #define MSR_AMD64_DE_CFG_LFENCE_SERIALIZE BIT_ULL(MSR_AMD64_DE_CFG_LFENCE_SERIALIZE_BIT) 548 + #define MSR_AMD64_DE_CFG_ZEN2_FP_BACKUP_FIX_BIT 9 548 549 549 550 #define MSR_AMD64_BU_CFG2 0xc001102a 550 551 #define MSR_AMD64_IBSFETCHCTL 0xc0011030
-5
tools/perf/util/machine.c
··· 45 45 46 46 static void __machine__remove_thread(struct machine *machine, struct thread_rb_node *nd, 47 47 struct thread *th, bool lock); 48 - static int append_inlines(struct callchain_cursor *cursor, struct map_symbol *ms, u64 ip); 49 48 50 49 static struct dso *machine__kernel_dso(struct machine *machine) 51 50 { ··· 2384 2385 ms.maps = maps__get(al.maps); 2385 2386 ms.map = map__get(al.map); 2386 2387 ms.sym = al.sym; 2387 - 2388 - if (!branch && append_inlines(cursor, &ms, ip) == 0) 2389 - goto out; 2390 - 2391 2388 srcline = callchain_srcline(&ms, al.addr); 2392 2389 err = callchain_cursor_append(cursor, ip, &ms, 2393 2390 branch, flags, nr_loop_iter,
+5
tools/perf/util/stat-display.c
··· 931 931 */ 932 932 if (config->aggr_mode == AGGR_THREAD && config->system_wide) 933 933 return true; 934 + 935 + /* Tool events have the software PMU but are only gathered on 1. */ 936 + if (evsel__is_tool(counter)) 937 + return true; 938 + 934 939 /* 935 940 * Skip value 0 when it's an uncore event and the given aggr id 936 941 * does not belong to the PMU cpumask.