Re: [PATCH v2 2/4] perf: streamline append_chain() function

2013-10-21 Thread Waiman Long
On 10/19/2013 08:29 PM, Andi Kleen wrote: Waiman Long writes: as well as using ?: statement which can be more efficient than the regular if statement in some architectures. I don't think that's true, the compiler does if conversion anyways for both. But change seems reasonable. -Andi Th

Re: [PATCH v2 2/4] perf: streamline append_chain() function

2013-10-19 Thread Andi Kleen
Waiman Long writes: > as well as > using ?: statement which can be more efficient than the regular if > statement in some architectures. I don't think that's true, the compiler does if conversion anyways for both. But change seems reasonable. -Andi -- a...@linux.intel.com -- Speaking for my

[PATCH v2 2/4] perf: streamline append_chain() function

2013-10-18 Thread Waiman Long
When callgraph is enabled, the append_chain() function consumes a major portion of the total CPU time. This patch tries to streamline the append_chain() function by removing unneeded conditional test as well as using ?: statement which can be more efficient than the regular if statement in some arc