mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <arnaldo.melo@gmail.com>
To: John Garry <john.garry@huawei.com>, Jiri Olsa <jolsa@kernel.org>,
	Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: 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>, Andi Kleen <ak@linux.intel.com>,
	Kajol Jain <kjain@linux.ibm.com>,
	"liuqi (BA)" <liuqi115@huawei.com>,
	Guangbin Huang <huangguangbin2@huawei.com>,
	Zhangshaokun <zhangshaokun@hisilicon.com>,
	"irogers@google.com" <irogers@google.com>
Subject: Re: [PATCHv3 0/4] perf tools: Add support for user defined metric
Date: Tue, 25 Jan 2022 09:41:49 -0300	[thread overview]
Message-ID: <0DF6E63D-C359-4D81-8F87-A64D30D75BCA@gmail.com> (raw)
In-Reply-To: <2e2da73a-7085-b488-4764-705adbff70cc@huawei.com>



On January 25, 2022 9:34:19 AM GMT-03:00, John Garry <john.garry@huawei.com> wrote:
>On 11/05/2020 21:53, Jiri Olsa wrote:
>
>+
>
>Hi jirka,
>
>Did you a plan to continue to work? I don't think that this support was 
>ever merged.
>
>We have a requirement to be able to tune parameters of metrics, and 
>support here seems suitable.

John, 


Have you tried to apply that series to see if it still applies?

- Arnaldo

>
>Thanks,
>John
>
>> hi,
>> Joe asked for possibility to add user defined metrics. Given that
>> we already have metrics support, I added --metrics-file option that
>> allows to specify custom metrics.
>> 
>>    $ cat metrics
>>    # IPC
>>    mine1 = instructions / cycles;
>>    /* DECODED_ICACHE_UOPS% */
>>    mine2 = 100 * (idq.dsb_uops / \ (idq.ms_uops + idq.mite_uops + idq.dsb_uops + lsd.uops));
>> 
>>    $ sudo perf stat --metrics-file ./metrics -M mine1,mine2 --metric-only -a -I 1000
>>    #           time       insn per cycle                mine1                mine2
>>         1.000536263                0.71                   0.7                 41.4
>>         2.002069025                0.31                   0.3                 14.1
>>         3.003427684                0.27                   0.3                 14.8
>>         4.004807132                0.25                   0.2                 12.1
>>    ...
>> 
>> v3 changes:
>>    - added doc for metrics file in perf stat man page
>>    - reporting error line number now
>>    - changed '#' style comment to C way with '//'
>> 
>> v2 changes:
>>    - add new --metrics-file option
>>    - rebased on current perf/core expression bison/flex enhancements
>> 
>> Also available in:
>>    git://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git
>>    perf/metric
>> 
>> thanks,
>> jirka
>> 
>> 
>> ---
>> Jiri Olsa (4):
>>        perf expr: Add parsing support for multiple expressions
>>        perf expr: Allow comments in custom metric file
>>        perf stat: Add --metrics-file option
>>        perf expr: Report line number with error
>> 
>>   tools/perf/Documentation/perf-stat.txt | 77 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>>   tools/perf/builtin-stat.c              |  7 +++++--
>>   tools/perf/tests/expr.c                | 18 ++++++++++++++++++
>>   tools/perf/util/expr.c                 |  6 ++++++
>>   tools/perf/util/expr.h                 | 21 +++++++++++++++++++--
>>   tools/perf/util/expr.l                 | 34 ++++++++++++++++++++++++++++++++++
>>   tools/perf/util/expr.y                 | 21 +++++++++++++++++----
>>   tools/perf/util/metricgroup.c          | 70 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-------
>>   tools/perf/util/metricgroup.h          |  3 ++-
>>   tools/perf/util/stat.h                 |  1 +
>>   10 files changed, 242 insertions(+), 16 deletions(-)
>> 
>> .
>> 
>

  reply	other threads:[~2022-01-25 12:46 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-11 20:53 Jiri Olsa
2020-05-11 20:53 ` [PATCH 1/4] perf expr: Add parsing support for multiple expressions Jiri Olsa
2020-05-13  6:50   ` Ian Rogers
2020-05-13 11:25     ` Jiri Olsa
2020-05-11 20:53 ` [PATCH 2/4] perf expr: Allow comments in custom metric file Jiri Olsa
2020-05-11 20:53 ` [PATCH 3/4] perf stat: Add --metrics-file option Jiri Olsa
2020-05-13  7:04   ` Ian Rogers
2020-05-13 11:33     ` Jiri Olsa
2020-05-14  3:41       ` Ian Rogers
2020-05-11 20:53 ` [PATCH 4/4] perf expr: Report line number with error Jiri Olsa
2020-05-13  7:09   ` Ian Rogers
2020-05-13 11:34     ` Jiri Olsa
2020-05-13 14:08       ` Arnaldo Carvalho de Melo
2020-05-13 14:46         ` Jiri Olsa
2020-05-13 15:14           ` Arnaldo Carvalho de Melo
2022-01-25 12:34 ` [PATCHv3 0/4] perf tools: Add support for user defined metric John Garry
2022-01-25 12:41   ` Arnaldo Carvalho de Melo [this message]
2022-01-25 12:51     ` John Garry

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=0DF6E63D-C359-4D81-8F87-A64D30D75BCA@gmail.com \
    --to=arnaldo.melo@gmail.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=acme@kernel.org \
    --cc=ak@linux.intel.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=huangguangbin2@huawei.com \
    --cc=irogers@google.com \
    --cc=jmario@redhat.com \
    --cc=john.garry@huawei.com \
    --cc=jolsa@kernel.org \
    --cc=kjain@linux.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=liuqi115@huawei.com \
    --cc=mingo@kernel.org \
    --cc=mpetlan@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=zhangshaokun@hisilicon.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

all inboxes | Powered by JetHome®