From: Julien Desfossez Date: Sat, 8 Feb 2014 05:15:29 +0000 (-0500) Subject: follow child to follow threads X-Git-Tag: v0.3~48 X-Git-Url: https://git.lttng.org/?p=lttngtop.git;a=commitdiff_plain;h=a15e6a1039a885e137a08948593da8383777b6d5;hp=71ba9228e9371e5732113ad52848e7558f6e52e8 follow child to follow threads Signed-off-by: Julien Desfossez --- diff --git a/src/lttngtop.c b/src/lttngtop.c index f7af659..d7bf627 100644 --- a/src/lttngtop.c +++ b/src/lttngtop.c @@ -218,7 +218,7 @@ enum bt_cb_ret print_timestamp(struct bt_ctf_event *call_data, void *private_dat uint64_t delta; struct tm start; uint64_t ts_nsec_start; - int pid, cpu_id, tid, ret; + int pid, cpu_id, tid, ret, lookup; const struct bt_definition *scope; const char *hostname, *procname; struct cputime *cpu; @@ -243,8 +243,12 @@ enum bt_cb_ret print_timestamp(struct bt_ctf_event *call_data, void *private_dat tid = get_context_tid(call_data); hostname = get_context_hostname(call_data); + if (opt_child) + lookup = pid; + else + lookup = tid; if (opt_tid || opt_hostname || opt_exec_name) { - if (!lookup_filter_tid_list(pid)) { + if (!lookup_filter_tid_list(lookup)) { /* To display when a process of ours in getting scheduled in */ if (strcmp(bt_ctf_event_name(call_data), "sched_switch") == 0) { int next_tid;