diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2025-10-08 19:24:24 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2025-10-08 19:24:24 -0700 |
commit | ec714e371f22f716a04e6ecb2a24988c92b26911 (patch) | |
tree | 02ef2ebccd6889590b2b42697b6f83ca22ff8127 /tools/perf/builtin-script.c | |
parent | 37bfdbc11b245119210ac9924a192aec8bd07d16 (diff) | |
parent | f3b601f900902ab80902c44f820a8985384ac021 (diff) |
Merge tag 'perf-tools-for-v6.18-1-2025-10-08' of git://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools
Pull perf tools updates from Arnaldo Carvalho de Melo:
- Extended 'perf annotate' with DWARF type information
(--code-with-type) integration in the TUI, including a 'T'
hotkey to toggle it
- Enhanced 'perf bench mem' with new mmap() workloads and control
over page/chunk sizes
- Fix 'perf stat' error handling to correctly display unsupported
events
- Improved support for Clang cross-compilation
- Refactored LLVM and Capstone disasm for modularity
- Introduced the :X modifier to exclude an event from automatic
regrouping
- Adjusted KVM sampling defaults to use the "cycles" event to prevent
failures
- Added comprehensive support for decoding PowerPC Dispatch Trace Log
(DTL)
- Updated Arm SPE tracing logic for better analysis of memory and snoop
details
- Synchronized Intel PMU events and metrics with TMA 5.1 across
multiple processor generations
- Converted dependencies like libperl and libtracefs to be opt-in
- Handle more Rust symbols in kallsyms ('N', debugging)
- Improve the python binding to allow for python based tools to use
more of the libraries, add a 'ilist' utility to test those new
bindings
- Various 'perf test' fixes
- Kan Liang no longer a perf tools reviewer
* tag 'perf-tools-for-v6.18-1-2025-10-08' of git://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools: (192 commits)
perf tools: Fix arm64 libjvmti build by generating unistd_64.h
perf tests: Don't retest sections in "Object code reading"
perf docs: Document building with Clang
perf build: Support build with clang
perf test coresight: Dismiss clang warning for unroll loop thread
perf test coresight: Dismiss clang warning for thread loop
perf test coresight: Dismiss clang warning for memcpy thread
perf build: Disable thread safety analysis for perl header
perf build: Correct CROSS_ARCH for clang
perf python: split Clang options when invoking Popen
tools build: Align warning options with perf
perf disasm: Remove unused evsel from 'struct annotate_args'
perf srcline: Fallback between addr2line implementations
perf disasm: Make ins__scnprintf() and ins__is_nop() static
perf dso: Clean up read_symbol() error handling
perf dso: Support BPF programs in dso__read_symbol()
perf dso: Move read_symbol() from llvm/capstone to dso
perf llvm: Reduce LLVM initialization
perf check: Add libLLVM feature
perf parse-events: Fix parsing of >30kb event strings
...
Diffstat (limited to 'tools/perf/builtin-script.c')
-rw-r--r-- | tools/perf/builtin-script.c | 34 |
1 files changed, 31 insertions, 3 deletions
diff --git a/tools/perf/builtin-script.c b/tools/perf/builtin-script.c index d9fbdcf72f25..8124fcb51da9 100644 --- a/tools/perf/builtin-script.c +++ b/tools/perf/builtin-script.c @@ -43,6 +43,7 @@ #include <linux/stringify.h> #include <linux/time64.h> #include <linux/zalloc.h> +#include <linux/unaligned.h> #include <sys/utsname.h> #include "asm/bug.h" #include "util/mem-events.h" @@ -223,7 +224,7 @@ enum { OUTPUT_TYPE_MAX }; -// We need to refactor the evsel->priv use in in 'perf script' to allow for +// We need to refactor the evsel->priv use in 'perf script' to allow for // using that area, that is being used only in some cases. #define OUTPUT_TYPE_UNSET -1 @@ -1224,7 +1225,6 @@ static int any_dump_insn(struct evsel *evsel __maybe_unused, u8 *inbuf, int inlen, int *lenp, FILE *fp) { -#ifdef HAVE_LIBCAPSTONE_SUPPORT if (PRINT_FIELD(BRSTACKDISASM)) { int printed = fprintf_insn_asm(x->machine, x->thread, x->cpumode, x->is64bit, (uint8_t *)inbuf, inlen, ip, lenp, @@ -1233,7 +1233,6 @@ static int any_dump_insn(struct evsel *evsel __maybe_unused, if (printed > 0) return printed; } -#endif return fprintf(fp, "%s", dump_insn(x, ip, inbuf, inlen, lenp)); } @@ -2003,6 +2002,33 @@ static int perf_sample__fprintf_synth_iflag_chg(struct perf_sample *sample, FILE return len + perf_sample__fprintf_pt_spacing(len, fp); } +#ifdef HAVE_AUXTRACE_SUPPORT +static int perf_sample__fprintf_synth_vpadtl(struct perf_sample *data, FILE *fp) +{ + struct powerpc_vpadtl_entry *dtl = (struct powerpc_vpadtl_entry *)data->raw_data; + int len; + + len = fprintf(fp, "timebase: %" PRIu64 " dispatch_reason:%s, preempt_reason:%s,\n" + "enqueue_to_dispatch_time:%d, ready_to_enqueue_time:%d," + "waiting_to_ready_time:%d, processor_id: %d", + get_unaligned_be64(&dtl->timebase), + dispatch_reasons[dtl->dispatch_reason], + preempt_reasons[dtl->preempt_reason], + be32_to_cpu(dtl->enqueue_to_dispatch_time), + be32_to_cpu(dtl->ready_to_enqueue_time), + be32_to_cpu(dtl->waiting_to_ready_time), + be16_to_cpu(dtl->processor_id)); + + return len; +} +#else +static int perf_sample__fprintf_synth_vpadtl(struct perf_sample *data __maybe_unused, + FILE *fp __maybe_unused) +{ + return 0; +} +#endif + static int perf_sample__fprintf_synth(struct perf_sample *sample, struct evsel *evsel, FILE *fp) { @@ -2025,6 +2051,8 @@ static int perf_sample__fprintf_synth(struct perf_sample *sample, return perf_sample__fprintf_synth_evt(sample, fp); case PERF_SYNTH_INTEL_IFLAG_CHG: return perf_sample__fprintf_synth_iflag_chg(sample, fp); + case PERF_SYNTH_POWERPC_VPA_DTL: + return perf_sample__fprintf_synth_vpadtl(sample, fp); default: break; } |