- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm trying to profile an executable using split-dwarf flag.
Recently, when switching from DWARF4 to DWARF5, I noticed that source file info disappeared in VTune.
Is this a known issue in VTune?
I'm using VTune for Linux: Intel(R) VTune(TM) Profiler 2024.0.0 (build 626834)
This is local (non-remote) profiling.
clang version 17.0.1.
Here is a small repro.
If this code below is compiled with dwarf4, I see source file info:
clang -O3 -g2 -gdwarf-4 -gsplit-dwarf -lstdc++ /tmp/main.cpp -o /tmp/main
But if I switch to dwarf5, source info disappears:
clang -O3 -g2 -gdwarf-5 -gsplit-dwarf -lstdc++ /tmp/main.cpp -o /tmp/main
Code for repro:
#include <iostream>
int fibonacci(int n) {
if (n == 0) {
return 0;
}
int t1 = 0;
int t2 = 1;
int nextTerm;
for (int i = 1; i <= n; ++i) {
nextTerm = t1 + t2;
t1 = t2;
t2 = nextTerm;
}
return nextTerm;
}
int main(int argc, char* argv[]) {
int f;
for (auto i = 0; i < 2000000000; ++i) {
f = fibonacci(i % 30);
}
return f;
}
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for reporting the issue. The issue can be observed in local, i will discuss the issue with development team. We will have update later. Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Did you try with icpx instead? I just use icpx with option gdwarf-5 like below, using VTune can view the source.
$ icpx -gdwarf-5 -O2 -o main main.cpp
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Unfortunately, it is not easy to try different compilers in our build, so I have to use clang.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello - I have accepted this case and I will also review this issue. Thank you for your patience.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
We have been able to reproduce this issue in the following configurations:
- not specifying -gdwarf-[4,5] or -gsplit-dwarf displays source
- specifying -gdwarf-4 with and without -gsplit-dwarf, -gsplit-dwarf=[single.split] displays source
- specifying -gdwarf-5 without -gsplit-dwarf or -gsplit-dwarf=[single,split] displays source
- specifying -gdwarf-5 with -gsplit-dwarf or -gsplit-dwarf=[single,split] only displays source assembly, not C
We have provided the reproducer to the development team for fixing.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page