summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrian Hunter <adrian.hunter@intel.com>2019-07-10 11:57:54 +0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2019-07-10 12:12:25 -0300
commit6319790bcf825bcc4cd9bf01f01ae404a2fb7da8 (patch)
tree4e4a7810941fcf51b8356d3c45c2466d35590900
parent19207d86940db9dad5f2e0a270a2490f7da451e3 (diff)
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: 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>
-rw-r--r--tools/perf/util/db-export.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/tools/perf/util/db-export.c b/tools/perf/util/db-export.c
index 63f9edf65eee..99ad759561de 100644
--- a/tools/perf/util/db-export.c
+++ b/tools/perf/util/db-export.c
@@ -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) {
@@ -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);