[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <64dba2a3-0bf2-3af3-6f54-6e200840017d@linux.intel.com>
Date: Mon, 18 Jan 2021 12:54:37 +0800
From: "Jin, Yao" <yao.jin@...ux.intel.com>
To: Jiri Olsa <jolsa@...hat.com>
Cc: acme@...nel.org, 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 v2] perf stat: Append to default list if use -e +event
Hi Jiri,
On 1/12/2021 6:08 PM, Jiri Olsa wrote:
> On Mon, Jan 04, 2021 at 10:18:37AM +0800, Jin Yao wrote:
>> The default event list includes the most common events which are widely
>> used by users. But with -e option, the current perf only counts the events
>> assigned by -e option. Users may want to collect some extra events with
>> the default list. For this case, users have to manually add all the events
>> from the default list. It's inconvenient. Also, users may don't know how to
>> get the default list.
>>
>> Now it supports a simple syntax: -e +event
>>
>> The prefix '+' tells perf to append this event (or event list) to default
>> event list.
>>
>> Before:
>>
>> root@...-ppc:~# ./perf stat -e power/energy-pkg/ -a -- sleep 1
>>
>> Performance counter stats for 'system wide':
>>
>> 2.04 Joules power/energy-pkg/
>>
>> 1.000863884 seconds time elapsed
>>
>> After:
>>
>> root@...-ppc:~# ./perf stat -e +power/energy-pkg/ -a -- sleep 1
>>
>> Performance counter stats for 'system wide':
>>
>> 2.11 Joules +power/energy-pkg/ # 0.000 K/sec
>
> I dont think we should print the extra '+' prefix
>
> jirka
>
>> 8,007.17 msec cpu-clock # 7.993 CPUs utilized
>> 125 context-switches # 0.016 K/sec
>> 8 cpu-migrations # 0.001 K/sec
>> 2 page-faults # 0.000 K/sec
>> 8,520,084 cycles # 0.001 GHz
>> 2,808,302 instructions # 0.33 insn per cycle
>> 555,427 branches # 0.069 M/sec
>> 59,005 branch-misses # 10.62% of all branches
>>
>> 1.001832003 seconds time elapsed
>>
>> Signed-off-by: Jin Yao <yao.jin@...ux.intel.com>
>
Printing '+' prefix is the original behavior.
Without this patch,
root@...-ppc:# ./perf stat -e +power/energy-pkg/ -a -- sleep 1
Performance counter stats for 'system wide':
2.02 Joules +power/energy-pkg/
1.000859434 seconds time elapsed
The '+' prefix is printed. So I finally decide not to remove the '+' prefix in order to keep
original behavior.
Thanks
Jin Yao
Powered by blists - more mailing lists