From: Jiri Olsa <jolsa@redhat.com>
To: Andi Kleen <ak@linux.intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>,
Arnaldo Carvalho de Melo <acme@kernel.org>,
lkml <linux-kernel@vger.kernel.org>,
Ingo Molnar <mingo@kernel.org>,
Namhyung Kim <namhyung@kernel.org>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
Michael Petlan <mpetlan@redhat.com>,
Joe Mario <jmario@redhat.com>, Kajol Jain <kjain@linux.ibm.com>
Subject: Re: [RFC 0/3] perf tools: Add support for used defined metric
Date: Thu, 12 Dec 2019 10:37:00 +0100 [thread overview]
Message-ID: <20191212093700.GD22550@krava> (raw)
In-Reply-To: <20191211230126.GC862919@tassilo.jf.intel.com>
On Wed, Dec 11, 2019 at 03:01:26PM -0800, Andi Kleen wrote:
> On Wed, Dec 11, 2019 at 11:47:57PM +0100, Jiri Olsa wrote:
> > hi,
> > Joe asked for possibility to add user defined metrics. Given that
> > we already have metrics support, I added --metric option that allows
> > to specify metric on the command line, like:
> >
> > # perf stat --metric 'DECODED_ICACHE_UOPS% = 100 * (idq.dsb_uops / \
> > (idq.ms_uops + idq.mite_uops + idq.dsb_uops + lsd.uops))' ...
> >
> > The code facilitates the current metric code, and I was surprised
> > how easy it was, so I'm not sure I omitted something ;-)
>
> There are some asserts you can hit, like for too many events.
>
> Also some of the syntax (e.g. using @ instead of / and escapes) are
> not super user friendly.
>
> Other than that it should be ok.
>
> Of course it would be better to put it into a file,
> and then support comments etc.
should be also reasonable easy, redirecting the input for lex
>
> I've been considering some extensions to perf to support @file
> reading with comment support.
>
> Right now there are some very odd bugs when you do that, lie
>
> -e 'event,<newline>
> event,<newline>
> event...'
>
> adds the newline to the event name, which breaks the output formats.
should be possible to ignore new lines at some point no?
jirka
prev parent reply other threads:[~2019-12-12 9:37 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-11 22:47 [RFC 0/3] perf tools: Add support for used defined metric Jiri Olsa
2019-12-11 22:47 ` [PATCH 1/3] perf tools: Factor metric addition into add_metric function Jiri Olsa
2019-12-11 22:47 ` [PATCH 2/3] perf tools: Factor metric setup code into metricgroup__setup function Jiri Olsa
2019-12-11 22:48 ` [PATCH 3/3] perf stat: Add --metric option Jiri Olsa
2019-12-11 23:02 ` Andi Kleen
2019-12-12 9:41 ` Jiri Olsa
2019-12-11 23:01 ` [RFC 0/3] perf tools: Add support for used defined metric Andi Kleen
2019-12-12 9:37 ` Jiri Olsa [this message]
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=20191212093700.GD22550@krava \
--to=jolsa@redhat.com \
--cc=a.p.zijlstra@chello.nl \
--cc=acme@kernel.org \
--cc=ak@linux.intel.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=jmario@redhat.com \
--cc=jolsa@kernel.org \
--cc=kjain@linux.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=mpetlan@redhat.com \
--cc=namhyung@kernel.org \
/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