Currently, the initial comm of the main thread is exported. Export also
a thread's current comm. That better supports the tracing of
multi-threaded applications that set different comms for different
threads to make it easier to distinguish them.
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Link: http://lkml.kernel.org/r/20190710085810.1650-13-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
};
struct thread *main_thread;
struct comm *comm = NULL;
+ struct comm *curr_comm;
int err;
err = db_export__evsel(dbe, evsel);
}
}
+ curr_comm = thread__comm(thread);
+ if (curr_comm) {
+ err = db_export__comm(dbe, curr_comm, thread);
+ if (err)
+ goto out_put;
+ }
+
es.db_id = ++dbe->sample_last_db_id;
err = db_ids_from_al(dbe, al, &es.dso_db_id, &es.sym_db_id, &es.offset);