Re: [RFC PATCH 3/3] perf report: add --spe options for arm-spe

From: Tan Xiaojun
Date: Wed Aug 21 2019 - 21:45:07 EST


On 2019/8/21 20:38, James Clark wrote:
> Hi,
>
> I also had a look at this and had a question about the --spe option.
> It seems that whatever options I give it, the output is the same:
>
> perf report
> And
> perf report --spe=t
>
> Both give the same result:
>
> # Samples: 4 of event 'llc-miss'
> # Event count (approx.): 4
> #
> # Children Self Command Shared Object Symbol
> # ........ ........ ....... ................. ..........................
> #
> ...
> # Samples: 0 of event 'tlb-miss'
> # Event count (approx.): 0
> #
> # Children Self Command Shared Object Symbol
> # ........ ........ ....... ............. ......
> #
>
> # Samples: 83 of event 'branch-miss'
> # Event count (approx.): 83
> #
> # Children Self Command Shared Object Symbol
> # ........ ........ ....... ................. .........................
> #
> ...
>
> I would have expected it to not include the branch and LLC sections for the second
> command with --spe=t.
>

Hi,

Sorry, this should be a bug in my code.

> And that leads me to another point. Does it make sense to have this option as a post
> processing step? SPE already has support for filtering events at collection time with
> the PMSFCR_EL1 register.
>
> Should we try to make the interface more like PEBS, where you specify which events you
> are interested in doing precise tracing on like this?
>
> perf record -e branch-misses:pp
>
> And then perf could use the modifier to configure SPE so that it only records branch
> misses? The benefits of this would be keeping the user interface for precise tracing
> similar between platforms.
>

Good suggestion. And I need to spend some time thinking about how to implement it.

Thank you for your reply.
Xiaojun.

> Thanks
> James
>
> On 02/08/2019 10:40, Tan Xiaojun wrote:
>> The previous patch added support in "perf report" for some arm-spe
>> events(llc-miss, tlb-miss, branch-miss). This patch adds their help
>> instructions.
>>
>> Signed-off-by: Tan Xiaojun <tanxiaojun@xxxxxxxxxx>
>> ---
>> tools/perf/Documentation/perf-report.txt | 9 +++++++++
>> 1 file changed, 9 insertions(+)
>>
>> diff --git a/tools/perf/Documentation/perf-report.txt b/tools/perf/Documentation/perf-report.txt
>> index 987261d..d998d4b 100644
>> --- a/tools/perf/Documentation/perf-report.txt
>> +++ b/tools/perf/Documentation/perf-report.txt
>> @@ -445,6 +445,15 @@ include::itrace.txt[]
>>
>> To disable decoding entirely, use --no-itrace.
>>
>> +--spe::
>> + Options for decoding arm-spe tracing data. The options are:
>> +
>> + l synthesize llc miss events
>> + t synthesize tlb miss events
>> + b synthesize branch miss events
>> +
>> + The default is all events i.e. the same as --spe=ltb
>> +
>> --full-source-path::
>> Show the full path for source files for srcline output.
>>
>>