diff options
Diffstat (limited to 'kernel/perf_event.c')
-rw-r--r-- | kernel/perf_event.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/kernel/perf_event.c b/kernel/perf_event.c index 359d7f690c2b..45b4b6e55891 100644 --- a/kernel/perf_event.c +++ b/kernel/perf_event.c | |||
@@ -4318,9 +4318,8 @@ static const struct pmu perf_ops_task_clock = { | |||
4318 | #ifdef CONFIG_EVENT_TRACING | 4318 | #ifdef CONFIG_EVENT_TRACING |
4319 | 4319 | ||
4320 | void perf_tp_event(int event_id, u64 addr, u64 count, void *record, | 4320 | void perf_tp_event(int event_id, u64 addr, u64 count, void *record, |
4321 | int entry_size) | 4321 | int entry_size, struct pt_regs *regs) |
4322 | { | 4322 | { |
4323 | struct pt_regs *regs = get_irq_regs(); | ||
4324 | struct perf_sample_data data; | 4323 | struct perf_sample_data data; |
4325 | struct perf_raw_record raw = { | 4324 | struct perf_raw_record raw = { |
4326 | .size = entry_size, | 4325 | .size = entry_size, |
@@ -4330,12 +4329,9 @@ void perf_tp_event(int event_id, u64 addr, u64 count, void *record, | |||
4330 | perf_sample_data_init(&data, addr); | 4329 | perf_sample_data_init(&data, addr); |
4331 | data.raw = &raw; | 4330 | data.raw = &raw; |
4332 | 4331 | ||
4333 | if (!regs) | ||
4334 | regs = task_pt_regs(current); | ||
4335 | |||
4336 | /* Trace events already protected against recursion */ | 4332 | /* Trace events already protected against recursion */ |
4337 | do_perf_sw_event(PERF_TYPE_TRACEPOINT, event_id, count, 1, | 4333 | do_perf_sw_event(PERF_TYPE_TRACEPOINT, event_id, count, 1, |
4338 | &data, regs); | 4334 | &data, regs); |
4339 | } | 4335 | } |
4340 | EXPORT_SYMBOL_GPL(perf_tp_event); | 4336 | EXPORT_SYMBOL_GPL(perf_tp_event); |
4341 | 4337 | ||