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]
Date:   Mon, 28 Aug 2017 12:27:57 -0700
From:   Stephane Eranian <eranian@...gle.com>
To:     Jiri Olsa <jolsa@...hat.com>
Cc:     Andi Kleen <andi@...stfloor.org>,
        LKML <linux-kernel@...r.kernel.org>,
        Arnaldo Carvalho de Melo <acme@...hat.com>,
        Peter Zijlstra <peterz@...radead.org>,
        "mingo@...e.hu" <mingo@...e.hu>, "Liang, Kan" <kan.liang@...el.com>
Subject: Re: [PATCH] perf record: enable multiplexing scaling via -R

Hi,

On Tue, Aug 22, 2017 at 12:24 AM, Stephane Eranian <eranian@...gle.com> wrote:
> On Tue, Aug 22, 2017 at 12:03 AM, Jiri Olsa <jolsa@...hat.com> wrote:
>>
>> On Mon, Aug 21, 2017 at 06:25:45PM -0700, Andi Kleen wrote:
>> > On Mon, Aug 21, 2017 at 05:13:29PM -0700, Stephane Eranian wrote:
>> > > On Mon, Aug 21, 2017 at 4:02 PM, Andi Kleen <andi@...stfloor.org> wrote:
>> > > >
>> > > > Stephane Eranian <eranian@...gle.com> writes:
>> > > > >
>> > > > > To activate, the user must use:
>> > > > > $ perf record -a -R ....
>> > > >
>> > > > I don't know why you're overloading the existing raw mode?
>> > > >
>> > > > It has nothing to do with that.
>> > > >
>> > > I explained this in the changelog. So that is does not change any of
>> > > the processing in perf report, i.e., no faced with data it does not
>> > > know how to handle.
>> > > Also trying to avoid adding yet another option.
>> >
>> > But raw is needed for some of the non Intel PMUs. I believe it's
>> > the only way to use AMD IBS. You may as well break their usage.
>> >
>> > You'll need a new option.
>>
>> I agree with Andi, I don't think we should mix those,
>> we should have a way to switch it on/off
>>
> Ok, then. I will add an option to turn this on. This is a useful mode
> for many advanced users.
>
I looked at the perf source code again over the weekend. It seems
there is no need for a new patch.
Whatever is needed to capture time_running/time_enabled is already
there. The kernel can only
record the timings when PERF_SAMPLE_READ is set. The way to enable
this with current perf
is to use the S modified on events:

$ perf record -e cycles:S .....
That captures the timings, though they are in a read struct inside the
record. But this is exactly
what my earlier patch was doing.
The modifier also works with the more developed syntax:
$ perf record -e cpu/event=0xc0,umask=1/S  ....

So I think we are good to go. to capture multiplexing scaling factor
when sampling simply use the S
modifier.
But to my surprise, newer kernels are not happy with the cmdline:
$ perf record -e cycles:S  noploop 1
Error:
The sys_perf_event_open() syscall returned with 22 (Invalid argument)
for event (cycles:Su).
/bin/dmesg may provide additional information.
No CONFIG_PERF_EVENTS=y kernel support configured?

That looks like a bug to me. Why would that not work?
I have not yet had the time to look into this. Jiri?

Thanks.




>>
>> jirka

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ