[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200721191811.GH10769@hirez.programming.kicks-ass.net>
Date: Tue, 21 Jul 2020 21:18:11 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: "Liang, Kan" <kan.liang@...ux.intel.com>
Cc: acme@...hat.com, mingo@...nel.org, linux-kernel@...r.kernel.org,
jolsa@...nel.org, eranian@...gle.com,
alexander.shishkin@...ux.intel.com, ak@...ux.intel.com
Subject: Re: [PATCH V6 11/14] perf/x86/intel: Disable sample-read the slots
and metrics events
On Tue, Jul 21, 2020 at 12:07:29PM -0400, Liang, Kan wrote:
> I'm trying to produce the bug mentioned above, but I'm not sure under what
> situation, the core code will 'promote' the sibling metric events?
Create an event group:
fd = sys_perf_event_open();
fd1 = sys_perf_event_open(.group_fd = fd);
...
then kill the group leader:
close(fd);
Then the sibling events: fdN, should get promoted. Ideally try and use
fd1 in a read or so after this.
> I tried the suggested code below. It works well for the sample-read case.
> Perf tool errors out as expected.
I'm not sure you can create that case with perf-tool, it's a bit of a
daft thing to do, so you'll have to write a custom program.
Powered by blists - more mailing lists