From: "Tzvetomir Stoyanov (VMware)" <tz.stoyanov@gmail.com>
To: rostedt@goodmis.org
Cc: linux-trace-devel@vger.kernel.org
Subject: [PATCH v3 4/5] trace-cmd: Add a define to enable per CPU timestamps synchronization
Date: Thu, 2 Apr 2020 13:58:30 +0300 [thread overview]
Message-ID: <20200402105831.263753-5-tz.stoyanov@gmail.com> (raw)
In-Reply-To: <20200402105831.263753-1-tz.stoyanov@gmail.com>
The new define TSYNC_PER_CPU, enabled by default, can be used to enable
the per CPU timestamps synchronization. It is mostly for development purposes,
to compare this new logic to the legacy one, where a single CPU is used.
Signed-off-by: Tzvetomir Stoyanov (VMware) <tz.stoyanov@gmail.com>
---
tracecmd/trace-tsync.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/tracecmd/trace-tsync.c b/tracecmd/trace-tsync.c
index d44c3850..8de846e1 100644
--- a/tracecmd/trace-tsync.c
+++ b/tracecmd/trace-tsync.c
@@ -31,6 +31,7 @@ static void *tsync_host_thread(void *data)
pthread_exit(0);
}
+#define TSYNC_PER_CPU
int tracecmd_host_tsync(struct buffer_instance *instance,
unsigned int tsync_port)
{
@@ -54,9 +55,11 @@ int tracecmd_host_tsync(struct buffer_instance *instance,
goto out;
}
+#ifdef TSYNC_PER_CPU
ret = trace_get_guest_cpu_mapping(instance->cid,
&instance->tsync.cpu_max,
&instance->tsync.cpu_pid);
+#endif
instance->tsync.msg_handle = msg_handle;
if (top_instance.clock)
--
2.25.1
next prev parent reply other threads:[~2020-04-02 10:58 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-02 10:58 [PATCH v3 0/5] Timestamp offsets calculation per host CPU Tzvetomir Stoyanov (VMware)
2020-04-02 10:58 ` [PATCH v3 1/5] trace-cmd: Time stamp offset " Tzvetomir Stoyanov (VMware)
2020-04-02 10:58 ` [PATCH v3 2/5] trace-cmd: Fix reading of the traceid option from trace.dat file Tzvetomir Stoyanov (VMware)
2020-04-02 10:58 ` [PATCH v3 3/5] trace-cmd: Add new API to merge two trace files Tzvetomir Stoyanov (VMware)
2020-04-02 10:58 ` Tzvetomir Stoyanov (VMware) [this message]
2020-04-02 10:58 ` [PATCH v3 5/5] trace-cmd: Use per CPU synchronization data when calculating timestamps offsets Tzvetomir Stoyanov (VMware)
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=20200402105831.263753-5-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).