Re: [PATCH 15/15] perf, tools: Add perf stat --transaction v3

Andi Kleen
2013-06-27T03:49:14Z

> OK. I'm still confused by that one sorry. In the patch you do:
>
> + else if (perf_evsel__cmp(counter, nth_evsel(T_CYCLES_IN_TX_CP)))
> + update_stats(&runtime_cycles_in_txcp_stats[0], count[0]);
>
> But then I don't see where you use runtime_cycles_in_txcp_stats ?

You're right that variable is not needed. I'll remove it.
It only needs the in_tx stat.

intx-cp is still output, but directly by abs_printout,
without going through a variable.

>
> > > But I don't think we have anything equivalent.
> >
> > But you have cycles-t and tx-start?
>
> We have:
> - cycles
> - cycles in transactional state
> - cycles spent in successful transactions
>
> So your cycles-t is "cycles in transactional state".
>
> We would calculate cycles wasted in aborts with:
>
> "cycles in transactional" - "cycles in successful transactions"
>
> Which I think is what you're describing above with cycles-ct.

Yes, that should be equivalent.
That should be easy to check for and handle: check for that
event and switch the formula around.
I'll leave that to you as I don't have any way to test it.

> Does "tx-start" just count the number of transactions begun? Does it
> count nested transactions?

Just begun without nesting (TSX flattens all transactions)

-Andi

--
ak@linux.intel.com -- Speaking for myself only.