public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andi Kleen <ak@linux.intel.com>
To: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Thomas Richter <tmricht@linux.ibm.com>,
	linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org,
	brueckner@linux.vnet.ibm.com, schwidefsky@de.ibm.com,
	heiko.carstens@de.ibm.com, Jiri Olsa <jolsa@kernel.org>,
	Namhyung Kim <namhyung@kernel.org>
Subject: Re: [PATCH 4/4 v3] perf stat: Add transaction flag (-T) support for s390
Date: Mon, 25 Jun 2018 13:33:53 -0700	[thread overview]
Message-ID: <20180625203353.GC19456@tassilo.jf.intel.com> (raw)
In-Reply-To: <20180625145247.GY20477@kernel.org>

> > +bool metricgroup__has_metric(const char *metric)
> > +{
> > +	struct pmu_events_map *map = perf_pmu__find_map(NULL);
> > +	struct pmu_event *pe;
> > +	int i;
> > +
> > +	if (!map)
> > +		return false;
> > +
> > +	for (i = 0; ; i++) {
> > +		pe = &map->table[i];
> > +
> > +		if (!pe->name && !pe->metric_group && !pe->metric_name)
> > +			break;
> > +		if (!pe->metric_expr)
> > +			continue;
> > +		if (match_metric(pe->metric_group, metric) ||
> > +		    match_metric(pe->metric_name, metric))

Why both the group and the metric?

I would just match the metric_name

Otherwise it's impossible to have a group called "transaction"

With that fixed it's ok for me.

Acked-by: Andi Kleen <ak@linux.intel.com>

-Andi

  reply	other threads:[~2018-06-25 20:34 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-25 12:58 [PATCH 4/4 v3] perf stat: Add transaction flag (-T) support for s390 Thomas Richter
2018-06-25 14:52 ` Arnaldo Carvalho de Melo
2018-06-25 20:33   ` Andi Kleen [this message]
2018-06-25 21:01   ` Jiri Olsa
2018-06-25 22:11 ` Jiri Olsa

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=20180625203353.GC19456@tassilo.jf.intel.com \
    --to=ak@linux.intel.com \
    --cc=acme@kernel.org \
    --cc=brueckner@linux.vnet.ibm.com \
    --cc=heiko.carstens@de.ibm.com \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=namhyung@kernel.org \
    --cc=schwidefsky@de.ibm.com \
    --cc=tmricht@linux.ibm.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