X-Git-Url: https://git.lttng.org/?p=lttngtop.git;a=blobdiff_plain;f=src%2Fcommon.c;h=4860b7aef76d406d1f8f44f97ae3fcdea9c0c133;hp=cde69a0b0a0eab09521aeb30f1d74e3513093864;hb=57bff78803b67f5b9736d18f57b88b6b6191975e;hpb=2479719885485a6b991b47898d0c77a63f6b9513 diff --git a/src/common.c b/src/common.c index cde69a0..4860b7a 100644 --- a/src/common.c +++ b/src/common.c @@ -164,7 +164,7 @@ struct processtop* add_proc(struct lttngtop *ctx, int tid, char *comm, { struct processtop *newproc; - if (opt_pid && tid != opt_pid) + if (opt_tid && !lookup_tid_list(tid)) return NULL; /* if the PID already exists, we just rename the process */ @@ -618,3 +618,8 @@ struct tm format_timestamp(uint64_t timestamp) return tm; } + +int *lookup_tid_list(int tid) +{ + return g_hash_table_lookup(tid_list, (gpointer) &tid); +}