[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Thu, 8 Aug 2019 22:02:07 +0800
From: "Jin, Yao" <yao.jin@...ux.intel.com>
To: Arnaldo Carvalho de Melo <arnaldo.melo@...il.com>
Cc: jolsa@...nel.org, peterz@...radead.org, mingo@...hat.com,
alexander.shishkin@...ux.intel.com, Linux-kernel@...r.kernel.org,
ak@...ux.intel.com, kan.liang@...el.com, yao.jin@...el.com
Subject: Re: [PATCH] perf pmu-events: Fix the missing "cpu_clk_unhalted.core"
On 8/8/2019 9:56 PM, Arnaldo Carvalho de Melo wrote:
> Em Mon, Jul 29, 2019 at 03:27:55PM +0800, Jin Yao escreveu:
>> The events defined in pmu-events JSON are parsed and added into
>> perf tool. For fixed counters, we handle the encodings between
>> JSON and perf by using a static array fixed[].
>>
>> But the fixed[] has missed an important event "cpu_clk_unhalted.core".
>>
>> For example, on tremont platform,
>>
>> [root@...alhost ~]# perf stat -e cpu_clk_unhalted.core -a
>> event syntax error: 'cpu_clk_unhalted.core'
>> \___ parser error
>>
>> With this patch, the event cpu_clk_unhalted.core can be parsed.
>>
>> [root@...alhost perf]# ./perf stat -e cpu_clk_unhalted.core -a -vvv
>> ------------------------------------------------------------
>> perf_event_attr:
>> type 4
>> size 112
>> config 0x3c
>> sample_type IDENTIFIER
>> read_format TOTAL_TIME_ENABLED|TOTAL_TIME_RUNNING
>> disabled 1
>> inherit 1
>> exclude_guest 1
>> ------------------------------------------------------------
>
> Thanks, applied, next time please do not add lines starting with ---,
> prefix it with two spaces so that git am scripts don't get confused.
>
>
> - Arnaldo
>
Got it, thanks for reminding. I will be careful next time.
Thanks
Jin Yao
>> ...
>>
>> Signed-off-by: Jin Yao <yao.jin@...ux.intel.com>
>> ---
>> tools/perf/pmu-events/jevents.c | 1 +
>> 1 file changed, 1 insertion(+)
>>
>> diff --git a/tools/perf/pmu-events/jevents.c b/tools/perf/pmu-events/jevents.c
>> index 1a91a197cafb..d413761621b0 100644
>> --- a/tools/perf/pmu-events/jevents.c
>> +++ b/tools/perf/pmu-events/jevents.c
>> @@ -453,6 +453,7 @@ static struct fixed {
>> { "inst_retired.any_p", "event=0xc0" },
>> { "cpu_clk_unhalted.ref", "event=0x0,umask=0x03" },
>> { "cpu_clk_unhalted.thread", "event=0x3c" },
>> + { "cpu_clk_unhalted.core", "event=0x3c" },
>> { "cpu_clk_unhalted.thread_any", "event=0x3c,any=1" },
>> { NULL, NULL},
>> };
>> --
>> 2.17.1
>
Powered by blists - more mailing lists