diff options
author | Ingo Molnar <mingo@kernel.org> | 2016-06-08 09:29:23 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2016-06-08 09:29:23 +0200 |
commit | aa3a655b159f11b1afe0dcdac5fb5b172f02b778 (patch) | |
tree | 577058fb95c7f2e2aacb3566874e75e17fcec9f8 /tools/perf/arch | |
parent | Merge branch 'linus' into perf/core, to refresh the branch (diff) | |
parent | perf config: Handle the error when config set is NULL at collect_config() (diff) | |
download | linux-aa3a655b159f11b1afe0dcdac5fb5b172f02b778.tar.xz linux-aa3a655b159f11b1afe0dcdac5fb5b172f02b778.zip |
Merge tag 'perf-core-for-mingo-20160606' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core
Pull perf/core improvements and fixes from Arnaldo Carvalho de Melo:
User visible changes:
- Tooling support for TopDown counters, recently added to the kernel (Andi Kleen)
- Show call graphs in 'perf script' when 1st event doesn't have it but some other has (He Kuang)
- Fix terminal cleanup when handling invalid .perfconfig files in 'perf top' (Taeung Song)
Build fixes:
- Respect CROSS_COMPILE for the linker in libapi (Lucas Stach)
Infrastructure changes:
- Fix perf_evlist__alloc_mmap() failure path (Wang Nan)
- Provide way to extract integer value from format_field (Arnaldo Carvalho de Melo)
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'tools/perf/arch')
-rw-r--r-- | tools/perf/arch/x86/util/Build | 1 | ||||
-rw-r--r-- | tools/perf/arch/x86/util/group.c | 27 |
2 files changed, 28 insertions, 0 deletions
diff --git a/tools/perf/arch/x86/util/Build b/tools/perf/arch/x86/util/Build index 465970370f3e..4cd8a16b1b7b 100644 --- a/tools/perf/arch/x86/util/Build +++ b/tools/perf/arch/x86/util/Build @@ -3,6 +3,7 @@ libperf-y += tsc.o libperf-y += pmu.o libperf-y += kvm-stat.o libperf-y += perf_regs.o +libperf-y += group.o libperf-$(CONFIG_DWARF) += dwarf-regs.o libperf-$(CONFIG_BPF_PROLOGUE) += dwarf-regs.o diff --git a/tools/perf/arch/x86/util/group.c b/tools/perf/arch/x86/util/group.c new file mode 100644 index 000000000000..37f92aa39a5d --- /dev/null +++ b/tools/perf/arch/x86/util/group.c @@ -0,0 +1,27 @@ +#include <stdio.h> +#include "api/fs/fs.h" +#include "util/group.h" + +/* + * Check whether we can use a group for top down. + * Without a group may get bad results due to multiplexing. + */ +bool arch_topdown_check_group(bool *warn) +{ + int n; + + if (sysctl__read_int("kernel/nmi_watchdog", &n) < 0) + return false; + if (n > 0) { + *warn = true; + return false; + } + return true; +} + +void arch_topdown_group_warn(void) +{ + fprintf(stderr, + "nmi_watchdog enabled with topdown. May give wrong results.\n" + "Disable with echo 0 > /proc/sys/kernel/nmi_watchdog\n"); +} |