From ab893fb195d10ed46fde31712c27180f63d0dd9e Mon Sep 17 00:00:00 2001 From: compudj Date: Sun, 12 Feb 2006 03:15:10 +0000 Subject: [PATCH] 0.8.19 git-svn-id: http://ltt.polymtl.ca/svn@1546 04897980-b3bd-0310-b5e0-8ef037075253 --- ltt/branches/poly/ChangeLog | 3 +++ ltt/branches/poly/configure.in | 2 +- ltt/branches/poly/lttv/lttv/state.c | 17 +++++++++++++++-- 3 files changed, 19 insertions(+), 3 deletions(-) diff --git a/ltt/branches/poly/ChangeLog b/ltt/branches/poly/ChangeLog index 0e05d6ba..0c9e0496 100644 --- a/ltt/branches/poly/ChangeLog +++ b/ltt/branches/poly/ChangeLog @@ -1,5 +1,8 @@ LinuxTraceToolkit ChangeLog +11/02/2006 LTTV 0.8.19 + Copy process names upon fork. + Put statedump to "unknown" mode until ltt-statedump is fixed. 09/02/2006 LTTV 0.8.15 Fix error handling of filter.c. 08/02/2006 LTTV 0.8.14 diff --git a/ltt/branches/poly/configure.in b/ltt/branches/poly/configure.in index 834009c3..aa85f9e2 100644 --- a/ltt/branches/poly/configure.in +++ b/ltt/branches/poly/configure.in @@ -23,7 +23,7 @@ AC_PREREQ(2.57) AC_INIT(FULL-PACKAGE-NAME, VERSION, BUG-REPORT-ADDRESS) #AC_WITH_LTDL # not needed ? -AM_INIT_AUTOMAKE(LinuxTraceToolkitViewer,0.8.18-09022006) +AM_INIT_AUTOMAKE(LinuxTraceToolkitViewer,0.8.19-11022006) AM_CONFIG_HEADER(config.h) AM_PROG_LIBTOOL diff --git a/ltt/branches/poly/lttv/lttv/state.c b/ltt/branches/poly/lttv/lttv/state.c index 29ab33cd..3602c677 100644 --- a/ltt/branches/poly/lttv/lttv/state.c +++ b/ltt/branches/poly/lttv/lttv/state.c @@ -1336,7 +1336,7 @@ static gboolean process_fork(void *hook_data, void *call_data) // g_assert(process->pid == parent_pid); child_process = lttv_state_find_process(ts, ANY_CPU, child_pid); if(child_process == NULL) { - lttv_state_create_process(ts, process, cpu, + child_process = lttv_state_create_process(ts, process, cpu, child_pid, LTTV_STATE_UNNAMED, &s->parent.timestamp); } else { /* The process has already been created : due to time imprecision between @@ -1349,6 +1349,8 @@ static gboolean process_fork(void *hook_data, void *call_data) before the fork event */ child_process->ppid = process->pid; } + g_assert(child_process->name == LTTV_STATE_UNNAMED); + child_process->name = process->name; return FALSE; } @@ -1498,7 +1500,8 @@ static gboolean enum_process_state(void *hook_data, void *call_data) &s->parent.timestamp); /* Keep the stack bottom : a running user mode */ - +#if 0 + /* Disabled because of inconsistencies in the current statedump states. */ if(mode == LTTV_STATE_USER_MODE) { /* Only keep the bottom */ process->execution_stack = g_array_set_size(process->execution_stack, 1); @@ -1511,7 +1514,17 @@ static gboolean enum_process_state(void *hook_data, void *call_data) es->s = status; es->n = submode; } +#endif //0 + /* UNKNOWN STATE */ + { + LttvExecutionState *es; + es = process->state = &g_array_index(process->execution_stack, + LttvExecutionState, 1); + es->t = LTTV_STATE_MODE_UNKNOWN; + es->s = LTTV_STATE_UNNAMED; + es->n = LTTV_STATE_SUBMODE_UNKNOWN; + } } else { /* The process has already been created : * Probably was forked while dumping the process state or -- 2.34.1