Skip to content

Commit

Permalink
perf db-export: Export comm before exporting thread
Browse files Browse the repository at this point in the history
Export comm before exporting the non-main thread because
db_export__thread() also exports the comm_thread.

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Link: http://lkml.kernel.org/r/20190710085810.1650-6-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
  • Loading branch information
Adrian Hunter authored and Arnaldo Carvalho de Melo committed Jul 10, 2019
1 parent 19207d8 commit 6319790
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions tools/perf/util/db-export.c
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,12 @@ int db_export__sample(struct db_export *dbe, union perf_event *event,
main_thread);
if (err)
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) {
Expand All @@ -321,13 +327,6 @@ int db_export__sample(struct db_export *dbe, union perf_event *event,
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;

err = db_ids_from_al(dbe, al, &es.dso_db_id, &es.sym_db_id, &es.offset);
Expand Down

0 comments on commit 6319790

Please sign in to comment.