You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
I'm working on a simple bubblesort code. I'm on Ubuntu 16.04, I compile it with LLVM5 and generate the profile output using autofdo as shown below.
The "line number" is not line number but "line offset to the start of the function". If you see a very large number like 65516, it's normally because the sampled instruction has incorrect debug info or no debug info, thus it is mapped to the line 0 of the file, giving it an negative "line offset to the start of the function". The profile you provided looks reasonable and should be good to use.
Hello,
I'm working on a simple bubblesort code. I'm on Ubuntu 16.04, I compile it with LLVM5 and generate the profile output using autofdo as shown below.
Then I use llvm-prof to read this sampled profile. The output gives me some weird line numbers that do not match with the source code.
The (partial) output of
llvm-profdata show -sample sort_g_O0.prof
is this:
2: inlined callee: sort_array: 583159, 0, 4 sampled lines
Samples collected in the function's body {
1: 0
3: 1
4: 1
65501: 1
}
Samples collected in inlined callsites {
6: inlined callee: bubble_sort: 583142, 0, 6 sampled lines
Samples collected in the function's body {
2: 3
4: 12608
5: 16740
7: 4209
8: 4209
65516: 12673
}
No inlined callsites in this function
I tried to figure it out myself,
Can somebody help me on this? Am I doing something wrong, if not, why am I seeing these line numbers?
I attached the files.
llvm_autofdo.zip
Thanks!
The text was updated successfully, but these errors were encountered: