perf: Remove __free_event()
There is but a single caller, remove the function - we already have _free_event(), the extra indirection is nonsensical.. Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Cc: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: David Ahern <dsahern@gmail.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@google.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Vince Weaver <vincent.weaver@maine.edu> Signed-off-by: Ingo Molnar <mingo@kernel.org>
This commit is contained in:
parent
e03e7ee34f
commit
a0733e695b
|
@ -3590,7 +3590,7 @@ static void unaccount_event(struct perf_event *event)
|
|||
* 3) two matching events on the same context.
|
||||
*
|
||||
* The former two cases are handled in the allocation path (perf_event_alloc(),
|
||||
* __free_event()), the latter -- before the first perf_install_in_context().
|
||||
* _free_event()), the latter -- before the first perf_install_in_context().
|
||||
*/
|
||||
static int exclusive_event_init(struct perf_event *event)
|
||||
{
|
||||
|
@ -3665,29 +3665,6 @@ static bool exclusive_event_installable(struct perf_event *event,
|
|||
return true;
|
||||
}
|
||||
|
||||
static void __free_event(struct perf_event *event)
|
||||
{
|
||||
if (!event->parent) {
|
||||
if (event->attr.sample_type & PERF_SAMPLE_CALLCHAIN)
|
||||
put_callchain_buffers();
|
||||
}
|
||||
|
||||
perf_event_free_bpf_prog(event);
|
||||
|
||||
if (event->destroy)
|
||||
event->destroy(event);
|
||||
|
||||
if (event->ctx)
|
||||
put_ctx(event->ctx);
|
||||
|
||||
if (event->pmu) {
|
||||
exclusive_event_destroy(event);
|
||||
module_put(event->pmu->module);
|
||||
}
|
||||
|
||||
call_rcu(&event->rcu_head, free_event_rcu);
|
||||
}
|
||||
|
||||
static void _free_event(struct perf_event *event)
|
||||
{
|
||||
irq_work_sync(&event->pending);
|
||||
|
@ -3709,7 +3686,25 @@ static void _free_event(struct perf_event *event)
|
|||
if (is_cgroup_event(event))
|
||||
perf_detach_cgroup(event);
|
||||
|
||||
__free_event(event);
|
||||
if (!event->parent) {
|
||||
if (event->attr.sample_type & PERF_SAMPLE_CALLCHAIN)
|
||||
put_callchain_buffers();
|
||||
}
|
||||
|
||||
perf_event_free_bpf_prog(event);
|
||||
|
||||
if (event->destroy)
|
||||
event->destroy(event);
|
||||
|
||||
if (event->ctx)
|
||||
put_ctx(event->ctx);
|
||||
|
||||
if (event->pmu) {
|
||||
exclusive_event_destroy(event);
|
||||
module_put(event->pmu->module);
|
||||
}
|
||||
|
||||
call_rcu(&event->rcu_head, free_event_rcu);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in New Issue