linux-trace-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
To: ahmadkhorrami <ahmadkhorrami@ut.ac.ir>
Cc: linux-trace-users <linux-trace-users@vger.kernel.org>,
	lttng-dev <lttng-dev@lists.lttng.org>,
	Jeremie Galarneau <jeremie.galarneau@efficios.com>,
	Namhyung Kim <namhyung@kernel.org>, rostedt <rostedt@goodmis.org>
Subject: Re: Capturing User-Level Function Calls/Returns
Date: Wed, 15 Jul 2020 14:45:18 -0400 (EDT)	[thread overview]
Message-ID: <83963025.14828.1594838718290.JavaMail.zimbra@efficios.com> (raw)
In-Reply-To: <20200715142849.0bfe909a@oasis.local.home>

----- On Jul 15, 2020, at 2:28 PM, rostedt rostedt@goodmis.org wrote:

> On Wed, 15 Jul 2020 20:37:16 +0430
> ahmadkhorrami <ahmadkhorrami@ut.ac.ir> wrote:
> 
>> Hi,
>> What is the most efficient way to capture occurrence of a function
>> call/return of a binary program in userspace?
>> It seems the answer is Uprobes. 1) Am I right?
>> But Uprobes use "int" instruction which leads to a switch into kernel
>> mode. 2) Wouldn't it be better to avoid this transition?
>> I'm looking forward to your reply and will be happy to read your
>> opinions.
>> Regards.
> 
> 
> Hi, I believe LTTng has utilities that can help you trace user space
> programs.

Indeed, it is documented here:

https://lttng.org/docs/#doc-liblttng-ust-cyg-profile

If your program is generating function entry/exit at a very
high rate (which goes beyond your available I/O throughput and
lasts longer than the memory you have available for ring buffers),
you will also probably want to use the "blocking-timeout" option
documented at:

https://lttng.org/docs/#doc-enabling-disabling-channels

Thanks,

Mathieu

> 
> I think there's also a users ftrace like utility that Namhyung was
> working on. But I don't know where in the development that is.
> 
> -- Steve

-- 
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com

  reply	other threads:[~2020-07-15 18:45 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-15 16:07 Capturing User-Level Function Calls/Returns ahmadkhorrami
2020-07-15 18:28 ` Steven Rostedt
2020-07-15 18:45   ` Mathieu Desnoyers [this message]
2020-07-15 21:39     ` ahmadkhorrami
2020-07-15 21:48       ` Steven Rostedt
2020-07-15 22:25         ` ahmadkhorrami
2020-07-16  1:06         ` [lttng-dev] " Michel Dagenais
2020-07-16  1:49           ` Frank Ch. Eigler
2020-07-16 16:26             ` ahmadkhorrami
2020-07-16 16:20           ` ahmadkhorrami
2020-07-16 16:34           ` ahmadkhorrami
2020-07-16  1:04   ` Namhyung Kim
2020-07-16 16:07     ` ahmadkhorrami

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=83963025.14828.1594838718290.JavaMail.zimbra@efficios.com \
    --to=mathieu.desnoyers@efficios.com \
    --cc=ahmadkhorrami@ut.ac.ir \
    --cc=jeremie.galarneau@efficios.com \
    --cc=linux-trace-users@vger.kernel.org \
    --cc=lttng-dev@lists.lttng.org \
    --cc=namhyung@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).