aboutsummaryrefslogtreecommitdiffstats
path: root/arch (unfollow)
AgeCommit message (Collapse)AuthorFilesLines
2021-07-09libperf: Move 'idx' from tools/perf to perf_evsel::idxJiri Olsa21-58/+59
Move evsel::idx to perf_evsel::idx, so we can move the group interface to libperf. Committer notes: Fixup evsel->idx usage in tools/perf/util/bpf_counter_cgroup.c, that appeared in my tree in my local tree. Also fixed up these: $ find tools/perf/ -name "*.[ch]" | xargs grep 'evsel->idx' tools/perf/ui/gtk/annotate.c: evsel->idx + i); tools/perf/ui/gtk/annotate.c: evsel->idx); $ That running 'make -C tools/perf build-test' caught. Signed-off-by: Jiri Olsa <jolsa@kernel.org> Requested-by: Shunsuke Nakamura <nakamura.shun@fujitsu.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Ian Rogers <irogers@google.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Michael Petlan <mpetlan@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: http://lore.kernel.org/lkml/20210706151704.73662-3-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2021-07-07libperf: Change tests to single static and shared binariesJiri Olsa11-51/+67
Make tests to be two binaries 'tests_static' and 'tests_shared', so the maintenance is easier. Adding tests under libperf build system, so we define all the flags just once. Adding make-tests tule to just compile tests without running them. Signed-off-by: Jiri Olsa <jolsa@kernel.org> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Ian Rogers <irogers@google.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Michael Petlan <mpetlan@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Shunsuke Nakamura <nakamura.shun@fujitsu.com> Link: http://lore.kernel.org/lkml/20210706151704.73662-2-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2021-07-07perf intel-pt: Add a config for max loops without consuming a packetAdrian Hunter4-4/+21
The Intel PT decoder limits the number of unconditional branches (e.g. jmps) decoded without consuming any trace packets. Generally, a loop needs a conditional branch which generates a TNT packet, whereas a "ret" instruction will generate a TIP or TNT packet. So exceeding the limit is assumed to be a never-ending loop, which can happen if there has been a decoding error putting the decoder at the wrong place in the code. Up until now, the limit of 10000 has been enough but some analytic purposes have been reported to exceed that. Increase the limit to 100000, and make it configurable via perf config intel-pt.max-loops. Also amend the "Never-ending loop" message to mention the configuration entry. Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Reviewed-by: Andi Kleen <ak@linux.intel.com> Cc: Jiri Olsa <jolsa@redhat.com> Link: http://lore.kernel.org/lkml/20210701175132.3977-1-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2021-07-07perf stat: Disable the NMI watchdog message on hybridJin Yao1-3/+6
If we run a single workload that only runs on big core, there is always a ugly message about disabling the NMI watchdog because the atom is not counted. Before: # ./perf stat true Performance counter stats for 'true': 0.43 msec task-clock # 0.396 CPUs utilized 0 context-switches # 0.000 /sec 0 cpu-migrations # 0.000 /sec 45 page-faults # 103.918 K/sec 639,634 cpu_core/cycles/ # 1.477 G/sec <not counted> cpu_atom/cycles/ (0.00%) 643,498 cpu_core/instructions/ # 1.486 G/sec <not counted> cpu_atom/instructions/ (0.00%) 123,715 cpu_core/branches/ # 285.694 M/sec <not counted> cpu_atom/branches/ (0.00%) 4,094 cpu_core/branch-misses/ # 9.454 M/sec <not counted> cpu_atom/branch-misses/ (0.00%) 0.001092407 seconds time elapsed 0.001144000 seconds user 0.000000000 seconds sys Some events weren't counted. Try disabling the NMI watchdog: echo 0 > /proc/sys/kernel/nmi_watchdog perf stat ... echo 1 > /proc/sys/kernel/nmi_watchdog # ./perf stat -e '{cpu_atom/cycles/,msr/tsc/}' true Performance counter stats for 'true': <not counted> cpu_atom/cycles/ (0.00%) <not counted> msr/tsc/ (0.00%) 0.001904106 seconds time elapsed 0.001947000 seconds user 0.000000000 seconds sys Some events weren't counted. Try disabling the NMI watchdog: echo 0 > /proc/sys/kernel/nmi_watchdog perf stat ... echo 1 > /proc/sys/kernel/nmi_watchdog The events in group usually have to be from the same PMU. Try reorganizing the group. Now we disable the NMI watchdog message on hybrid, otherwise there are too many false positives. After: # ./perf stat true Performance counter stats for 'true': 0.79 msec task-clock # 0.419 CPUs utilized 0 context-switches # 0.000 /sec 0 cpu-migrations # 0.000 /sec 48 page-faults # 60.889 K/sec 777,692 cpu_core/cycles/ # 986.519 M/sec <not counted> cpu_atom/cycles/ (0.00%) 669,147 cpu_core/instructions/ # 848.828 M/sec <not counted> cpu_atom/instructions/ (0.00%) 128,635 cpu_core/branches/ # 163.176 M/sec <not counted> cpu_atom/branches/ (0.00%) 4,089 cpu_core/branch-misses/ # 5.187 M/sec <not counted> cpu_atom/branch-misses/ (0.00%) 0.001880649 seconds time elapsed 0.001935000 seconds user 0.000000000 seconds sys # ./perf stat -e '{cpu_atom/cycles/,msr/tsc/}' true Performance counter stats for 'true': <not counted> cpu_atom/cycles/ (0.00%) <not counted> msr/tsc/ (0.00%) 0.000963319 seconds time elapsed 0.000999000 seconds user 0.000000000 seconds sys Signed-off-by: Jin Yao <yao.jin@linux.intel.com> Acked-by: Jiri Olsa <jolsa@kernel.org> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Andi Kleen <ak@linux.intel.com> Cc: Jin Yao <yao.jin@intel.com> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Peter Zijlstra <peterz@infradead.org> Link: http://lore.kernel.org/lkml/20210610034557.29766-1-yao.jin@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>