statedump vpid, vtid, vppid
authorJulien Desfossez <jdesfossez@efficios.com>
Thu, 23 Aug 2012 00:48:51 +0000 (20:48 -0400)
committerJulien Desfossez <jdesfossez@efficios.com>
Sat, 19 Oct 2013 16:02:38 +0000 (12:02 -0400)
Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
src/common.c

index fd941bde92673530019ffe921d03ec1054686617..eca4d496a07da206e4c31316fb8cce4ecd330054 100644 (file)
@@ -523,7 +523,7 @@ enum bt_cb_ret handle_statedump_process_state(struct bt_ctf_event *call_data,
        const struct bt_definition *scope;
        struct processtop *proc;
        unsigned long timestamp;
-       int64_t pid, tid;
+       int64_t pid, tid, ppid, vtid, vpid, vppid;
        char *procname;
 
        timestamp = bt_ctf_get_timestamp(call_data);
@@ -538,9 +538,13 @@ enum bt_cb_ret handle_statedump_process_state(struct bt_ctf_event *call_data,
                fprintf(stderr, "Missing pid context info\n");
                goto error;
        }
+       ppid = bt_ctf_get_int64(bt_ctf_get_field(call_data,
+                               scope, "_ppid"));
+       if (bt_ctf_field_get_error()) {
+               fprintf(stderr, "Missing pid context info\n");
+               goto error;
+       }
 
-       scope = bt_ctf_get_top_level_scope(call_data,
-                       BT_EVENT_FIELDS);
        tid = bt_ctf_get_int64(bt_ctf_get_field(call_data,
                                scope, "_tid"));
        if (bt_ctf_field_get_error()) {
@@ -548,6 +552,25 @@ enum bt_cb_ret handle_statedump_process_state(struct bt_ctf_event *call_data,
                goto error;
        }
 
+       vtid = bt_ctf_get_int64(bt_ctf_get_field(call_data,
+                               scope, "_vtid"));
+       if (bt_ctf_field_get_error()) {
+               fprintf(stderr, "Missing vtid context info\n");
+               goto error;
+       }
+       vpid = bt_ctf_get_int64(bt_ctf_get_field(call_data,
+                               scope, "_vpid"));
+       if (bt_ctf_field_get_error()) {
+               fprintf(stderr, "Missing vtid context info\n");
+               goto error;
+       }
+       vppid = bt_ctf_get_int64(bt_ctf_get_field(call_data,
+                               scope, "_vppid"));
+       if (bt_ctf_field_get_error()) {
+               fprintf(stderr, "Missing vtid context info\n");
+               goto error;
+       }
+
        /*
         * FIXME
         * I first tried with bt_ctf_get_string but doesn`t work at all
@@ -567,6 +590,7 @@ enum bt_cb_ret handle_statedump_process_state(struct bt_ctf_event *call_data,
        proc = find_process_tid(&lttngtop, tid, procname);
        if (proc == NULL)
                proc = add_proc(&lttngtop, tid, procname, timestamp);
+       update_proc(proc, pid, tid, ppid, vpid, vtid, vppid, procname);
 
        free(proc->comm);
        proc->comm = strdup(procname);
This page took 0.025383 seconds and 4 git commands to generate.