[PATCH 25/25] perf tools: Have the process properly sythesized in subsequent data files
From: Jiri Olsa
Date: Sun Sep 01 2013 - 06:39:05 EST
Change the target so the sythesizing routine would think
it needs to synthesized whole process, because there's no
exec COMM event for subsequent data files.
Signed-off-by: Jiri Olsa <jolsa@xxxxxxxxxx>
Cc: Corey Ashford <cjashfor@xxxxxxxxxxxxxxxxxx>
Cc: Frederic Weisbecker <fweisbec@xxxxxxxxx>
Cc: Ingo Molnar <mingo@xxxxxxx>
Cc: Namhyung Kim <namhyung@xxxxxxxxxx>
Cc: Paul Mackerras <paulus@xxxxxxxxx>
Cc: Peter Zijlstra <a.p.zijlstra@xxxxxxxxx>
Cc: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
Cc: Andi Kleen <ak@xxxxxxxxxxxxxxx>
Cc: David Ahern <dsahern@xxxxxxxxx>
---
tools/perf/builtin-record.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
index b0c5937..0dbf9a3 100644
--- a/tools/perf/builtin-record.c
+++ b/tools/perf/builtin-record.c
@@ -516,6 +516,8 @@ static int multi_file_finish(struct perf_record *rec)
static int multi_file_init(struct perf_record *rec)
{
struct perf_data_file *file = rec->file;
+ struct perf_record_opts *opts = &rec->opts;
+ static bool target_change;
int err;
if (multi_file_name(rec->file, rec->multi_idx++))
@@ -529,6 +531,15 @@ static int multi_file_init(struct perf_record *rec)
if (err)
goto out_close;
+ /*
+ * XXX HACK - Make the target looks like we have pid
+ * so we get the process fully synthetised.
+ */
+ if (perf_target__none(&opts->target) && !target_change) {
+ target_change = true;
+ opts->target.pid = "multi";
+ }
+
err = synthesize_record_file(rec);
if (err)
goto out_close;
--
1.7.11.7
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/