From: "Jin, Yao" <yao.jin@linux.intel.com>
To: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Jiri Olsa <jolsa@redhat.com>,
jolsa@kernel.org, peterz@infradead.org, mingo@redhat.com,
alexander.shishkin@linux.intel.com, Linux-kernel@vger.kernel.org,
ak@linux.intel.com, kan.liang@intel.com, yao.jin@intel.com
Subject: Re: [PATCH v2] perf stat: Append to default list if use -e +event
Date: Fri, 22 Jan 2021 09:43:23 +0800 [thread overview]
Message-ID: <a15ff775-4d92-4f02-6be9-47c87d062ecd@linux.intel.com> (raw)
In-Reply-To: <20210121130225.GV12699@kernel.org>
Hi Arnaldo,
On 1/21/2021 9:02 PM, Arnaldo Carvalho de Melo wrote:
>> So if we just want to append the default list, we only need to set
>> detailed_run=1, then ideally perf-stat will print the default list.
>
>> But for now, there are no task-clock, context-switches, cpu-migrations,
>> page-faults, instructions, branches and branch-misses displayed.
>
>> root@kbl-ppc:~# ./perf stat -e cycles -d -a -- sleep 1
>>
>> Performance counter stats for 'system wide':
>>
>> 124,178,207 cycles (80.02%)
>> 6,444,490 L1-dcache-loads (80.01%)
>> 1,043,169 L1-dcache-load-misses # 16.19% of all L1-dcache accesses (80.02%)
>> 564,474 LLC-loads (80.02%)
>> 49,262 LLC-load-misses # 8.73% of all LL-cache accesses (79.92%)
>>
>> 1.001614947 seconds time elapsed
>>
>> Do we still need the '+' prefix to add the specified event on top of default
>> list? It looks current syntax should already support that feature, but just
>> need to fix some issues.
> I think we can do away with that '+' when showing the added events and
> its counts.
>
> - Arnaldo
Can you help to look at my v3 (I will post it soon)? It only has one line change but it can achieve
the goal. Another advantage is it can append the metrics to the default event list easily.
For example,
root@kbl-ppc:~# ./perf stat -M Page_Walks_Utilization -d -a -- sleep 1
Performance counter stats for 'system wide':
1,417,358 itlb_misses.walk_pending # 0.177 M/sec
# 0.05 Page_Walks_Utilization (30.44%)
1,145,481 dtlb_store_misses.walk_pending # 0.143 M/sec (30.85%)
126,098,937 cycles # 0.016 GHz (31.25%)
9,069,839 dtlb_load_misses.walk_pending # 1.132 M/sec (31.64%)
0 ept.walk_pending # 0.000 K/sec (31.61%)
8,009.41 msec cpu-clock # 7.994 CPUs utilized
300 context-switches # 0.037 K/sec
8 cpu-migrations # 0.001 K/sec
3 page-faults # 0.000 K/sec
124,456,362 cycles # 0.016 GHz (31.20%)
23,924,628 instructions # 0.19 insn per cycle (38.79%)
4,532,511 branches # 0.566 M/sec (38.39%)
650,797 branch-misses # 14.36% of all branches (38.00%)
6,332,823 L1-dcache-loads # 0.791 M/sec (37.95%)
1,056,199 L1-dcache-load-misses # 16.68% of all L1-dcache accesses (37.95%)
572,791 LLC-loads # 0.072 M/sec (30.36%)
52,025 LLC-load-misses # 9.08% of all LL-cache accesses (30.36%)
1.001966758 seconds time elapsed
It appends the metric 'Page_Walks_Utilization' to the default event list.
Anyway, if you think it's not a good solution, I'd like to change it. :)
Thanks
Jin Yao
next prev parent reply other threads:[~2021-01-22 1:45 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-04 2:18 [PATCH v2] perf stat: Append to default list if use -e +event Jin Yao
2021-01-12 10:08 ` Jiri Olsa
2021-01-18 4:54 ` Jin, Yao
2021-01-20 21:25 ` Jiri Olsa
2021-01-21 0:03 ` Arnaldo Carvalho de Melo
2021-01-21 6:08 ` Jin, Yao
2021-01-21 13:02 ` Arnaldo Carvalho de Melo
2021-01-22 1:43 ` Jin, Yao [this message]
2021-01-23 23:14 ` Jiri Olsa
2021-01-21 5:05 ` Jin, Yao
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=a15ff775-4d92-4f02-6be9-47c87d062ecd@linux.intel.com \
--to=yao.jin@linux.intel.com \
--cc=Linux-kernel@vger.kernel.org \
--cc=acme@kernel.org \
--cc=ak@linux.intel.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=jolsa@kernel.org \
--cc=jolsa@redhat.com \
--cc=kan.liang@intel.com \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=yao.jin@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox