[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20130815140633.GF19750@two.firstfloor.org>
Date: Thu, 15 Aug 2013 16:06:33 +0200
From: Andi Kleen <andi@...stfloor.org>
To: Arnaldo Carvalho de Melo <acme@...stprotocols.net>
Cc: Andi Kleen <andi@...stfloor.org>, mingo@...nel.org,
peterz@...radead.org, linux-kernel@...r.kernel.org,
Andi Kleen <ak@...ux.intel.com>
Subject: Re: [PATCH 4/4] perf, tools: Add perf stat --transaction v3
> > +/* Default events used for perf stat -T */
> > +static const char * const transaction_attrs[] = {
> > + "task-clock",
> > + "{"
> > + "instructions,"
> > + "cycles,"
> > + "cpu/cycles-t/,"
> > + "cpu/tx-start/,"
> > + "cpu/el-start/,"
> > + "cpu/cycles-ct/"
> > + "}"
> > +};
> > +
> > +/* More limited version when the CPU does not have all events. */
> > +static const char * const transaction_limited_attrs[] = {
> > + "task-clock",
> > + "{"
> > + "instructions,"
> > + "cycles,"
> > + "cpu/cycles-t/,"
> > + "cpu/tx-start/"
> > + "}"
> > +};
> > +
> > +/* must match the transaction_attrs above */
>
> Match in what way? It kinda matches the first one (transaction_attrs):
The second is just the beginning of the first.
The { } don't count for matches.
For the limited run the comparisons of the elements that are not there
fail.
>
> enum {
> T_TASK_CLOCK, == "task-clock",
> T_INSTRUCTIONS, == "instructions,"
> T_CYCLES, == "cycles,"
> T_CYCLES_IN_TX, ~= "cpu/cycles-t/,"
> T_TRANSACTION_START, != "cpu/tx-start/,"
> T_ELISION_START, ~= "cpu/el-start/,"
> T_CYCLES_IN_TX_CP, != "cpu/cycles-ct/"
> };
I did a quick test of the fallback path by manually disabling the events,
and it seemed to work, but it's really for POWER based on Michael E's feedback.
>
> Also the enum numbers won't match the array positions due to the '{'
> grouping (?) entries, so, without looking further, how can this match?
> Reading on...
The match is on the result array. The results don't contain the { }
as individual elements.
Anyways I use this option pretty heavily and the results are good
to my knowledge.
-Andi
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists