Commit 6319790b authored by Adrian Hunter's avatar Adrian Hunter Committed by Arnaldo Carvalho de Melo

perf db-export: Export comm before exporting thread

Export comm before exporting the non-main thread because
db_export__thread() also exports the comm_thread.
Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Link: http://lkml.kernel.org/r/20190710085810.1650-6-adrian.hunter@intel.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent 19207d86
...@@ -312,6 +312,12 @@ int db_export__sample(struct db_export *dbe, union perf_event *event, ...@@ -312,6 +312,12 @@ int db_export__sample(struct db_export *dbe, union perf_event *event,
main_thread); main_thread);
if (err) if (err)
goto out_put; goto out_put;
if (comm) {
err = db_export__exec_comm(dbe, comm, main_thread);
if (err)
goto out_put;
es.comm_db_id = comm->db_id;
}
} }
if (thread != main_thread) { if (thread != main_thread) {
...@@ -321,13 +327,6 @@ int db_export__sample(struct db_export *dbe, union perf_event *event, ...@@ -321,13 +327,6 @@ int db_export__sample(struct db_export *dbe, union perf_event *event,
goto out_put; goto out_put;
} }
if (comm) {
err = db_export__exec_comm(dbe, comm, main_thread);
if (err)
goto out_put;
es.comm_db_id = comm->db_id;
}
es.db_id = ++dbe->sample_last_db_id; 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); err = db_ids_from_al(dbe, al, &es.dso_db_id, &es.sym_db_id, &es.offset);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment