[LLVMdev] Recent changes in -gmlt break sample profiling

Diego Novillo dnovillo at google.com
Fri Oct 24 14:48:28 PDT 2014


I'm not sure if this was intended, but it's going to be a problem for
sample profiles.

When we compile with -gmlt, the profiler expects to find the line number
for all the function headers so that it can compute relative line locations
for the profile.

The tool that reads the ELF binary is not finding them, so it writes out
absolute line numbers, which are impossible to match during the profile-use
phase.

The problem seems to be that we are missing DW_TAG_subprogram for all the
functions in the file.

Attached are the dwarf dumps of the same program. One compiled with my
system's clang 3.4 and the other with today's trunk. In both compiles, I
used -gline-tables-only.

The trunk version is missing all the subprogram tags for the functions in
the file. This breaks the sample profiler.

Should I file a bug, or is -gmlt going to be like this from now on? The
latter would be a problem for us.


Thanks. Diego.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20141024/b11ce92f/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fnptr-clang36.bad.dwarfdump
Type: application/octet-stream
Size: 4212 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20141024/b11ce92f/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fnptr-clang34.good.dwarfdump
Type: application/octet-stream
Size: 6426 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20141024/b11ce92f/attachment-0001.obj>


More information about the llvm-dev mailing list