[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180212212101.GA15817@krava>
Date: Mon, 12 Feb 2018 22:21:01 +0100
From: Jiri Olsa <jolsa@...hat.com>
To: Raghavendra Rao Ananta <rananta@...eaurora.org>
Cc: peterz@...radead.org, mingo@...hat.com, acme@...nel.org,
alexander.shishkin@...ux.intel.com, namhyung@...nel.org,
linux-kernel@...r.kernel.org, psodagud@...eaurora.org,
tsoni@...eaurora.org
Subject: Re: [PATCH] perf: Add support for creating offline events
On Mon, Feb 12, 2018 at 10:04:42PM +0100, Jiri Olsa wrote:
> On Mon, Feb 12, 2018 at 09:42:05AM -0800, Raghavendra Rao Ananta wrote:
> > Hi Jiri,
> >
> > Thank you for the response.
> >
> > Does perf tool has its own check to see if the CPU was offline during the
> > lifetime of an event? If so, it might ignore these type of events.
>
> nope, we don't check on that
>
> >
> > Initially, I tested the same using perf tool and found similar results.
> > Then I debugged further and found that the perf core was actually sending
> > data to the userspace (copy_to_user()) and the corresponding count for the
> > data. Hence, I tested this further by writing my own userspace application,
> > and I was able to read the count through this,
> > even when the CPU was made offline and back online.
> >
> > Do you think we also have to modify the perf tool accordingly?
>
> hum, I wonder what's wrong.. will check
I think the user space needs to enable the event once the
cpu gets online.. which we dont do and your app does..?
maybe we could add perf_event_attr::enable_on_online ;-)
I'll check what we can do in user space, I guess we can
monitor the cpu state and enable event accordingly
jirka
Powered by blists - more mailing lists