From: Jiri Olsa <jolsa@redhat.com>
To: "Jin, Yao" <yao.jin@linux.intel.com>
Cc: acme@kernel.org, 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: Wed, 20 Jan 2021 22:25:53 +0100 [thread overview]
Message-ID: <20210120212553.GA1798087@krava> (raw)
In-Reply-To: <64dba2a3-0bf2-3af3-6f54-6e200840017d@linux.intel.com>
On Mon, Jan 18, 2021 at 12:54:37PM +0800, Jin, Yao wrote:
> 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@kbl-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@kbl-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@linux.intel.com>
> >
>
> Printing '+' prefix is the original behavior.
>
> Without this patch,
>
> root@kbl-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.
hm, originaly there's no purpose for the '+', right?
it seems it's more like bug then anything else
you added function to the '+' to add default events to specified event,
which I think is good idea, but I don't think we should display the
extra '+' in output
thanks,
jirka
next prev parent reply other threads:[~2021-01-21 2:40 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 [this message]
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
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=20210120212553.GA1798087@krava \
--to=jolsa@redhat.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=kan.liang@intel.com \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=yao.jin@intel.com \
--cc=yao.jin@linux.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