MCPcopy Create free account
hub / github.com/RicardoJiang/android-performance / dumpBacktrace

Function dumpBacktrace

memory-hook/src/main/cpp/MemoryHook.cpp:43–53  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

41}
42
43void dumpBacktrace(void **buffer, size_t count) {
44 for (int i = 0; i < count; ++i) {
45 void *addr = buffer[i];
46 Dl_info info = {};
47 if (dladdr(addr, &info)) {
48 const uintptr_t address_relative = (uintptr_t) addr - (uintptr_t) info.dli_fbase;
49 LOG("# %d : %p : %s(%p)(%s)(%p)", i, addr, info.dli_fname, address_relative,
50 info.dli_sname, info.dli_saddr);
51 }
52 }
53}
54
55void onMalloc(const string &soName, size_t len) {
56 auto mallocMemory = soMallocMap.find(soName);

Callers 1

malloc_proxyFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected