lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <AANLkTin0jv_ka9Bw0mZCeuxTWZfdLOseYdza_3e9vMi+@mail.gmail.com>
Date:	Thu, 25 Nov 2010 15:18:58 +0100
From:	Stephane Eranian <eranian@...gle.com>
To:	Peter Zijlstra <a.p.zijlstra@...llo.nl>
Cc:	Corey Ashford <cjashfor@...ux.vnet.ibm.com>,
	Paul Mackerras <paulus@...ba.org>, Ingo Molnar <mingo@...e.hu>,
	Arnaldo Carvalho de Melo <acme@...hat.com>,
	Frederic Weisbecker <fweisbec@...il.com>,
	Julia Lawall <julia@...u.dk>, Tom Zanussi <tzanussi@...il.com>,
	linux-kernel@...r.kernel.org, Matt Fleming <matt@...sole-pimps.org>
Subject: Re: [RFC PATCHv3] perf tools: add event grouping capability to "perf stat"

On Thu, Nov 25, 2010 at 3:12 PM, Peter Zijlstra <a.p.zijlstra@...llo.nl> wrote:
> On Thu, 2010-11-25 at 15:07 +0100, Stephane Eranian wrote:
>> On Thu, Nov 25, 2010 at 3:02 PM, Peter Zijlstra <a.p.zijlstra@...llo.nl> wrote:
>> > On Thu, 2010-11-25 at 14:19 +0100, Stephane Eranian wrote:
>> >
>> >> I think using PERF_SAMPLE_READ may expose a problem in the
>> >> perf.data format. To correctly parse a sample created with SAMPLE_READ,
>> >> you need to know the attr.read_format. But for that you need to know the
>> >> event which caused the sample, but for that you need the SAMPLE_ID,
>> >> and you don't know if it's there or not. In other words, there is a chicken
>> >> and egg problem.
>> >>
>> >> I think the issue is that PERF_RECORD_SAMPLE is missing a mandatory
>> >> piece of information: overflow event ID. This must a mandatory field, not
>> >> optional as it is today. It is okay when you have only one group, but we'd
>> >> like to go beyond that.
>> >
>> >
>> >
>> > I'm not sure I get it, there's both PERF_FORMAT_ID and PERF_SAMPLE_ID,
>> > so afaict there's a working combination for what you want to do.
>> >
>> Ok, I had forgotten about PERF_SAMPLE_ID. But that means that if the
>> number of groups > 1, then if you use PERF_SAMPLE_READ, you MUST
>> also use PERF_SAMPLE_ID. Otherwise you cannot get back to the event
>> that generated the sample and thus attr.read_format.
>
> perf-record already does that:
>
>        if (nr_counters > 1)
>                attr->sample_type |= PERF_SAMPLE_ID;
>
Ok, that's good.
The other thing I saw, is that perf report assumes that sample_type is the
same for all events, otherwise it dies.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ