From: Andi Kleen <andi@firstfloor.org>
To: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Cc: Andi Kleen <andi@firstfloor.org>,
mingo@kernel.org, peterz@infradead.org,
linux-kernel@vger.kernel.org, Andi Kleen <ak@linux.intel.com>
Subject: Re: [PATCH 4/4] perf, tools: Add perf stat --transaction v3
Date: Thu, 15 Aug 2013 16:06:33 +0200 [thread overview]
Message-ID: <20130815140633.GF19750@two.firstfloor.org> (raw)
In-Reply-To: <20130815132637.GE1861@ghostprotocols.net>
> > +/* 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
next prev parent reply other threads:[~2013-08-15 14:06 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-14 18:34 perf, x86: Add parts of the remaining haswell PMU functionality v2 Andi Kleen
2013-08-14 18:34 ` [PATCH 1/4] perf, x86: Avoid checkpointed counters causing excessive TSX aborts v4 Andi Kleen
2013-08-14 18:34 ` [PATCH 2/4] perf, x86: Report TSX transaction abort cost as weight v2 Andi Kleen
2013-08-14 18:34 ` [PATCH 3/4] perf, x86: Add Haswell TSX event aliases v6 Andi Kleen
2013-08-14 18:34 ` [PATCH 4/4] perf, tools: Add perf stat --transaction v3 Andi Kleen
2013-08-15 10:18 ` Peter Zijlstra
2013-08-15 13:26 ` Arnaldo Carvalho de Melo
2013-08-15 14:06 ` Andi Kleen [this message]
2013-08-15 14:21 ` Arnaldo Carvalho de Melo
2013-08-15 14:29 ` Andi Kleen
2013-08-15 15:01 ` Arnaldo Carvalho de Melo
2013-08-15 16:42 ` Andi Kleen
2013-08-21 13:15 ` Arnaldo Carvalho de Melo
2013-08-21 14:48 ` Andi Kleen
-- strict thread matches above, loose matches on Subject: below --
2013-08-09 1:15 perf, x86: Add parts of the remaining haswell PMU functionality Andi Kleen
2013-08-09 1:15 ` [PATCH 4/4] perf, tools: Add perf stat --transaction v3 Andi Kleen
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=20130815140633.GF19750@two.firstfloor.org \
--to=andi@firstfloor.org \
--cc=acme@ghostprotocols.net \
--cc=ak@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=peterz@infradead.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
Powered by JetHome