diff options
Diffstat (limited to 'tools/perf/util/util.c')
-rw-r--r-- | tools/perf/util/util.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/tools/perf/util/util.c b/tools/perf/util/util.c index 41125e5b011e..b86744f29eef 100644 --- a/tools/perf/util/util.c +++ b/tools/perf/util/util.c | |||
@@ -506,16 +506,9 @@ const char *get_filename_for_perf_kvm(void) | |||
506 | 506 | ||
507 | int perf_event_paranoid(void) | 507 | int perf_event_paranoid(void) |
508 | { | 508 | { |
509 | char path[PATH_MAX]; | ||
510 | const char *procfs = procfs__mountpoint(); | ||
511 | int value; | 509 | int value; |
512 | 510 | ||
513 | if (!procfs) | 511 | if (sysctl__read_int("kernel/perf_event_paranoid", &value)) |
514 | return INT_MAX; | ||
515 | |||
516 | scnprintf(path, PATH_MAX, "%s/sys/kernel/perf_event_paranoid", procfs); | ||
517 | |||
518 | if (filename__read_int(path, &value)) | ||
519 | return INT_MAX; | 512 | return INT_MAX; |
520 | 513 | ||
521 | return value; | 514 | return value; |