]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/blob - tools/perf/arch/x86/util/group.c
Merge tag 'irqchip-4.9-1' of git://git.kernel.org/pub/scm/linux/kernel/git/maz/arm...
[mirror_ubuntu-focal-kernel.git] / tools / perf / arch / x86 / util / group.c
1 #include <stdio.h>
2 #include "api/fs/fs.h"
3 #include "util/group.h"
4
5 /*
6 * Check whether we can use a group for top down.
7 * Without a group may get bad results due to multiplexing.
8 */
9 bool arch_topdown_check_group(bool *warn)
10 {
11 int n;
12
13 if (sysctl__read_int("kernel/nmi_watchdog", &n) < 0)
14 return false;
15 if (n > 0) {
16 *warn = true;
17 return false;
18 }
19 return true;
20 }
21
22 void arch_topdown_group_warn(void)
23 {
24 fprintf(stderr,
25 "nmi_watchdog enabled with topdown. May give wrong results.\n"
26 "Disable with echo 0 > /proc/sys/kernel/nmi_watchdog\n");
27 }