X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=src%2Fcommon.c;h=ae19f1366e08e3a464b75d67c6693c56d3289193;hb=c983acc0b614a8a4e45b08c1efe75f8ac735f224;hp=7a9925e60febc3a8664068a25c83aa9289c0aa0e;hpb=828afa52c44e005619fb37f94f0122857a7298f6;p=lttngtop.git diff --git a/src/common.c b/src/common.c index 7a9925e..ae19f13 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); +}