From: Steven Rostedt <rostedt@goodmis.org>
To: Tzvetomir Stoyanov <tz.stoyanov@gmail.com>
Cc: Dario Faggioli <dfaggioli@suse.com>,
Linux Trace Devel <linux-trace-devel@vger.kernel.org>
Subject: Re: [PATCH v28 0/8] Timestamp synchronization of host - guest tracing session
Date: Wed, 10 Feb 2021 17:02:46 -0500 [thread overview]
Message-ID: <20210210170246.727e5773@gandalf.local.home> (raw)
In-Reply-To: <CAPpZLN5wdN1V5JTbpdPZQmYx2avnxUJCcZaExGb6-yP1Ly-Ktw@mail.gmail.com>
On Tue, 9 Feb 2021 19:01:04 +0200
Tzvetomir Stoyanov <tz.stoyanov@gmail.com> wrote:
> > Ok, is there a WiP already, or someone working on it? I'm asking
> > because maybe I can help.
>
> None is working on that yet, any help is highly appreciated :) I just
> created an issue in Bugzilla for that:
> https://bugzilla.kernel.org/show_bug.cgi?id=211657
I had the below patch locally for some time now. It's a somewhat a hack, but
should work. But this should be done properly. The hack below works if you
include only two files, the host first followed by the guest:
trace-cmd report -i trace-host.dat -i trace-guest.dat
Also, the following patch should be applied as well:
https://patchwork.kernel.org/project/linux-trace-devel/patch/20210210164543.5ecd9dbd@gandalf.local.home/
-- Steve
Index: trace-cmd.git/tracecmd/trace-read.c
===================================================================
--- trace-cmd.git.orig/tracecmd/trace-read.c
+++ trace-cmd.git/tracecmd/trace-read.c
@@ -339,6 +339,9 @@ static void add_input(const char *file)
last_input_file = item;
}
+static struct tracecmd_input *host;
+static struct tracecmd_input *guest;
+
static void add_handle(struct tracecmd_input *handle, const char *file)
{
struct handle_list *item;
@@ -358,6 +361,12 @@ static void add_handle(struct tracecmd_i
max_file_size = strlen(item->file);
}
list_add_tail(&item->list, &handle_list);
+ if (handle_list.next != &item->list) {
+ item = container_of(handle_list.next,
+ struct handle_list, list);
+ host = item->handle;
+ guest = handle;
+ }
}
static void free_inputs(void)
@@ -1283,6 +1292,8 @@ static void read_data_info(struct list_h
}
}
+ tracecmd_pair_peer(guest, host);
+
if (otype != OUTPUT_NORMAL)
return;
next prev parent reply other threads:[~2021-02-10 22:03 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 ` [PATCH v28 1/8] trace-cmd: Save command lines in VM agent Tzvetomir Stoyanov (VMware)
2021-02-17 20:55 ` 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 [this message]
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=20210210170246.727e5773@gandalf.local.home \
--to=rostedt@goodmis.org \
--cc=dfaggioli@suse.com \
--cc=linux-trace-devel@vger.kernel.org \
--cc=tz.stoyanov@gmail.com \
/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).