summaryrefslogtreecommitdiffstats
path: root/samples/hw_breakpoint
diff options
context:
space:
mode:
authorAvi Kivity <avi@redhat.com>2011-06-29 18:42:35 +0300
committerIngo Molnar <mingo@elte.hu>2011-07-01 11:06:38 +0200
commit4dc0da86967d5463708631d02a70cfed5b104884 (patch)
treee09071a62f2457b710ff69df3be1bff39340a4c6 /samples/hw_breakpoint
parent89d6c0b5bdbb1927775584dcf532d98b3efe1477 (diff)
downloadop-kernel-dev-4dc0da86967d5463708631d02a70cfed5b104884.zip
op-kernel-dev-4dc0da86967d5463708631d02a70cfed5b104884.tar.gz
perf: Add context field to perf_event
The perf_event overflow handler does not receive any caller-derived argument, so many callers need to resort to looking up the perf_event in their local data structure. This is ugly and doesn't scale if a single callback services many perf_events. Fix by adding a context parameter to perf_event_create_kernel_counter() (and derived hardware breakpoints APIs) and storing it in the perf_event. The field can be accessed from the callback as event->overflow_handler_context. All callers are updated. Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Link: http://lkml.kernel.org/r/1309362157-6596-2-git-send-email-avi@redhat.com Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'samples/hw_breakpoint')
-rw-r--r--samples/hw_breakpoint/data_breakpoint.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/samples/hw_breakpoint/data_breakpoint.c b/samples/hw_breakpoint/data_breakpoint.c
index 7b164d3..ef7f322 100644
--- a/samples/hw_breakpoint/data_breakpoint.c
+++ b/samples/hw_breakpoint/data_breakpoint.c
@@ -60,7 +60,7 @@ static int __init hw_break_module_init(void)
attr.bp_len = HW_BREAKPOINT_LEN_4;
attr.bp_type = HW_BREAKPOINT_W | HW_BREAKPOINT_R;
- sample_hbp = register_wide_hw_breakpoint(&attr, sample_hbp_handler);
+ sample_hbp = register_wide_hw_breakpoint(&attr, sample_hbp_handler, NULL);
if (IS_ERR((void __force *)sample_hbp)) {
ret = PTR_ERR((void __force *)sample_hbp);
goto fail;
OpenPOWER on IntegriCloud