From: ahmadkhorrami via lttng-dev <lttng-dev@lists.lttng.org>
To: Namhyung Kim <namhyung@kernel.org>
Cc: linux-trace-users-owner@vger.kernel.org,
Steven Rostedt <rostedt@goodmis.org>,
Linux-trace Users <linux-trace-users@vger.kernel.org>,
lttng-dev@lists.lttng.org
Subject: Re: [lttng-dev] Capturing User-Level Function Calls/Returns
Date: Thu, 16 Jul 2020 20:37:13 +0430 [thread overview]
Message-ID: <42d8f4d107d2117fb246b8ff1890e301@ut.ac.ir> (raw)
Message-ID: <20200716160713.yqLeAHNpyw1Bx3Dll5F9L3OeAKGoMQGIeJPND86RyIE@z> (raw)
In-Reply-To: <CAM9d7chE3WQm2e4EA4i09Q1hOaGt2hrPHoF2d0tjqhciPceB9g@mail.gmail.com>
Hi Namhyung,
This seems really interesting and is what I am looking for. Can it
capture all function entries/exits? I mean does it fully handle variable
instruction sizes in dynamic mode?
In any case, thanks! and I hope that it becomes stable as soon as
possible, so that everyone can use it.
Regards.
On 2020-07-16 05:34, Namhyung Kim wrote:
> Hi all,
>
> On Thu, Jul 16, 2020 at 3:28 AM Steven 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.
>
> 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.
It's in https://github.com/namhyung/uftrace
Basically it also requires recompilation to add mcount calls for each
function.
But it now also supports dynamic tracing without any recompilation.. :)
It's still experimental and has some limitation, but the idea is to copy
first 5 bytes (on x86_64) somewhere and replace it to a call
instruction.
Thanks
Namhyung
_______________________________________________
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
next prev parent reply other threads:[~2020-07-16 16:07 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <e9c7400ff0075f3beba2863c4432a905@ut.ac.ir>
2020-07-15 18:28 ` Capturing User-Level Function Calls/Returns Steven Rostedt
2020-07-15 18:28 ` [lttng-dev] " Steven Rostedt via lttng-dev
2020-07-15 18:45 ` Mathieu Desnoyers
2020-07-15 18:45 ` [lttng-dev] " Mathieu Desnoyers via lttng-dev
2020-07-15 21:39 ` ahmadkhorrami
2020-07-15 21:39 ` [lttng-dev] " ahmadkhorrami via lttng-dev
2020-07-15 21:48 ` Steven Rostedt
2020-07-15 21:48 ` [lttng-dev] " Steven Rostedt via lttng-dev
2020-07-15 22:25 ` ahmadkhorrami
2020-07-15 22:25 ` [lttng-dev] " ahmadkhorrami via lttng-dev
2020-07-16 1:06 ` Michel Dagenais via lttng-dev
2020-07-16 1:06 ` [lttng-dev] " Michel Dagenais via lttng-dev
2020-07-16 1:49 ` Frank Ch. Eigler
2020-07-16 1:49 ` Frank Ch. Eigler via lttng-dev
2020-07-16 16:26 ` ahmadkhorrami
2020-07-16 16:26 ` ahmadkhorrami via lttng-dev
2020-07-16 16:20 ` ahmadkhorrami
2020-07-16 16:20 ` ahmadkhorrami via lttng-dev
2020-07-16 16:34 ` ahmadkhorrami
2020-07-16 16:34 ` ahmadkhorrami via lttng-dev
2020-07-16 1:04 ` Namhyung Kim
2020-07-16 1:04 ` [lttng-dev] " Namhyung Kim via lttng-dev
2020-07-16 16:07 ` ahmadkhorrami [this message]
2020-07-16 16:07 ` ahmadkhorrami 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=42d8f4d107d2117fb246b8ff1890e301@ut.ac.ir \
--to=lttng-dev@lists.lttng.org \
--cc=ahmadkhorrami@ut.ac.ir \
--cc=linux-trace-users-owner@vger.kernel.org \
--cc=linux-trace-users@vger.kernel.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).