perf/x86/ibs: Check syscall attribute flags
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. Cc: <stable@vger.kernel.org> v3.5.. 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>
This commit is contained in:
parent
35534b201c
commit
bad9ac2d7f
2 changed files with 14 additions and 0 deletions
|
@ -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:
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue