From: "Mousa, Anas via lttng-dev" <lttng-dev@lists.lttng.org>
To: "lttng-dev@lists.lttng.org" <lttng-dev@lists.lttng.org>
Subject: [lttng-dev] (no subject)
Date: Tue, 20 Jun 2023 10:21:10 +0000 [thread overview]
Message-ID: <1255477015ae4da8a6523b5d204334da@amazon.com> (raw)
[-- Attachment #1.1: Type: text/plain, Size: 2566 bytes --]
Hello,
I've recently profiled the latency of LTTng tracepoints on arm platforms,
using the follow sample program:
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
static inline uint64_t get_time_nsec(void)
{
struct timespec ts;
if (caa_unlikely(clock_gettime(CLOCK_MONOTONIC, &ts))) {
ts.tv_sec = 0;
ts.tv_nsec = 0;
}
return ((uint64_t) ts.tv_sec * 1000000000ULL) + ts.tv_nsec;
}
int main(int argc, char *argv[])
{
unsigned int i;
int tp_num = 0;
uint64_t total_time = 0;
uint64_t now, nowz;
if (argc > 1) {
sscanf (argv[1],"%d",&tp_num);
}
for (i = 0; i < tp_num; i++) {
now = get_time_nsec();
lttng_ust_tracepoint(hello_world, my_first_tracepoint,
i, "some_str");
nowz = get_time_nsec();
total_time += (nowz - now);
}
if (tp_num) {
printf("---------------------------Average TP time is %"PRIu64"---------------------------\n", total_time / tp_num);
}
}
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
I observed a big average latency variance on different platforms when tracing a high number (many thousands to millions) of tracepoints:
* [platform 1] with CPU info running a linux kernel based on Buildroot (4.19.273 aarch64 GNU/Linux):
BogoMIPS : 187.50
Features : fp asimd evtstrm aes pmull sha1 sha2 crc32 cpuid
CPU implementer : 0x41
CPU architecture: 8
CPU variant : 0x0
CPU part : 0xd08
CPU revision : 3
* Saw an average latency of 2-3usec
* [platform 2] with CPU info running a linux kernel based on Amazon Linux (4.14.294-220.533.amzn2.aarch64 aarch64 GNU/Linux):
BogoMIPS : 243.75
Features : fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm lrcpc dcpop asimddp ssbs
CPU implementer : 0x41
CPU architecture: 8
CPU variant : 0x3
CPU part : 0xd0c
CPU revision : 1
* Saw an average latency of ~0.5usec
Are there any suggestions to root cause the high latency and potentially improve it on platform 1?
Thanks and best regards,
Anas.
[-- Attachment #1.2: Type: text/html, Size: 96979 bytes --]
[-- Attachment #2: Type: text/plain, Size: 156 bytes --]
_______________________________________________
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
next reply other threads:[~2023-06-20 10:21 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-20 10:21 Mousa, Anas via lttng-dev [this message]
-- strict thread matches above, loose matches on Subject: below --
2023-03-21 13:30 [lttng-dev] (no subject) Ondřej Surý via lttng-dev
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=1255477015ae4da8a6523b5d204334da@amazon.com \
--to=lttng-dev@lists.lttng.org \
--cc=anasmous@amazon.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 read-only IMAP folder(s) and NNTP newsgroup(s).