From: ahmadkhorrami via lttng-dev <firstname.lastname@example.org> To: Mathieu Desnoyers <email@example.com> Cc: firstname.lastname@example.org, rostedt <email@example.com>, linux-trace-users <firstname.lastname@example.org>, lttng-dev <email@example.com>, Namhyung Kim <firstname.lastname@example.org> Subject: Re: [lttng-dev] Capturing User-Level Function Calls/Returns Date: Thu, 16 Jul 2020 02:09:50 +0430 [thread overview] Message-ID: <email@example.com> (raw) Message-ID: <20200715213950.oi7cHdDZXgsVkxjLFi7kX7nzhPYVouV8Sdmd-mAL7fE@z> (raw) In-Reply-To: <83963025.14828.1594838718290.JavaMail.firstname.lastname@example.org> Hi Steven and Mathieu, Firstly, many thanks! This method seems to be the most efficient method. But, IIUC, what you suggest requires source code compilation. I need an efficient dynamic method that, given the function address, captures its occurrence and stores some information from the execution context. Is there anything better than Uprobes perhaps with no trap into the kernel? Why do we need traps? Regards. On 2020-07-15 23:15, Mathieu Desnoyers wrote: > ----- On Jul 15, 2020, at 2:28 PM, rostedt email@example.com wrote: > > On Wed, 15 Jul 2020 20:37:16 +0430 > ahmadkhorrami <firstname.lastname@example.org> 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 _______________________________________________ lttng-dev mailing list email@example.com https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
next prev parent reply other threads:[~2020-07-16 13:07 UTC|newest] Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top [not found] <firstname.lastname@example.org> 2020-07-15 18:28 ` 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 [this message] 2020-07-15 21:39 ` 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 2020-07-16 16:07 ` [lttng-dev] " 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 \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --subject='Re: [lttng-dev] Capturing User-Level Function Calls/Returns' \ /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
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).