X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;ds=sidebyside;f=ltt%2Fbranches%2Fpoly%2Flttv%2Flttv%2Fstate.c;h=43b4d7ea9fdfc94fda1256913815d7dfee14e771;hb=052a984f0716f0cba2c59620a2575685b6b81099;hp=07ecfc46603e30cd67d76d11d5f141fb182e945e;hpb=c0cb4d12b6441b5964a5017e8c58349bec15e7b8;p=lttv.git diff --git a/ltt/branches/poly/lttv/lttv/state.c b/ltt/branches/poly/lttv/lttv/state.c index 07ecfc46..43b4d7ea 100644 --- a/ltt/branches/poly/lttv/lttv/state.c +++ b/ltt/branches/poly/lttv/lttv/state.c @@ -510,8 +510,7 @@ static void copy_process_state(gpointer key, gpointer value,gpointer user_data) g_array_index(new_process->user_stack, guint64, i) = g_array_index(process->user_stack, guint64, i); } - new_process->current_function = &g_array_index(new_process->user_stack, - guint64, new_process->user_stack->len - 1); + new_process->current_function = process->current_function; g_hash_table_insert(new_processes, new_process, new_process); } @@ -1416,8 +1415,7 @@ static void push_function(LttvTracefileState *tfs, guint64 funcptr) new_func = &g_array_index(process->user_stack, guint64, depth); *new_func = funcptr; - process->current_function = - g_array_index(process->user_stack, guint64, depth - 1); + process->current_function = funcptr; } static void pop_function(LttvTracefileState *tfs, guint64 funcptr) @@ -1426,7 +1424,6 @@ static void pop_function(LttvTracefileState *tfs, guint64 funcptr) LttvTraceState *ts = (LttvTraceState*)tfs->parent.t_context; LttvProcessState *process = ts->running_process[cpu]; - guint depth = process->user_stack->len; if(process->current_function != funcptr){ g_info("Different functions (%lu.%09lu): ignore it\n", tfs->parent.timestamp.tv_sec, tfs->parent.timestamp.tv_nsec); @@ -1439,6 +1436,7 @@ static void pop_function(LttvTracefileState *tfs, guint64 funcptr) g_quark_to_string(process->state->s)); return; } + guint depth = process->user_stack->len; if(depth == 0){ g_info("Trying to pop last function on stack (%lu.%09lu): ignore it\n",