Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.os.linux.development.system > #818
| X-Received | by 2002:a05:622a:1a08:b0:403:27b2:85b5 with SMTP id f8-20020a05622a1a0800b0040327b285b5mr32096qtb.12.1690177793323; Sun, 23 Jul 2023 22:49:53 -0700 (PDT) |
|---|---|
| X-Received | by 2002:a05:6808:1a0e:b0:3a5:a925:826b with SMTP id bk14-20020a0568081a0e00b003a5a925826bmr8354260oib.2.1690177792926; Sun, 23 Jul 2023 22:49:52 -0700 (PDT) |
| Path | csiph.com!1.us.feeder.erje.net!feeder.erje.net!border-1.nntp.ord.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail |
| Newsgroups | comp.os.linux.development.system |
| Date | Sun, 23 Jul 2023 22:49:52 -0700 (PDT) |
| Injection-Info | google-groups.googlegroups.com; posting-host=2405:201:d023:3b0d:70d1:c976:96fd:3fb7; posting-account=-Ffp6woAAABjpoFQBIFeu6dv2jz5I1hd |
| NNTP-Posting-Host | 2405:201:d023:3b0d:70d1:c976:96fd:3fb7 |
| User-Agent | G2/1.0 |
| MIME-Version | 1.0 |
| Message-ID | <3ca0ddc3-9e52-484b-90dd-56a18a3fdb1bn@googlegroups.com> (permalink) |
| Subject | Command "strace -T" introducing too much overhead |
| From | Pavankumar S V <pavankumarsv96@gmail.com> |
| Injection-Date | Mon, 24 Jul 2023 05:49:53 +0000 |
| Content-Type | text/plain; charset="UTF-8" |
| Content-Transfer-Encoding | quoted-printable |
| Lines | 21 |
| Xref | csiph.com comp.os.linux.development.system:818 |
Show key headers only | View raw
Hello, I'm trying to check the execution time of each system call invoked by my application using strace -T. I got the trace output. But the time calculated by strace for each system call seemed inaccurate. To confirm the accuracy, I added few usleep(100) calls in my application. usleep is calling nanosleep() syscall. I expected the strace to show the time taken by nanosleep(100000) to be around 100 microseconds. But the values shown by strace for nanosleep(100000) is around 300 microseconds. For some calls, it is even showing 7 milliseconds. 1. What is the reason for so much fluctuation in the execution time of a system call. Is this the issue with strace calculation or nanosleep(100000) is really taking a lot more than 100 microseconds to execute? 2. If the issue is because of overhead introduced by strace, then the overhead is too much and strace is not useful to calculate the time taken by system call. Is there any way to avoid the overhead of strace? If not, is there any other tool to achieve the same?
Back to comp.os.linux.development.system | Previous | Next | Find similar
Command "strace -T" introducing too much overhead Pavankumar S V <pavankumarsv96@gmail.com> - 2023-07-23 22:49 -0700
csiph-web