callgraph: fix loading of stacks coming from backtrace()

This commit is contained in:
Christian Hergert
2020-02-26 09:31:31 -08:00
parent 26bf532a8c
commit 14973bc2b9

View File

@ -382,6 +382,13 @@ sysprof_callgraph_profile_generate_worker (GTask *task,
}
else
{
/* In case we get plain backtraces that aren't coming from perf,
* we might never get a context switch into user-space. This ensures
* that we still get traces for things from backtrace().
*/
if (last_context == SYSPROF_ADDRESS_CONTEXT_NONE)
last_context = SYSPROF_ADDRESS_CONTEXT_USER;
for (guint j = 0; j < resolvers->len; j++)
{
SysprofSymbolResolver *resolver = g_ptr_array_index (resolvers, j);