New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 681941 link

Starred by 2 users

Issue metadata

Status: Duplicate
Merged: issue 735027
Owner:
Last visit 15 days ago
Closed: Jun 2017
Cc:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 3
Type: Bug



Sign in to add a comment

Symbolized traces from Clang binaries dont have class names

Project Member Reported by dskiba@chromium.org, Jan 17 2017

Issue description

What summary says.

Heap profiler shows method names, but not classes they belong to (i.e. it shows just "SomeMethod" even if SomeMethod is a member of Foo). Symbolized GCC builds correctly show "Foo::SomeMethod".

Example: https://drive.google.com/file/d/0B_Hmi138MnbJY3ZGTTFsMlZub1E/view?usp=sharing
 
Ahh I bet this is all about dwarf versions. Torne and I ran into some similar problem . I can't recall the details and I have only a phone now.  Look for a codereview authored by Torne and reviewed by me which contains "dwarf". 

What symbol_level are you using? 

Comment 2 by dskiba@chromium.org, Jan 17 2017

Thanks, I'll check. symbol_level was 1 (to avoid creating corrupted .so file).

Comment 3 by dskiba@chromium.org, Apr 20 2017

Labels: OS-Android
OK, so the problem is in addr2line.

src$ nm -C out/Release/lib.unstripped/libchrome.so | grep DeferOrRunPendingTask005db564 t base::MessageLoop::DeferOrRunPendingTask(base::PendingTask)

src$ addr2line -e out/Release/lib.unstripped/libchrome.so -f -C 0x005db564DeferOrRunPendingTask

That was 2.24, but 2.25 (found in android_tools/ndk) also has this problem.

llvm-symbolizer is fine:

src$ echo "out/Release/lib.unstripped/libchrome.so 0x005db564" | llvm-symbolizer-3.4
base::MessageLoop::DeferOrRunPendingTask(base::PendingTask)
/usr/local/google/code/clankium/src/out/Release/../../base/message_loop/message_loop.cc:432:0

I'm not sure if that is related to the switch from DWARF 4 to 3 (https://codereview.chromium.org/2285723002).

Comment 4 Deleted

Comment 5 by dskiba@chromium.org, Apr 20 2017

src$ addr2line -e out/Release/lib.unstripped/libchrome.so -f -C 0x005db564
DeferOrRunPendingTask
/usr/local/google/code/clankium/src/out/Release/../../base/message_loop/message_loop.cc:432

Comment 6 by dskiba@chromium.org, Apr 20 2017

Nope, changing back to DWARF-4 doesn't fix the issue:

src$ nm -C out/Release/lib.unstripped/libchrome.so | grep DeferOrRunPendingTask
005db564 t base::MessageLoop::DeferOrRunPendingTask(base::PendingTask)

src$ addr2line -e out/Release/lib.unstripped/libchrome.so -f -C 0x005db564
DeferOrRunPendingTask
/usr/local/google/code/clankium/src/out/Release/../../base/message_loop/message_loop.cc:432

Comment 7 by dskiba@chromium.org, Jun 28 2017

It turns out llvm-symbolizer with -use-symbol-table=false also doesn't output class names, i.e. the problem is that debug info section doesn't have class names, while symbol table has them, and addr2line always prefers debug info.

Comment 8 by dskiba@chromium.org, Jun 28 2017

Cc: thakis@chromium.org
OK, this appears to be fixed by https://codereview.chromium.org/2959083002

Comment 9 by thakis@chromium.org, Jun 28 2017

Mergedinto: 735027
Status: Duplicate (was: Untriaged)

Sign in to add a comment