On Wed, 11 Mar 2015, Nan Xiao wrote:

> Compared with the previous output, the numbers decrease drastically
> (For load instruction: 89,261 vs 1,779,954; store instruction: 12,002
> vs 6,601,675). This time, I think the more load/store instructions
> (70,089,261 vs 70,000,000, 20,012,002 vs 20,000,000) are from bash
> executing the whole command(perf stat -a -e "r81d0:u","r82d0:u"
> ./a):parse the command, fork process, etc.

perf is very careful to only count the actual process you are running, so 
the overhead probably doesn't involve bash in any way.

x86 processors have many sources of overhead/overcount.  if you're really 
interested in the low-level details you can read my ISPASS 2013 paper 
found here:
        
http://web.eece.maine.edu/~vweaver/projects/deterministic/deterministic_counters.pdf


Vince
--
To unsubscribe from this list: send the line "unsubscribe linux-perf-users" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to