Adrian Hunter
d443cefd9f
perf intel-pt: Fix 'CPU too large' error
...
commit 5501e9229a80d95a1ea68609f44c447a75d23ed5 upstream.
In some cases, the number of cpus (nr_cpus_online) is confused with the
maximum cpu number (nr_cpus_avail), which results in the error in the
example below:
Example on system with 8 cpus:
Before:
# echo 0 > /sys/devices/system/cpu/cpu2/online
# ./perf record --kcore -e intel_pt// taskset --cpu-list 7 uname
Linux
[ perf record: Woken up 1 times to write data ]
[ perf record: Captured and wrote 0.147 MB perf.data ]
# ./perf script --itrace=e
Requested CPU 7 too large. Consider raising MAX_NR_CPUS
0x25908 [0x8]: failed to process type: 68 [Invalid argument]
After:
# ./perf script --itrace=e
#
Fixes: 8c7274691f ("perf machine: Replace MAX_NR_CPUS with perf_env::nr_cpus_online")
Fixes: 7df4e36a47 ("perf session: Replace MAX_NR_CPUS with perf_env::nr_cpus_online")
Signed-off-by: Adrian Hunter <[email protected] >
Tested-by: Kan Liang <[email protected] >
Cc: Jiri Olsa <[email protected] >
Cc: [email protected]
Link: http://lore.kernel.org/lkml/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected] >
Signed-off-by: Greg Kroah-Hartman <[email protected] >
2021-01-19 18:26:16 +01:00
..
arch
perf tools: Fix record failure when mixed with ARM SPE event
2020-08-05 09:59:49 +02:00
bench
perf bench mem: Always memset source before memcpy
2020-08-21 13:05:38 +02:00
Documentation
perf record/stat: Explicitly call out event modifiers in the documentation
2020-09-05 11:22:49 +02:00
examples /bpf
include /bpf
jvmti
perf jvmti: Link against tools/lib/ctype.h to have weak strlcpy()
2019-10-15 11:47:38 -03:00
lib
libperf: Add perf_evlist__poll() function
2019-09-25 09:51:49 -03:00
pmu-events
perf jevents: Fix leak of mapfile memory
2020-10-01 13:17:39 +02:00
python
scripts
perf scripts python: exported-sql-viewer.py: Fix unexpanded 'Find' result
2020-07-16 08:16:47 +02:00
tests
perf test session topology: Fix data path
2020-10-14 10:32:59 +02:00
trace
perf trace: Fix the selection for architectures to generate the errno name tables
2020-10-01 13:18:05 +02:00
ui
perf report TUI: Fix segmentation fault in perf_evsel__hists_browse()
2020-07-16 08:16:38 +02:00
util
perf intel-pt: Fix 'CPU too large' error
2021-01-19 18:26:16 +01:00
.gitignore
Build
builtin-annotate.c
perf session: Return error code for perf_session__new() function on failure
2019-09-20 15:58:11 -03:00
builtin-bench.c
builtin-buildid-cache.c
perf session: Return error code for perf_session__new() function on failure
2019-09-20 15:58:11 -03:00
builtin-buildid-list.c
perf session: Return error code for perf_session__new() function on failure
2019-09-20 15:58:11 -03:00
builtin-c2c.c
perf c2c: Fix return type for histogram sorting comparision functions
2020-02-05 21:22:40 +00:00
builtin-config.c
builtin-data.c
builtin-diff.c
perf diff: Use llabs() with 64-bit values
2020-01-04 19:18:26 +01:00
builtin-evlist.c
perf evsel: Introduce evsel_fprintf.h
2019-09-25 16:26:34 -03:00
builtin-ftrace.c
builtin-help.c
builtin-inject.c
perf session: Return error code for perf_session__new() function on failure
2019-09-20 15:58:11 -03:00
builtin-kallsyms.c
builtin-kmem.c
perf kmem: Fix memory leak in compact_gfp_flags()
2019-10-16 10:08:32 -03:00
builtin-kvm.c
perf tools: Propagate get_cpuid() error
2019-09-30 17:29:54 -03:00
builtin-list.c
perf list: Allow plurals for metric, metricgroup
2019-09-25 09:51:42 -03:00
builtin-lock.c
perf lock: Don't free "lock_seq_stat" if read_count isn't zero
2020-11-24 13:29:05 +01:00
builtin-mem.c
perf session: Return error code for perf_session__new() function on failure
2019-09-20 15:58:11 -03:00
builtin-probe.c
perf probe: Do not show the skipped events
2020-06-22 09:31:27 +02:00
builtin-record.c
perf record: Correct the help info of option "--no-bpf-event"
2020-09-09 19:12:36 +02:00
builtin-report.c
perf report: Fix NULL pointer dereference in hists__fprintf_nr_sample_events()
2020-06-24 17:50:45 +02:00
builtin-sched.c
perf evsel: Introduce evsel_fprintf.h
2019-09-25 16:26:34 -03:00
builtin-script.c
perf script: Fix --reltime with --time
2020-01-23 08:23:01 +01:00
builtin-stat.c
perf stat: Skip duration_time in setup_system_wide
2020-10-29 09:57:50 +01:00
builtin-timechart.c
perf session: Return error code for perf_session__new() function on failure
2019-09-20 15:58:11 -03:00
builtin-top.c
perf top: Fix stdio interface input handling with glibc 2.28+
2020-10-14 10:32:59 +02:00
builtin-trace.c
perf trace: Fix segfault when trying to trace events by cgroup
2020-11-18 19:20:18 +01:00
builtin-version.c
builtin.h
check-headers.sh
tools headers uapi: Sync linux/fs.h with the kernel sources
2019-09-30 17:29:22 -03:00
command-list.txt
CREDITS
design.txt
Makefile
tools: Let O= makes handle a relative path with -C option
2020-04-01 11:02:00 +02:00
Makefile.config
perf tools: Support Python 3.8+ in Makefile
2020-04-17 10:50:21 +02:00
Makefile.perf
libtraceevent: Move traceevent plugins in its own subdirectory
2019-09-25 09:51:43 -03:00
MANIFEST
perf-archive.sh
perf-completion.sh
perf-read-vdso.c
perf-sys.h
perf tools: Make usage of test_attr__* optional for perf-sys.h
2019-10-31 21:38:41 +01:00
perf-with-kcore.sh
perf.c
libperf: Merge libperf_set_print() into libperf_init()
2019-09-25 09:51:49 -03:00
perf.h