简体   繁体   中英

Why do we need debug information during profiling using Vtune?

When we profile an application using VTune, I understand that the application should be compiled in Release mode, so that it has only relevant code and no additional code for debugging or something else. But following this article , I notice that it mentions to collect debug information. Why this debug information is required? Will it not make inaccuracy in the timing report due to overhead of these debug information?

The debugging information maps from locations in the code to locations in the source file that generated that code. Without that, the profiler can measure the executable, but can't relate the result back to the source code for you to understand what parts of the code you wrote relate to the parts of the executable it measured.

No, just including debug information won't lead to inaccuracy. The part you care about is just extra information added to the executable to tell about what code came from which parts of what source files. There's more to debug information than that (eg, information about locations and types of variables) but it's mostly irrelevant for most profiling, and doesn't lead to inaccuracy in measuring the code either.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM