projects
/
lttv.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
update tracecontrol
[lttv.git]
/
ltt
/
branches
/
poly
/
lttv
/
modules
/
gui
/
controlflow
/
eventhooks.c
diff --git
a/ltt/branches/poly/lttv/modules/gui/controlflow/eventhooks.c
b/ltt/branches/poly/lttv/modules/gui/controlflow/eventhooks.c
index 54eba010749b14d1b0f96df1f0defae0d1813cab..8431d771a5f263077ceb5f2aa861b90eb073eecf 100644
(file)
--- a/
ltt/branches/poly/lttv/modules/gui/controlflow/eventhooks.c
+++ b/
ltt/branches/poly/lttv/modules/gui/controlflow/eventhooks.c
@@
-180,10
+180,12
@@
static void request_background_data(ControlFlowData *control_flow_data)
* @return The widget created.
*/
GtkWidget *
* @return The widget created.
*/
GtkWidget *
-h_guicontrolflow(
Tab *tab
)
+h_guicontrolflow(
LttvPlugin *plugin
)
{
{
+ LttvPluginTab *ptab = LTTV_PLUGIN_TAB(plugin);
+ Tab *tab = ptab->tab;
g_info("h_guicontrolflow, %p", tab);
g_info("h_guicontrolflow, %p", tab);
- ControlFlowData *control_flow_data = guicontrolflow(
tab)
;
+ ControlFlowData *control_flow_data = guicontrolflow(
ptab)
;
control_flow_data->tab = tab;
control_flow_data->tab = tab;
@@
-218,8
+220,10
@@
void legend_destructor(GtkWindow *legend)
/* Create a popup legend */
GtkWidget *
/* Create a popup legend */
GtkWidget *
-h_legend(
Tab *tab
)
+h_legend(
LttvPlugin *plugin
)
{
{
+ LttvPluginTab *ptab = LTTV_PLUGIN_TAB(plugin);
+ Tab *tab = ptab->tab;
g_info("h_legend, %p", tab);
GtkWindow *legend = GTK_WINDOW(gtk_window_new(GTK_WINDOW_TOPLEVEL));
g_info("h_legend, %p", tab);
GtkWindow *legend = GTK_WINDOW(gtk_window_new(GTK_WINDOW_TOPLEVEL));
@@
-265,7
+269,7
@@
int event_selected_hook(void *hook_data, void *call_data)
static inline PropertiesLine prepare_s_e_line(LttvProcessState *process)
{
PropertiesLine prop_line;
static inline PropertiesLine prepare_s_e_line(LttvProcessState *process)
{
PropertiesLine prop_line;
- prop_line.line_width =
2
;
+ prop_line.line_width =
5
;
prop_line.style = GDK_LINE_SOLID;
prop_line.y = MIDDLE;
//GdkColormap *colormap = gdk_colormap_get_system();
prop_line.style = GDK_LINE_SOLID;
prop_line.y = MIDDLE;
//GdkColormap *colormap = gdk_colormap_get_system();
@@
-341,8
+345,10
@@
int before_schedchange_hook(void *hook_data, void *call_data)
LttEvent *e;
e = ltt_tracefile_get_event(tfc->tf);
LttEvent *e;
e = ltt_tracefile_get_event(tfc->tf);
+ gint target_pid_saved = tfc->target_pid;
LttTime evtime = ltt_event_time(e);
LttTime evtime = ltt_event_time(e);
+ LttvFilter *filter = control_flow_data->filter;
/* we are in a schedchange, before the state update. We must draw the
* items corresponding to the state before it changes : now is the right
/* we are in a schedchange, before the state update. We must draw the
* items corresponding to the state before it changes : now is the right
@@
-356,7
+362,10
@@
int before_schedchange_hook(void *hook_data, void *call_data)
pid_in = ltt_event_get_long_unsigned(e, thf->f2);
}
pid_in = ltt_event_get_long_unsigned(e, thf->f2);
}
- {
+ tfc->target_pid = pid_out;
+ if(!filter || !filter->head ||
+ lttv_filter_tree_parse(filter->head,e,tfc->tf,
+ tfc->t_context->t,tfc)) {
/* For the pid_out */
/* First, check if the current process is in the state computation
* process list. If it is there, that means we must add it right now and
/* For the pid_out */
/* First, check if the current process is in the state computation
* process list. If it is there, that means we must add it right now and
@@
-364,6
+373,7
@@
int before_schedchange_hook(void *hook_data, void *call_data)
* present, it's a new process and it was not present : it will
* be added after the state update. */
guint cpu = tfs->cpu;
* present, it's a new process and it was not present : it will
* be added after the state update. */
guint cpu = tfs->cpu;
+ guint trace_num = ts->parent.index;
LttvProcessState *process = ts->running_process[cpu];
/* unknown state, bad current pid */
if(process->pid != pid_out)
LttvProcessState *process = ts->running_process[cpu];
/* unknown state, bad current pid */
if(process->pid != pid_out)
@@
-384,7
+394,7
@@
int before_schedchange_hook(void *hook_data, void *call_data)
pid_out,
process->cpu,
&birth,
pid_out,
process->cpu,
&birth,
- t
fc->t_context->index
);
+ t
race_num
);
if(hashed_process_data == NULL)
{
g_assert(pid_out == 0 || pid_out != process->ppid);
if(hashed_process_data == NULL)
{
g_assert(pid_out == 0 || pid_out != process->ppid);
@@
-398,7
+408,7
@@
int before_schedchange_hook(void *hook_data, void *call_data)
process->cpu,
process->ppid,
&birth,
process->cpu,
process->ppid,
&birth,
- t
fc->t_context->index
,
+ t
race_num
,
process->name,
process->brand,
&pl_height,
process->name,
process->brand,
&pl_height,
@@
-517,7
+527,10
@@
int before_schedchange_hook(void *hook_data, void *call_data)
}
}
}
}
- {
+ tfc->target_pid = pid_in;
+ if(!filter || !filter->head ||
+ lttv_filter_tree_parse(filter->head,e,tfc->tf,
+ tfc->t_context->t,tfc)) {
/* For the pid_in */
/* First, check if the current process is in the state computation
* process list. If it is there, that means we must add it right now and
/* For the pid_in */
/* First, check if the current process is in the state computation
* process list. If it is there, that means we must add it right now and
@@
-527,6
+540,7
@@
int before_schedchange_hook(void *hook_data, void *call_data)
LttvProcessState *process;
process = lttv_state_find_process(ts,
tfs->cpu, pid_in);
LttvProcessState *process;
process = lttv_state_find_process(ts,
tfs->cpu, pid_in);
+ guint trace_num = ts->parent.index;
if(process != NULL) {
/* Well, the process existed : we must get it in the process hash
if(process != NULL) {
/* Well, the process existed : we must get it in the process hash
@@
-542,7
+556,7
@@
int before_schedchange_hook(void *hook_data, void *call_data)
pid_in,
tfs->cpu,
&birth,
pid_in,
tfs->cpu,
&birth,
- t
fc->t_context->index
);
+ t
race_num
);
if(hashed_process_data == NULL)
{
g_assert(pid_in == 0 || pid_in != process->ppid);
if(hashed_process_data == NULL)
{
g_assert(pid_in == 0 || pid_in != process->ppid);
@@
-556,7
+570,7
@@
int before_schedchange_hook(void *hook_data, void *call_data)
tfs->cpu,
process->ppid,
&birth,
tfs->cpu,
process->ppid,
&birth,
- t
fc->t_context->index
,
+ t
race_num
,
process->name,
process->brand,
&pl_height,
process->name,
process->brand,
&pl_height,
@@
-679,6
+693,7
@@
int before_schedchange_hook(void *hook_data, void *call_data)
} else
g_warning("Cannot find pin_in in schedchange %u", pid_in);
}
} else
g_warning("Cannot find pin_in in schedchange %u", pid_in);
}
+ tfc->target_pid = target_pid_saved;
return 0;
return 0;
@@
-731,6
+746,12
@@
int after_schedchange_hook(void *hook_data, void *call_data)
LttEvent *e;
e = ltt_tracefile_get_event(tfc->tf);
LttEvent *e;
e = ltt_tracefile_get_event(tfc->tf);
+ LttvFilter *filter = control_flow_data->filter;
+ if(filter != NULL && filter->head != NULL)
+ if(!lttv_filter_tree_parse(filter->head,e,tfc->tf,
+ tfc->t_context->t,tfc))
+ return FALSE;
+
LttTime evtime = ltt_event_time(e);
/* Add process to process list (if not present) */
LttTime evtime = ltt_event_time(e);
/* Add process to process list (if not present) */
@@
-753,6
+774,7
@@
int after_schedchange_hook(void *hook_data, void *call_data)
//process_in = lttv_state_find_process(ts, ANY_CPU, pid_in);
//process_in = tfs->process;
guint cpu = tfs->cpu;
//process_in = lttv_state_find_process(ts, ANY_CPU, pid_in);
//process_in = tfs->process;
guint cpu = tfs->cpu;
+ guint trace_num = ts->parent.index;
process_in = ts->running_process[cpu];
/* It should exist, because we are after the state update. */
#ifdef EXTRA_CHECK
process_in = ts->running_process[cpu];
/* It should exist, because we are after the state update. */
#ifdef EXTRA_CHECK
@@
-764,7
+786,7
@@
int after_schedchange_hook(void *hook_data, void *call_data)
pid_in,
process_in->cpu,
&birth,
pid_in,
process_in->cpu,
&birth,
- t
fc->t_context->index
);
+ t
race_num
);
if(hashed_process_data_in == NULL)
{
g_assert(pid_in == 0 || pid_in != process_in->ppid);
if(hashed_process_data_in == NULL)
{
g_assert(pid_in == 0 || pid_in != process_in->ppid);
@@
-778,7
+800,7
@@
int after_schedchange_hook(void *hook_data, void *call_data)
process_in->cpu,
process_in->ppid,
&birth,
process_in->cpu,
process_in->ppid,
&birth,
- t
fc->t_context->index
,
+ t
race_num
,
process_in->name,
process_in->brand,
&pl_height,
process_in->name,
process_in->brand,
&pl_height,
@@
-790,7
+812,7
@@
int after_schedchange_hook(void *hook_data, void *call_data)
gtk_widget_queue_draw(drawing->drawing_area);
}
/* Set the current process */
gtk_widget_queue_draw(drawing->drawing_area);
}
/* Set the current process */
- process_list->current_hash_data[process_in->cpu] =
+ process_list->current_hash_data[
trace_num][
process_in->cpu] =
hashed_process_data_in;
if(ltt_time_compare(hashed_process_data_in->next_good_time,
hashed_process_data_in;
if(ltt_time_compare(hashed_process_data_in->next_good_time,
@@
-859,6
+881,12
@@
int before_execmode_hook(void *hook_data, void *call_data)
LttEvent *e;
e = ltt_tracefile_get_event(tfc->tf);
LttEvent *e;
e = ltt_tracefile_get_event(tfc->tf);
+ LttvFilter *filter = control_flow_data->filter;
+ if(filter != NULL && filter->head != NULL)
+ if(!lttv_filter_tree_parse(filter->head,e,tfc->tf,
+ tfc->t_context->t,tfc))
+ return FALSE;
+
LttTime evtime = ltt_event_time(e);
/* we are in a execmode, before the state update. We must draw the
LttTime evtime = ltt_event_time(e);
/* we are in a execmode, before the state update. We must draw the
@@
-868,6
+896,7
@@
int before_execmode_hook(void *hook_data, void *call_data)
/* For the pid */
//LttvProcessState *process = tfs->process;
guint cpu = tfs->cpu;
/* For the pid */
//LttvProcessState *process = tfs->process;
guint cpu = tfs->cpu;
+ guint trace_num = ts->parent.index;
LttvProcessState *process = ts->running_process[cpu];
g_assert(process != NULL);
LttvProcessState *process = ts->running_process[cpu];
g_assert(process != NULL);
@@
-882,14
+911,14
@@
int before_execmode_hook(void *hook_data, void *call_data)
ProcessList *process_list = control_flow_data->process_list;
LttTime birth = process->creation_time;
ProcessList *process_list = control_flow_data->process_list;
LttTime birth = process->creation_time;
- if(likely(process_list->current_hash_data[cpu] != NULL)) {
- hashed_process_data = process_list->current_hash_data[cpu];
+ if(likely(process_list->current_hash_data[
trace_num][
cpu] != NULL)) {
+ hashed_process_data = process_list->current_hash_data[
trace_num][
cpu];
} else {
hashed_process_data = processlist_get_process_data(process_list,
pid,
process->cpu,
&birth,
} else {
hashed_process_data = processlist_get_process_data(process_list,
pid,
process->cpu,
&birth,
- t
fc->t_context->index
);
+ t
race_num
);
if(unlikely(hashed_process_data == NULL))
{
g_assert(pid == 0 || pid != process->ppid);
if(unlikely(hashed_process_data == NULL))
{
g_assert(pid == 0 || pid != process->ppid);
@@
-903,7
+932,7
@@
int before_execmode_hook(void *hook_data, void *call_data)
process->cpu,
process->ppid,
&birth,
process->cpu,
process->ppid,
&birth,
- t
fc->t_context->index
,
+ t
race_num
,
process->name,
process->brand,
&pl_height,
process->name,
process->brand,
&pl_height,
@@
-915,7
+944,7
@@
int before_execmode_hook(void *hook_data, void *call_data)
gtk_widget_queue_draw(drawing->drawing_area);
}
/* Set the current process */
gtk_widget_queue_draw(drawing->drawing_area);
}
/* Set the current process */
- process_list->current_hash_data[process->cpu] =
+ process_list->current_hash_data[
trace_num][
process->cpu] =
hashed_process_data;
}
hashed_process_data;
}
@@
-1056,11
+1085,18
@@
int before_process_exit_hook(void *hook_data, void *call_data)
LttEvent *e;
e = ltt_tracefile_get_event(tfc->tf);
LttEvent *e;
e = ltt_tracefile_get_event(tfc->tf);
+ LttvFilter *filter = control_flow_data->filter;
+ if(filter != NULL && filter->head != NULL)
+ if(!lttv_filter_tree_parse(filter->head,e,tfc->tf,
+ tfc->t_context->t,tfc))
+ return FALSE;
+
LttTime evtime = ltt_event_time(e);
/* Add process to process list (if not present) */
//LttvProcessState *process = tfs->process;
guint cpu = tfs->cpu;
LttTime evtime = ltt_event_time(e);
/* Add process to process list (if not present) */
//LttvProcessState *process = tfs->process;
guint cpu = tfs->cpu;
+ guint trace_num = ts->parent.index;
LttvProcessState *process = ts->running_process[cpu];
guint pid = process->pid;
LttTime birth;
LttvProcessState *process = ts->running_process[cpu];
guint pid = process->pid;
LttTime birth;
@@
-1073,14
+1109,14
@@
int before_process_exit_hook(void *hook_data, void *call_data)
birth = process->creation_time;
birth = process->creation_time;
- if(likely(process_list->current_hash_data[cpu] != NULL)) {
- hashed_process_data = process_list->current_hash_data[cpu];
+ if(likely(process_list->current_hash_data[
trace_num][
cpu] != NULL)) {
+ hashed_process_data = process_list->current_hash_data[
trace_num][
cpu];
} else {
hashed_process_data = processlist_get_process_data(process_list,
pid,
process->cpu,
&birth,
} else {
hashed_process_data = processlist_get_process_data(process_list,
pid,
process->cpu,
&birth,
- t
fc->t_context->index
);
+ t
race_num
);
if(unlikely(hashed_process_data == NULL))
{
g_assert(pid == 0 || pid != process->ppid);
if(unlikely(hashed_process_data == NULL))
{
g_assert(pid == 0 || pid != process->ppid);
@@
-1094,7
+1130,7
@@
int before_process_exit_hook(void *hook_data, void *call_data)
process->cpu,
process->ppid,
&birth,
process->cpu,
process->ppid,
&birth,
- t
fc->t_context->index
,
+ t
race_num
,
process->name,
process->brand,
&pl_height,
process->name,
process->brand,
&pl_height,
@@
-1247,8
+1283,15
@@
int before_process_release_hook(void *hook_data, void *call_data)
LttEvent *e;
e = ltt_tracefile_get_event(tfc->tf);
LttEvent *e;
e = ltt_tracefile_get_event(tfc->tf);
+ LttvFilter *filter = control_flow_data->filter;
+ if(filter != NULL && filter->head != NULL)
+ if(!lttv_filter_tree_parse(filter->head,e,tfc->tf,
+ tfc->t_context->t,tfc))
+ return FALSE;
+
LttTime evtime = ltt_event_time(e);
LttTime evtime = ltt_event_time(e);
+ guint trace_num = ts->parent.index;
guint pid;
{
guint pid;
{
@@
-1276,7
+1319,7
@@
int before_process_release_hook(void *hook_data, void *call_data)
pid,
process->cpu,
&birth,
pid,
process->cpu,
&birth,
- t
fc->t_context->index
);
+ t
race_num
);
if(unlikely(hashed_process_data == NULL))
{
g_assert(pid == 0 || pid != process->ppid);
if(unlikely(hashed_process_data == NULL))
{
g_assert(pid == 0 || pid != process->ppid);
@@
-1290,7
+1333,7
@@
int before_process_release_hook(void *hook_data, void *call_data)
process->cpu,
process->ppid,
&birth,
process->cpu,
process->ppid,
&birth,
- t
fc->t_context->index
,
+ t
race_num
,
process->name,
process->brand,
&pl_height,
process->name,
process->brand,
&pl_height,
@@
-1442,6
+1485,12
@@
int after_process_fork_hook(void *hook_data, void *call_data)
LttEvent *e;
e = ltt_tracefile_get_event(tfc->tf);
LttEvent *e;
e = ltt_tracefile_get_event(tfc->tf);
+ LttvFilter *filter = control_flow_data->filter;
+ if(filter != NULL && filter->head != NULL)
+ if(!lttv_filter_tree_parse(filter->head,e,tfc->tf,
+ tfc->t_context->t,tfc))
+ return FALSE;
+
LttTime evtime = ltt_event_time(e);
guint child_pid;
LttTime evtime = ltt_event_time(e);
guint child_pid;
@@
-1463,6
+1512,7
@@
int after_process_fork_hook(void *hook_data, void *call_data)
g_assert(process_child != NULL);
birth = process_child->creation_time;
g_assert(process_child != NULL);
birth = process_child->creation_time;
+ guint trace_num = ts->parent.index;
/* Cannot use current process, because this action is done by the parent
* on its child. */
/* Cannot use current process, because this action is done by the parent
* on its child. */
@@
-1470,7
+1520,7
@@
int after_process_fork_hook(void *hook_data, void *call_data)
child_pid,
process_child->cpu,
&birth,
child_pid,
process_child->cpu,
&birth,
- t
fc->t_context->index
);
+ t
race_num
);
if(likely(hashed_process_data_child == NULL))
{
g_assert(child_pid == 0 || child_pid != process_child->ppid);
if(likely(hashed_process_data_child == NULL))
{
g_assert(child_pid == 0 || child_pid != process_child->ppid);
@@
-1484,7
+1534,7
@@
int after_process_fork_hook(void *hook_data, void *call_data)
process_child->cpu,
process_child->ppid,
&birth,
process_child->cpu,
process_child->ppid,
&birth,
- t
fc->t_context->index
,
+ t
race_num
,
process_child->name,
process_child->brand,
&pl_height,
process_child->name,
process_child->brand,
&pl_height,
@@
-1569,11
+1619,18
@@
int after_process_exit_hook(void *hook_data, void *call_data)
LttEvent *e;
e = ltt_tracefile_get_event(tfc->tf);
LttEvent *e;
e = ltt_tracefile_get_event(tfc->tf);
+ LttvFilter *filter = control_flow_data->filter;
+ if(filter != NULL && filter->head != NULL)
+ if(!lttv_filter_tree_parse(filter->head,e,tfc->tf,
+ tfc->t_context->t,tfc))
+ return FALSE;
+
LttTime evtime = ltt_event_time(e);
/* Add process to process list (if not present) */
//LttvProcessState *process = tfs->process;
guint cpu = tfs->cpu;
LttTime evtime = ltt_event_time(e);
/* Add process to process list (if not present) */
//LttvProcessState *process = tfs->process;
guint cpu = tfs->cpu;
+ guint trace_num = ts->parent.index;
LttvProcessState *process = ts->running_process[cpu];
/* It should exist, because we are after the state update. */
LttvProcessState *process = ts->running_process[cpu];
/* It should exist, because we are after the state update. */
@@
-1588,14
+1645,14
@@
int after_process_exit_hook(void *hook_data, void *call_data)
birth = process->creation_time;
birth = process->creation_time;
- if(likely(process_list->current_hash_data[cpu] != NULL) ){
- hashed_process_data = process_list->current_hash_data[cpu];
+ if(likely(process_list->current_hash_data[
trace_num][
cpu] != NULL) ){
+ hashed_process_data = process_list->current_hash_data[
trace_num][
cpu];
} else {
hashed_process_data = processlist_get_process_data(process_list,
pid,
process->cpu,
&birth,
} else {
hashed_process_data = processlist_get_process_data(process_list,
pid,
process->cpu,
&birth,
- t
fc->t_context->index
);
+ t
race_num
);
if(unlikely(hashed_process_data == NULL))
{
g_assert(pid == 0 || pid != process->ppid);
if(unlikely(hashed_process_data == NULL))
{
g_assert(pid == 0 || pid != process->ppid);
@@
-1609,7
+1666,7
@@
int after_process_exit_hook(void *hook_data, void *call_data)
process->cpu,
process->ppid,
&birth,
process->cpu,
process->ppid,
&birth,
- t
fc->t_context->index
,
+ t
race_num
,
process->name,
process->brand,
&pl_height,
process->name,
process->brand,
&pl_height,
@@
-1622,7
+1679,7
@@
int after_process_exit_hook(void *hook_data, void *call_data)
}
/* Set the current process */
}
/* Set the current process */
- process_list->current_hash_data[process->cpu] =
+ process_list->current_hash_data[
trace_num][
process->cpu] =
hashed_process_data;
}
hashed_process_data;
}
@@
-1669,7
+1726,17
@@
int after_fs_exec_hook(void *hook_data, void *call_data)
LttvTraceState *ts = (LttvTraceState *)tfc->t_context;
LttvTraceState *ts = (LttvTraceState *)tfc->t_context;
+ LttEvent *e;
+ e = ltt_tracefile_get_event(tfc->tf);
+
+ LttvFilter *filter = control_flow_data->filter;
+ if(filter != NULL && filter->head != NULL)
+ if(!lttv_filter_tree_parse(filter->head,e,tfc->tf,
+ tfc->t_context->t,tfc))
+ return FALSE;
+
guint cpu = tfs->cpu;
guint cpu = tfs->cpu;
+ guint trace_num = ts->parent.index;
LttvProcessState *process = ts->running_process[cpu];
g_assert(process != NULL);
LttvProcessState *process = ts->running_process[cpu];
g_assert(process != NULL);
@@
-1684,14
+1751,14
@@
int after_fs_exec_hook(void *hook_data, void *call_data)
ProcessList *process_list = control_flow_data->process_list;
LttTime birth = process->creation_time;
ProcessList *process_list = control_flow_data->process_list;
LttTime birth = process->creation_time;
- if(likely(process_list->current_hash_data[cpu] != NULL)) {
- hashed_process_data = process_list->current_hash_data[cpu];
+ if(likely(process_list->current_hash_data[
trace_num][
cpu] != NULL)) {
+ hashed_process_data = process_list->current_hash_data[
trace_num][
cpu];
} else {
hashed_process_data = processlist_get_process_data(process_list,
pid,
process->cpu,
&birth,
} else {
hashed_process_data = processlist_get_process_data(process_list,
pid,
process->cpu,
&birth,
- t
fc->t_context->index
);
+ t
race_num
);
if(unlikely(hashed_process_data == NULL))
{
g_assert(pid == 0 || pid != process->ppid);
if(unlikely(hashed_process_data == NULL))
{
g_assert(pid == 0 || pid != process->ppid);
@@
-1705,7
+1772,7
@@
int after_fs_exec_hook(void *hook_data, void *call_data)
process->cpu,
process->ppid,
&birth,
process->cpu,
process->ppid,
&birth,
- t
fc->t_context->index
,
+ t
race_num
,
process->name,
process->brand,
&pl_height,
process->name,
process->brand,
&pl_height,
@@
-1717,7
+1784,7
@@
int after_fs_exec_hook(void *hook_data, void *call_data)
gtk_widget_queue_draw(drawing->drawing_area);
}
/* Set the current process */
gtk_widget_queue_draw(drawing->drawing_area);
}
/* Set the current process */
- process_list->current_hash_data[process->cpu] =
+ process_list->current_hash_data[
trace_num][
process->cpu] =
hashed_process_data;
}
hashed_process_data;
}
@@
-1740,7
+1807,17
@@
int after_user_generic_thread_brand_hook(void *hook_data, void *call_data)
LttvTraceState *ts = (LttvTraceState *)tfc->t_context;
LttvTraceState *ts = (LttvTraceState *)tfc->t_context;
+ LttEvent *e;
+ e = ltt_tracefile_get_event(tfc->tf);
+
+ LttvFilter *filter = control_flow_data->filter;
+ if(filter != NULL && filter->head != NULL)
+ if(!lttv_filter_tree_parse(filter->head,e,tfc->tf,
+ tfc->t_context->t,tfc))
+ return FALSE;
+
guint cpu = tfs->cpu;
guint cpu = tfs->cpu;
+ guint trace_num = ts->parent.index;
LttvProcessState *process = ts->running_process[cpu];
g_assert(process != NULL);
LttvProcessState *process = ts->running_process[cpu];
g_assert(process != NULL);
@@
-1755,14
+1832,14
@@
int after_user_generic_thread_brand_hook(void *hook_data, void *call_data)
ProcessList *process_list = control_flow_data->process_list;
LttTime birth = process->creation_time;
ProcessList *process_list = control_flow_data->process_list;
LttTime birth = process->creation_time;
- if(likely(process_list->current_hash_data[cpu] != NULL)) {
- hashed_process_data = process_list->current_hash_data[cpu];
+ if(likely(process_list->current_hash_data[
trace_num][
cpu] != NULL)) {
+ hashed_process_data = process_list->current_hash_data[
trace_num][
cpu];
} else {
hashed_process_data = processlist_get_process_data(process_list,
pid,
process->cpu,
&birth,
} else {
hashed_process_data = processlist_get_process_data(process_list,
pid,
process->cpu,
&birth,
- t
fc->t_context->index
);
+ t
race_num
);
if(unlikely(hashed_process_data == NULL))
{
g_assert(pid == 0 || pid != process->ppid);
if(unlikely(hashed_process_data == NULL))
{
g_assert(pid == 0 || pid != process->ppid);
@@
-1776,7
+1853,7
@@
int after_user_generic_thread_brand_hook(void *hook_data, void *call_data)
process->cpu,
process->ppid,
&birth,
process->cpu,
process->ppid,
&birth,
- t
fc->t_context->index
,
+ t
race_num
,
process->name,
process->brand,
&pl_height,
process->name,
process->brand,
&pl_height,
@@
-1788,7
+1865,7
@@
int after_user_generic_thread_brand_hook(void *hook_data, void *call_data)
gtk_widget_queue_draw(drawing->drawing_area);
}
/* Set the current process */
gtk_widget_queue_draw(drawing->drawing_area);
}
/* Set the current process */
- process_list->current_hash_data[process->cpu] =
+ process_list->current_hash_data[
trace_num][
process->cpu] =
hashed_process_data;
}
hashed_process_data;
}
@@
-1825,6
+1902,12
@@
int after_event_enum_process_hook(void *hook_data, void *call_data)
LttEvent *e;
e = ltt_tracefile_get_event(tfc->tf);
LttEvent *e;
e = ltt_tracefile_get_event(tfc->tf);
+ LttvFilter *filter = control_flow_data->filter;
+ if(filter != NULL && filter->head != NULL)
+ if(!lttv_filter_tree_parse(filter->head,e,tfc->tf,
+ tfc->t_context->t,tfc))
+ return FALSE;
+
LttTime evtime = ltt_event_time(e);
/* Add process to process list (if not present) */
LttTime evtime = ltt_event_time(e);
/* Add process to process list (if not present) */
@@
-1834,6
+1917,7
@@
int after_event_enum_process_hook(void *hook_data, void *call_data)
HashedProcessData *hashed_process_data_in = NULL;
ProcessList *process_list = control_flow_data->process_list;
HashedProcessData *hashed_process_data_in = NULL;
ProcessList *process_list = control_flow_data->process_list;
+ guint trace_num = ts->parent.index;
guint pid_in;
{
guint pid_in;
{
@@
-1845,6
+1929,7
@@
int after_event_enum_process_hook(void *hook_data, void *call_data)
process_in = lttv_state_find_process(ts, ANY_CPU, pid_in);
//process_in = tfs->process;
//guint cpu = tfs->cpu;
process_in = lttv_state_find_process(ts, ANY_CPU, pid_in);
//process_in = tfs->process;
//guint cpu = tfs->cpu;
+ //guint trace_num = ts->parent.index;
//process_in = ts->running_process[cpu];
/* It should exist, because we are after the state update. */
#ifdef EXTRA_CHECK
//process_in = ts->running_process[cpu];
/* It should exist, because we are after the state update. */
#ifdef EXTRA_CHECK
@@
-1856,7
+1941,7
@@
int after_event_enum_process_hook(void *hook_data, void *call_data)
pid_in,
process_in->cpu,
&birth,
pid_in,
process_in->cpu,
&birth,
- t
fc->t_context->index
);
+ t
race_num
);
if(hashed_process_data_in == NULL)
{
if(pid_in != 0 && pid_in == process_in->ppid)
if(hashed_process_data_in == NULL)
{
if(pid_in != 0 && pid_in == process_in->ppid)
@@
-1872,7
+1957,7
@@
int after_event_enum_process_hook(void *hook_data, void *call_data)
process_in->cpu,
process_in->ppid,
&birth,
process_in->cpu,
process_in->ppid,
&birth,
- t
fc->t_context->index
,
+ t
race_num
,
process_in->name,
process_in->brand,
&pl_height,
process_in->name,
process_in->brand,
&pl_height,
@@
-2531,10
+2616,19
@@
int after_chunk(void *hook_data, void *call_data)
LttTime end_time;
ProcessList *process_list = control_flow_data->process_list;
LttTime end_time;
ProcessList *process_list = control_flow_data->process_list;
+ guint i;
+ LttvTraceset *traceset = tsc->ts;
+ guint nb_trace = lttv_traceset_number(traceset);
+
+ /* Only execute when called for the first trace's events request */
+ if(!process_list->current_hash_data) return;
+ for(i = 0 ; i < nb_trace ; i++) {
+ g_free(process_list->current_hash_data[i]);
+ }
g_free(process_list->current_hash_data);
process_list->current_hash_data = NULL;
g_free(process_list->current_hash_data);
process_list->current_hash_data = NULL;
-
+
if(tfc != NULL)
end_time = LTT_TIME_MIN(tfc->timestamp, events_request->end_time);
else /* end of traceset, or position now out of request : end */
if(tfc != NULL)
end_time = LTT_TIME_MIN(tfc->timestamp, events_request->end_time);
else /* end of traceset, or position now out of request : end */
This page took
0.031888 seconds
and
4
git commands to generate.