[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Z2WRHS4CbbjTIHkQ@e129823.arm.com>
Date: Fri, 20 Dec 2024 15:45:33 +0000
From: Yeoreum Yun <yeoreum.yun@....com>
To: Peter Zijlstra <peterz@...radead.org>
Cc: mingo@...hat.com, acme@...nel.org, namhyung@...nel.org,
mark.rutland@....com, alexander.shishkin@...ux.intel.com,
jolsa@...nel.org, irogers@...gle.com, adrian.hunter@...el.com,
kan.liang@...ux.intel.com, linux-perf-users@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] events/core: fix acoount failure for event's
total_enable_time
> > It works. but what about this?
> >
> > diff --git a/kernel/events/core.c b/kernel/events/core.c
> > index 065f9188b44a..71ed8f847b04 100644
> > --- a/kernel/events/core.c
> > +++ b/kernel/events/core.c
> > @@ -2432,6 +2432,7 @@ __perf_remove_from_context(struct perf_event *event,
> > if (flags & DETACH_DEAD)
> > event->pending_disable = 1;
> > event_sched_out(event, ctx);
> > + perf_event_update_time(event);
> > if (flags & DETACH_GROUP)
> > perf_group_detach(event);
> > if (flags & DETACH_CHILD)
>
> Well, the rule is that timekeeping is tied to state change. And as you
> can see __perf_remove_from_context() violates that.
>
> Probably because someone (probably me) figured that the event would not
> be observed again after detach or something like that.
>
Ah. Thanks to let me know to think this rule.
I agree with your last suggestion.
Could I send patch with it again?
Thanks
Powered by blists - more mailing lists