[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ZNNSBZIQERc/nZXQ@dmi-pnp-i7>
Date: Wed, 9 Aug 2023 16:44:53 +0800
From: Dapeng Mi <dapeng1.mi@...ux.intel.com>
To: Peter Zijlstra <peterz@...radead.org>
Cc: Sean Christopherson <seanjc@...gle.com>,
Paolo Bonzini <pbonzini@...hat.com>,
Arnaldo Carvalho de Melo <acme@...nel.org>,
Kan Liang <kan.liang@...ux.intel.com>,
Like Xu <likexu@...cent.com>,
Mark Rutland <mark.rutland@....com>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
Jiri Olsa <jolsa@...nel.org>,
Namhyung Kim <namhyung@...nel.org>,
Ian Rogers <irogers@...gle.com>,
Adrian Hunter <adrian.hunter@...el.com>, kvm@...r.kernel.org,
linux-perf-users@...r.kernel.org, linux-kernel@...r.kernel.org,
Zhenyu Wang <zhenyuw@...ux.intel.com>,
Zhang Xiong <xiong.y.zhang@...el.com>,
Lv Zhiyuan <zhiyuan.lv@...el.com>,
Yang Weijiang <weijiang.yang@...el.com>,
Dapeng Mi <dapeng1.mi@...el.com>, Marc Zyngier <maz@...nel.org>
Subject: Re: [PATCH RFV v2 05/13] perf/core: Add function
perf_event_create_group_kernel_counters()
On Tue, Aug 08, 2023 at 12:21:27PM +0200, Peter Zijlstra wrote:
> Date: Tue, 8 Aug 2023 12:21:27 +0200
> From: Peter Zijlstra <peterz@...radead.org>
> Subject: Re: [PATCH RFV v2 05/13] perf/core: Add function
> perf_event_create_group_kernel_counters()
>
> On Tue, Aug 08, 2023 at 02:31:03PM +0800, Dapeng Mi wrote:
> > diff --git a/kernel/events/core.c b/kernel/events/core.c
> > index 15eb82d1a010..1877171e9590 100644
> > --- a/kernel/events/core.c
> > +++ b/kernel/events/core.c
> > @@ -12762,11 +12762,34 @@ perf_event_create_kernel_counter(struct perf_event_attr *attr, int cpu,
> > struct task_struct *task,
> > perf_overflow_handler_t overflow_handler,
> > void *context)
> > +{
> > + return perf_event_create_group_kernel_counters(attr, cpu, task,
> > + NULL, overflow_handler, context);
> > +}
> > +EXPORT_SYMBOL_GPL(perf_event_create_kernel_counter);
> > +
> > +/**
> > + * perf_event_create_group_kernel_counters
> > + *
> > + * @attr: attributes of the counter to create
> > + * @cpu: cpu in which the counter is bound
> > + * @task: task to profile (NULL for percpu)
> > + * @group_leader: the group leader event of the created event
> > + * @overflow_handler: callback to trigger when we hit the event
> > + * @context: context data could be used in overflow_handler callback
> > + */
> > +struct perf_event *
> > +perf_event_create_group_kernel_counters(struct perf_event_attr *attr,
> > + int cpu, struct task_struct *task,
> > + struct perf_event *group_leader,
> > + perf_overflow_handler_t overflow_handler,
> > + void *context)
>
> I would much prefer if you just add the argument to
> perf_event_create_kernel_counter(), there aren't *that* many users.
Sure. Thanks.
--
Thanks,
Dapeng Mi
Powered by blists - more mailing lists