Magic-trace: Diagnose tricky performance issues with Intel Processor Trace
The visualization tools presented look really nice, but they seem to present program execution as sequential and linear, which is a model that seems like it will really break down at these time scales (10s of cycles).Modern processors will look hundreds of instructions into the future and try to start executing them as soon as possible.  Branches are predicted far in advance of when they can actually be evaluated.  Many instructions can be executing simultaneously.  A clean tidy flame graph showing 1-3ns slices (~5 cycles) cannot help but be a vast simplification of what the CPU is really doing.The linked page about Processor Trace says this:> instruction data (control flow) is perfectly accurate but timing information is less accurateThe article mentions using magic-trace to detect changes in inlining decisions made by the compiler.  This is a case where it will shine, since PT can perfectly capture the control flow, and it doesn't necessarily rely on having perfect timestamps for everything.