linux/tools/perf/arch/x86/util/group.c
<<
>>
Prefs
   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 */
   9bool 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
  22void 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}
  28