Instruction Level Profiling: The Meaning of the Instruction Pointer?
When profiling code at the the assembly instruction level, what does the position of the instruction pointer really mean given that modern CPUs don't execute instructions serially or in-order? For example, assume the following x64 assembly code: mov RAX, [RBX]; // Assume a cache miss here. mov RSI, [RBX + RCX]; // Another cache miss. xor R8, R8; add RDX, RAX; // Dependent on the load into RAX. add RDI, RSI; // Dependent on the load into RSI. Which instruction will the instruction pointer spend most of its time on? I can think of good arguments for all of them: mov RAX, [RBX] is taking probably
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.