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

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'perf-tools-fixes-for-v5.18-2022-04-22' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux

Pull perf tools fixes from Arnaldo Carvalho de Melo:

- Fix header include for LLVM >= 14 when building with libclang.

- Allow access to 'data_src' for auxtrace in 'perf script' with ARM SPE
perf.data files, fixing processing data with such attributes.

- Fix error message for test case 71 ("Convert perf time to TSC") on
s390, where it is not supported.

* tag 'perf-tools-fixes-for-v5.18-2022-04-22' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux:
perf test: Fix error message for test case 71 on s390, where it is not supported
perf report: Set PERF_SAMPLE_DATA_SRC bit for Arm SPE event
perf script: Always allow field 'data_src' for auxtrace
perf clang: Fix header include for LLVM >= 14

+23 -1
+14
tools/perf/builtin-report.c
··· 353 353 struct perf_session *session = rep->session; 354 354 u64 sample_type = evlist__combined_sample_type(session->evlist); 355 355 bool is_pipe = perf_data__is_pipe(session->data); 356 + struct evsel *evsel; 356 357 357 358 if (session->itrace_synth_opts->callchain || 358 359 session->itrace_synth_opts->add_callchain || ··· 408 407 } 409 408 410 409 if (sort__mode == SORT_MODE__MEMORY) { 410 + /* 411 + * FIXUP: prior to kernel 5.18, Arm SPE missed to set 412 + * PERF_SAMPLE_DATA_SRC bit in sample type. For backward 413 + * compatibility, set the bit if it's an old perf data file. 414 + */ 415 + evlist__for_each_entry(session->evlist, evsel) { 416 + if (strstr(evsel->name, "arm_spe") && 417 + !(sample_type & PERF_SAMPLE_DATA_SRC)) { 418 + evsel->core.attr.sample_type |= PERF_SAMPLE_DATA_SRC; 419 + sample_type |= PERF_SAMPLE_DATA_SRC; 420 + } 421 + } 422 + 411 423 if (!is_pipe && !(sample_type & PERF_SAMPLE_DATA_SRC)) { 412 424 ui__error("Selected --mem-mode but no mem data. " 413 425 "Did you call perf record without -d?\n");
+1 -1
tools/perf/builtin-script.c
··· 461 461 return -EINVAL; 462 462 463 463 if (PRINT_FIELD(DATA_SRC) && 464 - evsel__check_stype(evsel, PERF_SAMPLE_DATA_SRC, "DATA_SRC", PERF_OUTPUT_DATA_SRC)) 464 + evsel__do_check_stype(evsel, PERF_SAMPLE_DATA_SRC, "DATA_SRC", PERF_OUTPUT_DATA_SRC, allow_user_set)) 465 465 return -EINVAL; 466 466 467 467 if (PRINT_FIELD(WEIGHT) &&
+4
tools/perf/tests/perf-time-to-tsc.c
··· 123 123 evsel->core.attr.enable_on_exec = 0; 124 124 } 125 125 126 + if (evlist__open(evlist) == -ENOENT) { 127 + err = TEST_SKIP; 128 + goto out_err; 129 + } 126 130 CHECK__(evlist__open(evlist)); 127 131 128 132 CHECK__(evlist__mmap(evlist, UINT_MAX));
+4
tools/perf/util/c++/clang.cpp
··· 20 20 #include "llvm/Option/Option.h" 21 21 #include "llvm/Support/FileSystem.h" 22 22 #include "llvm/Support/ManagedStatic.h" 23 + #if CLANG_VERSION_MAJOR >= 14 24 + #include "llvm/MC/TargetRegistry.h" 25 + #else 23 26 #include "llvm/Support/TargetRegistry.h" 27 + #endif 24 28 #include "llvm/Support/TargetSelect.h" 25 29 #include "llvm/Target/TargetMachine.h" 26 30 #include "llvm/Target/TargetOptions.h"