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: <dbc6f99c-3728-3f23-9c38-a91865dbdefe@linux.intel.com>
Date:   Wed, 25 Apr 2018 10:42:27 -0400
From:   "Liang, Kan" <kan.liang@...ux.intel.com>
To:     Jiri Olsa <jolsa@...hat.com>
Cc:     acme@...nel.org, mingo@...hat.com, peterz@...radead.org,
        linux-kernel@...r.kernel.org, namhyung@...nel.org,
        ganapatrao.kulkarni@...ium.com, zhangshaokun@...ilicon.com,
        yao.jin@...ux.intel.com, will.deacon@....com, ak@...ux.intel.com,
        agustinv@...eaurora.org
Subject: Re: [V2 PATCH] perf parse-events: Specially handle uncore event alias
 in small groups



On 4/25/2018 10:23 AM, Jiri Olsa wrote:
> On Wed, Apr 25, 2018 at 06:50:18AM -0700, kan.liang@...ux.intel.com wrote:
>> From: Kan Liang <kan.liang@...ux.intel.com>
>>
>> Perf stat doesn't count the uncore event aliases from the same uncore
>> block in a group, for example:
>>
>>    perf stat -e '{unc_m_cas_count.all,unc_m_clockticks}' -a -I 1000
>>    #           time             counts unit events
>>         1.000447342      <not counted>      unc_m_cas_count.all
>>         1.000447342      <not counted>      unc_m_clockticks
>>         2.000740654      <not counted>      unc_m_cas_count.all
>>         2.000740654      <not counted>      unc_m_clockticks
>>
>> The output is very misleading. It gives a wrong impression that the
>> uncore event doesn't work.
>>
>> An uncore block could be composed by several PMUs. An uncore event alias
>> is a joint name which means the same event runs on all PMUs of a block.
>> Perf doesn't support mixed events from different PMUs in the same group.
>> It is wrong to put uncore event aliases in a big group.
>>
>> The right way is to split the big group into multiple small groups which
>> only include the events from the same PMU.
>> Only uncore event aliases from the same uncore block should be specially
>> handled here. It doesn't make sense to mix the uncore events with other
>> uncore events from different blocks or even core events in a group.
>>
>> With the patch:
>>    #           time             counts unit events
>>       1.001557653            140,833      unc_m_cas_count.all
>>       1.001557653      1,330,231,332      unc_m_clockticks
>>       2.002709483             85,007      unc_m_cas_count.all
>>       2.002709483      1,429,494,563      unc_m_clockticks
> 
> hum, I still can see the original behaviour even with the patch:
>

That's because the data_reads and clockticks are from different uncore 
blocks. The data_reads is a IMC event. The clockticks is a CBOX event.

The patch only supports the events from the same uncore blocks in group.

Thanks,
Kan


> [jolsa@...va perf]$ sudo ./perf stat -e '{data_reads,clockticks}' -a -I 1000
> #           time             counts unit events
>       1.000184929      <not counted> MiB  data_reads
>       1.000184929    <not supported>      clockticks
>       2.000552765      <not counted> MiB  data_reads
>       2.000552765    <not supported>      clockticks
>       3.000846298      <not counted> MiB  data_reads
>       3.000846298    <not supported>      clockticks
>       4.001044852      <not counted> MiB  data_reads
>       4.001044852    <not supported>      clockticks
>       5.001247131      <not counted> MiB  data_reads
>       5.001247131    <not supported>      clockticks
> ^C     5.546917060      <not counted> MiB  data_reads
>       5.546917060    <not supported>      clockticks
> 
> 
> jirka
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ