X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=ltt%2Fbranches%2Fpoly%2Flttv%2Flttv%2Fstate.c;h=a6239851ca05fc7ec4daf3d68c6e8539068f60ad;hb=d4dd48854eb35533ac2f668fd907c7e537b59b5d;hp=af0e89720aa4e2e12fe4275c15189a2c4e7b8ffd;hpb=fcc08e1e49ca66dffe10ce9d27216421482663f0;p=lttv.git diff --git a/ltt/branches/poly/lttv/lttv/state.c b/ltt/branches/poly/lttv/lttv/state.c index af0e8972..a6239851 100644 --- a/ltt/branches/poly/lttv/lttv/state.c +++ b/ltt/branches/poly/lttv/lttv/state.c @@ -420,15 +420,21 @@ static void write_process_state(gpointer key, gpointer value, FILE *fp = (FILE *)user_data; guint i; + guint64 address; process = (LttvProcessState *)value; fprintf(fp, -" \n", - process, process->pid, process->ppid, g_quark_to_string(process->type), +" \n", + process, process->pid, process->tgid, process->ppid, + g_quark_to_string(process->type), process->creation_time.tv_sec, - process->creation_time.tv_nsec, g_quark_to_string(process->name), + process->creation_time.tv_nsec, + process->insertion_time.tv_sec, + process->insertion_time.tv_nsec, + g_quark_to_string(process->name), g_quark_to_string(process->brand), - process->cpu); + process->cpu, + process->type); for(i = 0 ; i < process->execution_stack->len; i++) { es = &g_array_index(process->execution_stack, LttvExecutionState, i); @@ -438,6 +444,20 @@ static void write_process_state(gpointer key, gpointer value, fprintf(fp, " CHANGE_S=%lu CHANGE_NS=%lu STATUS=\"%s\"/>\n", es->change.tv_sec, es->change.tv_nsec, g_quark_to_string(es->s)); } + + for(i = 0 ; i < process->execution_stack->len; i++) { + address = &g_array_index(process->user_stack, guint64, i); + fprintf(fp, " \n", + address); + } + + if(process->usertrace) { + fprintf(fp, " ", + process->usertrace->tracefile_name, + process->usertrace->cpu); + } + + fprintf(fp, " \n"); } @@ -1623,6 +1643,7 @@ static gboolean process_fork(void *hook_data, void *call_data) /* Child PID */ child_pid = ltt_event_get_unsigned(e, thf->f2); + s->parent.target_pid = child_pid; /* Child TGID */ if(thf->f3) child_tgid = ltt_event_get_unsigned(e, thf->f3); @@ -1690,6 +1711,7 @@ static gboolean process_kernel_thread(void *hook_data, void *call_data) /* PID */ pid = ltt_event_get_unsigned(e, thf->f1); + s->parent.target_pid = pid; process = lttv_state_find_process(ts, ANY_CPU, pid); es = &g_array_index(process->execution_stack, LttvExecutionState, 0); @@ -1711,6 +1733,7 @@ static gboolean process_exit(void *hook_data, void *call_data) LttvProcessState *process; // = ts->running_process[cpu]; pid = ltt_event_get_unsigned(e, thf->f1); + s->parent.target_pid = pid; // FIXME : Add this test in the "known state" section // g_assert(process->pid == pid); @@ -1733,6 +1756,7 @@ static gboolean process_free(void *hook_data, void *call_data) /* PID of the process to release */ release_pid = ltt_event_get_unsigned(e, thf->f1); + s->parent.target_pid = release_pid; g_assert(release_pid != 0); @@ -1832,7 +1856,8 @@ static gboolean enum_process_state(void *hook_data, void *call_data) /* PID */ pid = ltt_event_get_unsigned(e, thf->f1); - + s->parent.target_pid = pid; + /* Parent PID */ parent_pid = ltt_event_get_unsigned(e, thf->f2);