4 ms·
Visual Studio has something called "Parallel Stacks" [1] which shows a graph of all the stacks of every thread of the application. It's very powerful when debug
by speps 8y ago
Visual Studio has something called "Parallel Stacks" [1] which shows a graph of all the stacks of every thread of the application. It's very powerful when debugging multithreaded code.
[1] https://docs.microsoft.com/en-us/visualstudio/debugger/using-the-parallel-stacks-window https://docs.microsoft.com/en-us/visualstudio/debugger/using...
- kccqzy 8y agoI believe GP is not talking about thread parallelism, but rather the compiler-controlled instruction reordering. Compilers typically reorder instructions in the hope that it will improve performance. For example if you have v+=2, the compiler can choose to load v into a register, and then continue with the rest of the statements, and ten instructions later perform the actual addition and store it back into memory.
- caf 8y agoYes, that's what I was referring to. When single-stepping such code you'll often see it skip backwards and forwards between the interleaved source statements.