diff options
author | Robert Richter <robert.richter@amd.com> | 2012-07-25 19:12:45 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-10-02 10:39:25 -0700 |
commit | a7286d61084143f84267380bfb540c8ab9d4a2d7 (patch) | |
tree | 92a009c20506889c70a1e380c7dbd459af2d80a9 /include/linux/perf_event.h | |
parent | 78dc73459b6368ed7c2dedb7ea273f33d87fac2a (diff) |
perf/x86/ibs: Check syscall attribute flags
commit bad9ac2d7f878a31cf1ae8c1ee3768077d222bcb upstream.
Current implementation simply ignores attribute flags. Thus, there is
no notification to userland of unsupported features. Check syscall's
attribute flags to let userland know if a feature is supported by the
kernel. This is also needed to distinguish between future kernels what
might support a feature.
Signed-off-by: Robert Richter <robert.richter@amd.com>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/20120910093018.GO8285@erda.amd.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/perf_event.h')
-rw-r--r-- | include/linux/perf_event.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h index b541bdf7ff3c..c3c98a6d1c91 100644 --- a/include/linux/perf_event.h +++ b/include/linux/perf_event.h @@ -274,6 +274,8 @@ struct perf_event_attr { __u64 branch_sample_type; /* enum branch_sample_type */ }; +#define perf_flags(attr) (*(&(attr)->read_format + 1)) + /* * Ioctls that can be done on a perf event fd: */ |