follow child to follow threads
[lttngtop.git] / src / lttngtop.c
index dd3130d975adac8dc736f4a3858606af29ac850f..d7bf627a702376fb952b04f7c3e9f113730cf0fa 100644 (file)
@@ -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;
@@ -1107,6 +1111,7 @@ int main(int argc, char **argv, char **envp)
        int ret;
        struct bt_context *bt_ctx = NULL;
 
+       //babeltrace_verbose = 1;
        init_lttngtop();
        ret = parse_options(argc, argv);
        if (ret < 0) {
This page took 0.022736 seconds and 4 git commands to generate.