lkml.org 
[lkml]   [2020]   [Jul]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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.

\
 
 \ /
  Last update: 2020-07-21 21:20    [W:0.400 / U:0.272 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site