From 54fbad54ebcde9db9c7459e9e379f2350c25e1f1 Mon Sep 17 00:00:00 2001 From: Jiri Olsa Date: Wed, 24 Feb 2016 09:46:42 +0100 Subject: perf mem record: Check for memory events support Check if current kernel support available memory events and display the status within -e list option: $ perf mem record -e list ldlat-loads : available ldlat-stores : available Signed-off-by: Jiri Olsa Tested-by: Arnaldo Carvalho de Melo Cc: Andi Kleen Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lkml.kernel.org/r/1456303616-26926-2-git-send-email-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/util/mem-events.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'tools/perf/util/mem-events.h') diff --git a/tools/perf/util/mem-events.h b/tools/perf/util/mem-events.h index 2995bae6ac33..75c1660bda62 100644 --- a/tools/perf/util/mem-events.h +++ b/tools/perf/util/mem-events.h @@ -5,8 +5,10 @@ struct perf_mem_event { bool record; + bool supported; const char *tag; const char *name; + const char *sysfs_name; }; enum { @@ -18,5 +20,6 @@ enum { extern struct perf_mem_event perf_mem_events[PERF_MEM_EVENTS__MAX]; int perf_mem_events__parse(const char *str); +int perf_mem_events__init(void); #endif /* __PERF_MEM_EVENTS_H */ -- cgit v1.2.3