8

Instruction pipelining is used to execute instructions in a parallel fashion by dividing them into several steps .When I pause the execution in a debugger I am only able to see the location of the eip register but not the current pipeline state. Is there a way to find out ?

1 Answer 1

8

No, a debugger views code sequentially whereas a cpu may reorder code on the fly before it gets executed and even execute more than one instruction at a time. This is the case even for Simulators like Bochs. Simics on the other hand might implement something more in line with reality but I doubt it.

Essentially the pipeline is supposed to be transparent to the programmer. As execution wise it should function the same as a single cycle implementation even though the performance would be much different.

If you want the see the effect of passing different instructions through a pipeline what you want is a profiler.

If you want a tool that will allow you to analyse the progress of the uOPs through the entire pipeline look for things like Marss86 which simulates down to the uOp level and will allow you to see the goings on inside the pipeline at least of the architecture they simulate. Note that there are various implementations of the x86 pipelines and your simulator of choice may or may not implement the exact one you are intending to target.

1
  • Addenda to the cb88 answer: You may also take a look at cachegrind and callgrind, which are simulating the execution of your code on a given architecture. If you instrument the code of these tools, you might get some information about the state of the pipeline. But, as cb88 said, you may not implement the exact one you are intending to target.
    – perror
    Commented May 22, 2013 at 9:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.