linux-trace-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Tzvetomir Stoyanov (VMware)" <tz.stoyanov@gmail.com>
To: rostedt@goodmis.org
Cc: linux-trace-devel@vger.kernel.org
Subject: [PATCH v28 1/8] trace-cmd: Save command lines in VM agent
Date: Mon,  8 Feb 2021 08:17:36 +0200	[thread overview]
Message-ID: <20210208061743.510964-2-tz.stoyanov@gmail.com> (raw)
In-Reply-To: <20210208061743.510964-1-tz.stoyanov@gmail.com>

Command lines were not saved in the guest tracing file, due to bug
inrtoduced by commit:
https://git.kernel.org/pub/scm/utils/trace-cmd/trace-cmd.git/commit/?id=1eea02a4bef10507d157489a1ee97f273db7b319

Signed-off-by: Tzvetomir Stoyanov (VMware) <tz.stoyanov@gmail.com>
---
 lib/trace-cmd/include/private/trace-cmd-private.h | 3 +++
 lib/trace-cmd/trace-output.c                      | 4 ++--
 tracecmd/trace-record.c                           | 1 +
 3 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/lib/trace-cmd/include/private/trace-cmd-private.h b/lib/trace-cmd/include/private/trace-cmd-private.h
index a08566e6..d370fa8b 100644
--- a/lib/trace-cmd/include/private/trace-cmd-private.h
+++ b/lib/trace-cmd/include/private/trace-cmd-private.h
@@ -503,4 +503,7 @@ void *tracecmd_record_page(struct tracecmd_input *handle,
 void *tracecmd_record_offset(struct tracecmd_input *handle,
 			     struct tep_record *record);
 
+int save_tracing_file_data(struct tracecmd_output *handle,
+			   const char *filename);
+
 #endif /* _TRACE_CMD_PRIVATE_H */
diff --git a/lib/trace-cmd/trace-output.c b/lib/trace-cmd/trace-output.c
index 032c8ff4..4ffb4d47 100644
--- a/lib/trace-cmd/trace-output.c
+++ b/lib/trace-cmd/trace-output.c
@@ -797,8 +797,8 @@ static int read_ftrace_printk(struct tracecmd_output *handle)
 	return -1;
 }
 
-static int save_tracing_file_data(struct tracecmd_output *handle,
-						const char *filename)
+int save_tracing_file_data(struct tracecmd_output *handle,
+			   const char *filename)
 {
 	unsigned long long endian8;
 	char *file = NULL;
diff --git a/tracecmd/trace-record.c b/tracecmd/trace-record.c
index a1c4e919..a0a0b8b5 100644
--- a/tracecmd/trace-record.c
+++ b/tracecmd/trace-record.c
@@ -3770,6 +3770,7 @@ static void setup_agent(struct buffer_instance *instance,
 	network_handle = tracecmd_create_init_fd_msg(instance->msg_handle,
 						     listed_events);
 	add_options(network_handle, ctx);
+	save_tracing_file_data(network_handle, "saved_cmdlines");
 	tracecmd_write_cpus(network_handle, instance->cpu_count);
 	tracecmd_write_options(network_handle);
 	tracecmd_msg_finish_sending_data(instance->msg_handle);
-- 
2.29.2


  reply	other threads:[~2021-02-08  6:18 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-08  6:17 [PATCH v28 0/8] Timestamp synchronization of host - guest tracing session Tzvetomir Stoyanov (VMware)
2021-02-08  6:17 ` Tzvetomir Stoyanov (VMware) [this message]
2021-02-17 20:55   ` [PATCH v28 1/8] trace-cmd: Save command lines in VM agent Steven Rostedt
2021-02-08  6:17 ` [PATCH v28 2/8] trace-cmd: Fix bug in getting tracing dir in trace-cmd agent Tzvetomir Stoyanov (VMware)
2021-02-08  6:17 ` [PATCH v28 3/8] trace-cmd: Removed unused s64 define Tzvetomir Stoyanov (VMware)
2021-02-08  6:17 ` [PATCH v28 4/8] trace-cmd: Add timestamp synchronization per vCPU Tzvetomir Stoyanov (VMware)
2021-02-08  6:17 ` [PATCH v28 5/8] trace-cmd: Add dummy function to initialize timestamp sync logic Tzvetomir Stoyanov (VMware)
2021-02-08  6:17 ` [PATCH v28 6/8] trace-cmd: [POC] PTP-like algorithm for host - guest timestamp synchronization Tzvetomir Stoyanov (VMware)
2021-02-08  6:17 ` [PATCH v28 7/8] trace-cmd: Debug scripts for " Tzvetomir Stoyanov (VMware)
2021-02-08  6:17 ` [PATCH v28 8/8] trace-cmd [POC]: Add KVM timestamp synchronization plugin Tzvetomir Stoyanov (VMware)
2021-02-16 20:48   ` Steven Rostedt
2021-02-09  5:32 ` [PATCH v28 0/8] Timestamp synchronization of host - guest tracing session Dario Faggioli
2021-02-09  6:03   ` Tzvetomir Stoyanov
2021-02-09  6:08     ` Tzvetomir Stoyanov
2021-02-09  7:28       ` Dario Faggioli
2021-02-09 11:44         ` Tzvetomir Stoyanov
2021-02-09 12:24           ` Dario Faggioli
2021-02-09 13:00             ` Tzvetomir Stoyanov
2021-02-09 15:28               ` Dario Faggioli
2021-02-09 17:01                 ` Tzvetomir Stoyanov
2021-02-10 22:02                   ` Steven Rostedt
2021-02-10 23:35                     ` Dario Faggioli
2021-02-10 21:59             ` Steven Rostedt
2021-02-10 23:33               ` Dario Faggioli
2021-02-09  7:18     ` Dario Faggioli

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210208061743.510964-2-tz.stoyanov@gmail.com \
    --to=tz.stoyanov@gmail.com \
    --cc=linux-trace-devel@vger.kernel.org \
    --cc=rostedt@goodmis.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).