From: "O Mahony, Billy" <billy.o.mahony@intel.com>
To: Josh Stone <jistone@redhat.com>, David Smith <dsmith@redhat.com>
Cc: "systemtap@sourceware.org" <systemtap@sourceware.org>
Subject: RE: reducing cost of user-space probes
Date: Tue, 25 Apr 2017 09:11:00 -0000 [thread overview]
Message-ID: <03135AEA779D444E90975C2703F148DC2F8B7259@IRSMSX107.ger.corp.intel.com> (raw)
In-Reply-To: <a863e8ad-20e3-5135-6112-23aee80a08d3@redhat.com>
Hi David,
Thanks for that tip. I'll read up on it.
Cheers,
Billy
> -----Original Message-----
> From: Josh Stone [mailto:jistone@redhat.com]
> Sent: Monday, April 24, 2017 7:38 PM
> To: David Smith <dsmith@redhat.com>; O Mahony, Billy
> <billy.o.mahony@intel.com>
> Cc: systemtap@sourceware.org
> Subject: Re: reducing cost of user-space probes
>
> On 04/24/2017 08:49 AM, David Smith wrote:
> >> Does this mean that each time the probe is hit that a system call is made
> to this new .ko module? That would surely mean quite a lot of overhead. If
> this is correct, can this overhead be avoided for user space probes.
> >
> > The default "linux" runtime generates source for a kernel module,
> > compiles and installs it behind the scenes. That's how the default
> > runtime works. A system call is not made to the kernel module every
> > time the probe is hit (even it it wanted to, kernel modules can't call
> > system calls). Systemtap uses a kernel feature called 'uprobes' to
> > handle user-space probe hits.
>
> It's not a syscall, rather an int3 trap, but the overhead is roughly the same.
> You pay the cost of a transition to and from ring0 *every* time, even if you
> otherwise short-circuit the probe with 'next' or similar.
>
> This is where "stap --runtime=dyninst" might shine, as the probe executes
> entirely in-process.
next prev parent reply other threads:[~2017-04-25 9:11 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-24 11:59 O Mahony, Billy
2017-04-24 12:17 ` Arkady
2017-04-24 13:08 ` O Mahony, Billy
2017-04-24 13:22 ` Arkady
2017-04-24 15:50 ` David Smith
2017-04-24 18:37 ` Josh Stone
2017-04-25 9:11 ` O Mahony, Billy [this message]
2017-05-08 16:20 ` O Mahony, Billy
2017-05-10 20:08 ` David Smith
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=03135AEA779D444E90975C2703F148DC2F8B7259@IRSMSX107.ger.corp.intel.com \
--to=billy.o.mahony@intel.com \
--cc=dsmith@redhat.com \
--cc=jistone@redhat.com \
--cc=systemtap@sourceware.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 read-only IMAP folder(s) and NNTP newsgroup(s).