MCPcopy Create free account
hub / github.com/async-profiler/async-profiler / decodeNativeSymbol

Method decodeNativeSymbol

src/frameName.cpp:115–136  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

113}
114
115const char* FrameName::decodeNativeSymbol(const char* name) {
116 const char* lib_name = (_style & STYLE_LIB_NAMES) ? Profiler::instance()->getLibraryName(name) : NULL;
117
118 if (Demangle::needsDemangling(name)) {
119 char* demangled = Demangle::demangle(name, _style & STYLE_SIGNATURES);
120 if (demangled != NULL) {
121 if (lib_name != NULL) {
122 _str.assign(lib_name).append("`").append(demangled);
123 } else {
124 _str.assign(demangled);
125 }
126 free(demangled);
127 return _str.c_str();
128 }
129 }
130
131 if (lib_name != NULL) {
132 return _str.assign(lib_name).append("`").append(name).c_str();
133 } else {
134 return name;
135 }
136}
137
138const char* FrameName::typeSuffix(FrameTypeId type) {
139 if (_style & STYLE_ANNOTATE) {

Callers

nothing calls this directly

Calls 4

getLibraryNameMethod · 0.80
appendMethod · 0.80
assignMethod · 0.80
demangleClass · 0.70

Tested by

no test coverage detected