LttvProcessState *process = ts->running_process[cpu];
/* unknown state, bad current pid */
if(process->pid != pid_out)
- process = lttv_state_find_process(ts, ANY_CPU, pid_out);
+ process = lttv_state_find_process(ts,
+ ltt_tracefile_num(tfc->tf), pid_out);
if(process != NULL) {
/* Well, the process_out existed : we must get it in the process hash
if(hashed_process_data == NULL)
{
g_assert(pid_out == 0 || pid_out != process->ppid);
- const gchar *name = g_quark_to_string(process->name);
/* Process not present */
ProcessInfo *process_info;
Drawing_t *drawing = control_flow_data->drawing;
process->ppid,
&birth,
tfc->t_context->index,
- name,
+ process->name,
&pl_height,
&process_info,
&hashed_process_data);
* present, it's a new process and it was not present : it will
* be added after the state update. */
LttvProcessState *process;
- process = lttv_state_find_process(ts, ANY_CPU, pid_in);
+ process = lttv_state_find_process(ts,
+ ltt_tracefile_num(tfc->tf), pid_in);
if(process != NULL) {
- /* Well, the process_out existed : we must get it in the process hash
+ /* Well, the process existed : we must get it in the process hash
* or add it, and draw its items.
*/
/* Add process to process list (if not present) */
if(hashed_process_data == NULL)
{
g_assert(pid_in == 0 || pid_in != process->ppid);
- const gchar *name = g_quark_to_string(process->name);
/* Process not present */
ProcessInfo *process_info;
Drawing_t *drawing = control_flow_data->drawing;
process->ppid,
&birth,
tfc->t_context->index,
- name,
+ process->name,
&pl_height,
&process_info,
&hashed_process_data);
if(hashed_process_data_in == NULL)
{
g_assert(pid_in == 0 || pid_in != process_in->ppid);
- const gchar *name = g_quark_to_string(process_in->name);
ProcessInfo *process_info;
Drawing_t *drawing = control_flow_data->drawing;
/* Process not present */
process_in->ppid,
&birth,
tfc->t_context->index,
- name,
+ process_in->name,
&pl_height,
&process_info,
&hashed_process_data_in);
ProcessInfo *process_info;
/* Process not present */
Drawing_t *drawing = control_flow_data->drawing;
- const gchar *name = g_quark_to_string(process->name);
processlist_add(process_list,
drawing,
pid,
process->ppid,
&birth,
tfc->t_context->index,
- name,
+ process->name,
&pl_height,
&process_info,
&hashed_process_data);
g_assert(pid == 0 || pid != process->ppid);
/* Process not present */
Drawing_t *drawing = control_flow_data->drawing;
- const gchar *name = g_quark_to_string(process->name);
ProcessInfo *process_info;
processlist_add(process_list,
drawing,
process->ppid,
&birth,
tfc->t_context->index,
- name,
+ process->name,
&pl_height,
&process_info,
&hashed_process_data);
g_assert(pid == 0 || pid != process->ppid);
/* Process not present */
Drawing_t *drawing = control_flow_data->drawing;
- const gchar *name = g_quark_to_string(process->name);
ProcessInfo *process_info;
processlist_add(process_list,
drawing,
process->ppid,
&birth,
tfc->t_context->index,
- name,
+ process->name,
&pl_height,
&process_info,
&hashed_process_data);
g_assert(pid == 0 || pid != process->ppid);
/* Process not present */
Drawing_t *drawing = control_flow_data->drawing;
- const gchar *name = g_quark_to_string(process->name);
ProcessInfo *process_info;
processlist_add(process_list,
drawing,
process->ppid,
&birth,
tfc->t_context->index,
- name,
+ process->name,
&pl_height,
&process_info,
&hashed_process_data);
g_assert(child_pid == 0 || child_pid != process_child->ppid);
/* Process not present */
Drawing_t *drawing = control_flow_data->drawing;
- const gchar *name = g_quark_to_string(process_child->name);
ProcessInfo *process_info;
processlist_add(process_list,
drawing,
process_child->ppid,
&birth,
tfc->t_context->index,
- name,
+ process_child->name,
&pl_height,
&process_info,
&hashed_process_data_child);
g_assert(pid == 0 || pid != process->ppid);
/* Process not present */
Drawing_t *drawing = control_flow_data->drawing;
- const gchar *name = g_quark_to_string(process->name);
ProcessInfo *process_info;
processlist_add(process_list,
drawing,
process->ppid,
&birth,
tfc->t_context->index,
- name,
+ process->name,
&pl_height,
&process_info,
&hashed_process_data);
}
#endif //0
+/* Get the filename of the process to print */
+int after_fs_exec_hook(void *hook_data, void *call_data)
+{
+ LttvTraceHookByFacility *thf = (LttvTraceHookByFacility*)hook_data;
+ EventsRequest *events_request = (EventsRequest*)thf->hook_data;
+ ControlFlowData *control_flow_data = events_request->viewer_data;
+
+ LttvTracefileContext *tfc = (LttvTracefileContext *)call_data;
+
+ LttvTracefileState *tfs = (LttvTracefileState *)call_data;
+
+ LttvTraceState *ts = (LttvTraceState *)tfc->t_context;
+
+ guint cpu = ltt_tracefile_num(tfc->tf);
+ LttvProcessState *process = ts->running_process[cpu];
+ g_assert(process != NULL);
+
+ guint pid = process->pid;
+
+ /* Well, the process_out existed : we must get it in the process hash
+ * or add it, and draw its items.
+ */
+ /* Add process to process list (if not present) */
+ guint pl_height = 0;
+ HashedProcessData *hashed_process_data = NULL;
+ 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];
+ } else {
+ hashed_process_data = processlist_get_process_data(process_list,
+ pid,
+ process->cpu,
+ &birth,
+ tfc->t_context->index);
+ if(unlikely(hashed_process_data == NULL))
+ {
+ g_assert(pid == 0 || pid != process->ppid);
+ ProcessInfo *process_info;
+ /* Process not present */
+ Drawing_t *drawing = control_flow_data->drawing;
+ processlist_add(process_list,
+ drawing,
+ pid,
+ process->cpu,
+ process->ppid,
+ &birth,
+ tfc->t_context->index,
+ process->name,
+ &pl_height,
+ &process_info,
+ &hashed_process_data);
+ gtk_widget_set_size_request(drawing->drawing_area,
+ -1,
+ pl_height);
+ gtk_widget_queue_draw(drawing->drawing_area);
+ }
+ /* Set the current process */
+ process_list->current_hash_data[process->cpu] =
+ hashed_process_data;
+ }
+
+ processlist_set_name(process_list, process->name, hashed_process_data);
+
+ return 0;
+
+}
+
+
+
+
gint update_time_window_hook(void *hook_data, void *call_data)
{
ControlFlowData *control_flow_data = (ControlFlowData*) hook_data;