From: Andi Kleen <andi@firstfloor.org>
To: Milian Wolff <milian.wolff@kdab.com>
Cc: perf group <linux-perf-users@vger.kernel.org>,
Hemant Kumar <hkshaw@linux.vnet.ibm.com>
Subject: Re: user-defined static trace points
Date: Tue, 01 Mar 2016 11:18:52 -0800 [thread overview]
Message-ID: <871t7unh0j.fsf@tassilo.jf.intel.com> (raw)
In-Reply-To: <5632782.TcXtSY8oxg@milian-kdab2> (Milian Wolff's message of "Tue, 01 Mar 2016 16:53:27 +0100")
Milian Wolff <milian.wolff@kdab.com> writes:
> Hey all,
>
> I'm aware that we can add custum user-defined dynamic trace points using `perf
> probe`. But this is unwieldy for some larger applications, esp. if we
> recompile them often. Is there a public API (that I could not find so far), to
> define static trace points in userspace code?
>
> I found
> http://www.brendangregg.com/blog/2015-07-03/hacking-linux-usdt-ftrace.html
> which references https://www.sourceware.org/systemtap/wiki/
> AddingUserSpaceProbingToApps for systemtap, but on my machine I don't have a
> <sys/sdt.h> header.
You need to install systemtap-devel or similar.
> Would such trace points be useable by perf? https://
> lwn.net/Articles/570818/ doesn't seem to be included, i.e. I don't have `perf
> probe --markers` with a recent build of perf.
There is a patch to teach perf about SDT probes, but so far it has not
been integrated. You can use them from systemtap or gdb though.
https://lwn.net/Articles/569622/
Perhaps Hemant needs to resubmit?
>
> If someone could point me into the right direction, that would be highly
> appreciated. I would also like to know about the performance impact of adding
> static trace points to code. If it is low, I'd then try to add such trace
> points to Qt upstream in some GUI related areas, e.g. to investigate FPS or
> similar.
When they are disabled they are just nops (so basically free)
When enabled it is an exception so not super cheap.
-Andi
--
ak@linux.intel.com -- Speaking for myself only
next prev parent reply other threads:[~2016-03-01 19:18 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-01 15:53 user-defined static trace points Milian Wolff
2016-03-01 19:18 ` Andi Kleen [this message]
2016-03-02 6:51 ` Hemant Kumar
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=871t7unh0j.fsf@tassilo.jf.intel.com \
--to=andi@firstfloor.org \
--cc=hkshaw@linux.vnet.ibm.com \
--cc=linux-perf-users@vger.kernel.org \
--cc=milian.wolff@kdab.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.