projects
/
lttv.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Store process name from sched_switch
[lttv.git]
/
lttv
/
lttv
/
state.c
diff --git
a/lttv/lttv/state.c
b/lttv/lttv/state.c
index 7e9ce546eb2f636165af2c5805e76054debaf1ec..ac1788747ca6f5f7c8ba80a4f1fd75b69fa0b921 100644
(file)
--- a/
lttv/lttv/state.c
+++ b/
lttv/lttv/state.c
@@
-2782,6
+2782,8
@@
static gboolean schedchange(void *hook_data, void *call_data)
guint pid_in, pid_out;
gint64 state_out;
guint pid_in, pid_out;
gint64 state_out;
+ //TODO ybrosseau 2012-07-13: manage this 20 in a constact or dynamically
+ char next_comm[20];
LttTime timestamp;
event = (LttvEvent *) call_data;
if (strcmp(lttv_traceset_get_name_from_event(event),
LttTime timestamp;
event = (LttvEvent *) call_data;
if (strcmp(lttv_traceset_get_name_from_event(event),
@@
-2795,6
+2797,9
@@
static gboolean schedchange(void *hook_data, void *call_data)
pid_in = lttv_event_get_long_unsigned(event, "next_tid");
state_out = lttv_event_get_long(event, "prev_state");
pid_in = lttv_event_get_long_unsigned(event, "next_tid");
state_out = lttv_event_get_long(event, "prev_state");
+ strncpy(next_comm, lttv_event_get_string(event, "next_comm"), 20);
+ next_comm[20-1] = '\0';
+
timestamp = lttv_event_get_timestamp(event);
if(likely(process != NULL)) {
timestamp = lttv_event_get_timestamp(event);
if(likely(process != NULL)) {
@@
-2852,6
+2857,7
@@
static gboolean schedchange(void *hook_data, void *call_data)
process->cpu = cpu;
// process->last_cpu_index = ltt_tracefile_num(((LttvTracefileContext*)s)->tf);
process->state->change = timestamp;
process->cpu = cpu;
// process->last_cpu_index = ltt_tracefile_num(((LttvTracefileContext*)s)->tf);
process->state->change = timestamp;
+ process->name = g_quark_from_string(next_comm);
/* update cpu status */
if(pid_in == 0)
/* update cpu status */
if(pid_in == 0)
This page took
0.023714 seconds
and
4
git commands to generate.