Ignore:
Timestamp:
Mar 13, 2017, 12:09:07 PM (8 years ago)
Author:
Yusuke Suzuki
Message:

[JSC][Linux] Allow profilers to demangle C++ names
https://bugs.webkit.org/show_bug.cgi?id=169559

Reviewed by Michael Catanzaro.

Linux also offers dladdr & demangling feature.
Thus, we can use it to show the names in profilers.
For example, SamplingProfiler tells us the C function names.

  • runtime/SamplingProfiler.cpp:

(JSC::SamplingProfiler::StackFrame::displayName):

  • tools/CodeProfile.cpp:

(JSC::symbolName):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/tools/CodeProfile.cpp

    r204466 r213859  
    3333#include <wtf/text/WTFString.h>
    3434
    35 #if OS(DARWIN)
     35#if OS(DARWIN) || OS(LINUX)
    3636#include <cxxabi.h>
    3737#include <dlfcn.h>
     
    5656static const char* symbolName(void* address)
    5757{
    58 #if OS(DARWIN)
     58#if OS(DARWIN) || OS(LINUX)
    5959    Dl_info info;
    6060    if (!dladdr(address, &info) || !info.dli_sname)
Note: See TracChangeset for help on using the changeset viewer.