From: Julien Desfossez Date: Thu, 23 Aug 2012 00:48:51 +0000 (-0400) Subject: statedump vpid, vtid, vppid X-Git-Tag: v0.3~100 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=11d218ce379a7c08bec00b808c7bcfe5943a7208;p=lttngtop.git statedump vpid, vtid, vppid Signed-off-by: Julien Desfossez --- diff --git a/src/common.c b/src/common.c index fd941bd..eca4d49 100644 --- a/src/common.c +++ b/src/common.c @@ -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(<tngtop, tid, procname); if (proc == NULL) proc = add_proc(<tngtop, tid, procname, timestamp); + update_proc(proc, pid, tid, ppid, vpid, vtid, vppid, procname); free(proc->comm); proc->comm = strdup(procname);