diff mbox series

[v14,08/19] trace-cmd: --del the tracee address map into the guest's trace.dat file

Message ID 20191127140247.258766-9-tz.stoyanov@gmail.com (mailing list archive)
State Superseded
Headers show
Series Timestamp synchronization of host - guest | expand

Commit Message

Tzvetomir Stoyanov (VMware) Nov. 27, 2019, 2:02 p.m. UTC
The trace-cmd option "--proc-map" saves the address map of the traced
applications in the trace.dat file. It does not work if that option is
specified as guest command line parameter.

Signed-off-by: Tzvetomir Stoyanov (VMware) <tz.stoyanov@gmail.com>
---
 tracecmd/trace-record.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/tracecmd/trace-record.c b/tracecmd/trace-record.c
index fd7ca82..a08ee52 100644
--- a/tracecmd/trace-record.c
+++ b/tracecmd/trace-record.c
@@ -3802,6 +3802,7 @@  enum {
 
 static void add_options(struct tracecmd_output *handle, struct common_record_context *ctx)
 {
+	struct buffer_instance *instance;
 	int type = 0;
 
 	if (ctx->date2ts) {
@@ -3818,6 +3819,9 @@  static void add_options(struct tracecmd_output *handle, struct common_record_con
 	add_option_hooks(handle);
 	add_uname(handle);
 	add_version(handle);
+	for_all_instances(instance) {
+		add_pid_maps(handle, instance);
+	}
 }
 
 static void write_guest_file(struct buffer_instance *instance)
@@ -3953,10 +3957,6 @@  static void record_data(struct common_record_context *ctx)
 		if (!no_top_instance() && !top_instance.msg_handle)
 			print_stat(&top_instance);
 
-		for_all_instances(instance) {
-			add_pid_maps(handle, instance);
-		}
-
 		tracecmd_append_cpu_data(handle, local_cpu_count, temp_files);
 
 		for (i = 0; i < max_cpu_count; i++)