lkml.org 
[lkml]   [2019]   [Jul]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 05/21] perf db-export: Export comm before exporting thread
Date
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>
---
tools/perf/util/db-export.c | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/tools/perf/util/db-export.c b/tools/perf/util/db-export.c
index f6d062d8c5e1..972e1313388f 100644
--- a/tools/perf/util/db-export.c
+++ b/tools/perf/util/db-export.c
@@ -311,6 +311,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) {
@@ -320,13 +326,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);
--
2.17.1
\
 
 \ /
  Last update: 2019-07-10 11:00    [W:0.148 / U:0.924 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site