lkml.org 
[lkml]   [2018]   [Jun]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 4/4 v3] perf stat: Add transaction flag (-T) support for s390
> > +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

\
 
 \ /
  Last update: 2018-06-25 22:34    [W:2.107 / U:0.752 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site