Print the hex stack dump on a single line. PCs are separated by tabs.
| 946 | |
| 947 | // Print the hex stack dump on a single line. PCs are separated by tabs. |
| 948 | static void TraceStack(void) { |
| 949 | void *pcs[16]; |
| 950 | int n = GetStackTrace(pcs, sizeof(pcs)/sizeof(pcs[0]), 0); |
| 951 | for (int i = 0; i != n; i++) { |
| 952 | TracePrintf(TraceFd(), "\t%p", pcs[i]); |
| 953 | } |
| 954 | } |
| 955 | |
| 956 | // This protects MALLOC_TRACE, to make sure its info is atomically written. |
| 957 | static SpinLock malloc_trace_lock(SpinLock::LINKER_INITIALIZED); |
nothing calls this directly
no test coverage detected