diff options
author | Peter Zijlstra <a.p.zijlstra@chello.nl> | 2010-05-21 09:11:34 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2010-06-09 05:12:33 -0400 |
commit | ecc55f84b2e9741f29daa787ded93986df6cbe17 (patch) | |
tree | 9da1012eb14faf8133e7e432b0da581ed55de6ee /kernel/perf_event.c | |
parent | e768aee89c687a50e6a2110e30c5cae1fbf0d2da (diff) |
perf, trace: Inline perf_swevent_put_recursion_context()
Inline perf_swevent_put_recursion_context into perf_tp_event(), this
shrinks the per trace template code footprint and saves a function
call.
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <new-submission>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/perf_event.c')
-rw-r--r-- | kernel/perf_event.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/kernel/perf_event.c b/kernel/perf_event.c index ff86c558af4c..4bd3b597bcca 100644 --- a/kernel/perf_event.c +++ b/kernel/perf_event.c | |||
@@ -4213,14 +4213,12 @@ int perf_swevent_get_recursion_context(void) | |||
4213 | } | 4213 | } |
4214 | EXPORT_SYMBOL_GPL(perf_swevent_get_recursion_context); | 4214 | EXPORT_SYMBOL_GPL(perf_swevent_get_recursion_context); |
4215 | 4215 | ||
4216 | void perf_swevent_put_recursion_context(int rctx) | 4216 | void inline perf_swevent_put_recursion_context(int rctx) |
4217 | { | 4217 | { |
4218 | struct perf_cpu_context *cpuctx = &__get_cpu_var(perf_cpu_context); | 4218 | struct perf_cpu_context *cpuctx = &__get_cpu_var(perf_cpu_context); |
4219 | barrier(); | 4219 | barrier(); |
4220 | cpuctx->recursion[rctx]--; | 4220 | cpuctx->recursion[rctx]--; |
4221 | } | 4221 | } |
4222 | EXPORT_SYMBOL_GPL(perf_swevent_put_recursion_context); | ||
4223 | |||
4224 | 4222 | ||
4225 | void __perf_sw_event(u32 event_id, u64 nr, int nmi, | 4223 | void __perf_sw_event(u32 event_id, u64 nr, int nmi, |
4226 | struct pt_regs *regs, u64 addr) | 4224 | struct pt_regs *regs, u64 addr) |
@@ -4601,7 +4599,7 @@ static int perf_tp_event_match(struct perf_event *event, | |||
4601 | } | 4599 | } |
4602 | 4600 | ||
4603 | void perf_tp_event(u64 addr, u64 count, void *record, int entry_size, | 4601 | void perf_tp_event(u64 addr, u64 count, void *record, int entry_size, |
4604 | struct pt_regs *regs, struct hlist_head *head) | 4602 | struct pt_regs *regs, struct hlist_head *head, int rctx) |
4605 | { | 4603 | { |
4606 | struct perf_sample_data data; | 4604 | struct perf_sample_data data; |
4607 | struct perf_event *event; | 4605 | struct perf_event *event; |
@@ -4621,6 +4619,8 @@ void perf_tp_event(u64 addr, u64 count, void *record, int entry_size, | |||
4621 | perf_swevent_add(event, count, 1, &data, regs); | 4619 | perf_swevent_add(event, count, 1, &data, regs); |
4622 | } | 4620 | } |
4623 | rcu_read_unlock(); | 4621 | rcu_read_unlock(); |
4622 | |||
4623 | perf_swevent_put_recursion_context(rctx); | ||
4624 | } | 4624 | } |
4625 | EXPORT_SYMBOL_GPL(perf_tp_event); | 4625 | EXPORT_SYMBOL_GPL(perf_tp_event); |
4626 | 4626 | ||