From: Steven Rostedt <rostedt@goodmis.org>
To: Nam Cao <namcao@linutronix.de>
Cc: naveen@kernel.org, anil.s.keshavamurthy@intel.com,
davem@davemloft.net, mhiramat@kernel.org,
linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org,
john.ogness@linutronix.de
Subject: Re: kprobe on local function
Date: Wed, 22 Jan 2025 17:29:36 -0500 [thread overview]
Message-ID: <20250122172936.09bc8c9a@gandalf.local.home> (raw)
In-Reply-To: <20250122075939.qw7HsuMd@linutronix.de>
On Wed, 22 Jan 2025 08:59:39 +0100
Nam Cao <namcao@linutronix.de> wrote:
> Hi,
>
> I installed a kretprobe on the function "rt_mutex_slowunlock". Although the
> function is called, the probe is never hit.
>
How did you install the kretprobe?
> The reason is because there are 3 copies of rt_mutex_slowunlock() in
> vmlinux (at least for x86 defconfig + CONFIG_PREEMPT_RT). But probe point
> is only installed in 1 copy.
>
> Is this considered a bug? Or is kprobe not intended to be used for local
> function? Should we modify kprobe to support such cases?
It's not a bug, but just the way the compiler works.
Have you tried "perf probe" to install the probes? That uses dwarf info to
find all the functions.
-- Steve
next prev parent reply other threads:[~2025-01-22 22:29 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-22 7:59 kprobe on local function Nam Cao
2025-01-22 22:29 ` Steven Rostedt [this message]
2025-01-23 1:48 ` Masami Hiramatsu
2025-01-23 2:42 ` Nam Cao
2025-01-23 2:48 ` Steven Rostedt
2025-01-24 16:16 ` Masami Hiramatsu
2025-01-29 6:41 ` Nam Cao
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=20250122172936.09bc8c9a@gandalf.local.home \
--to=rostedt@goodmis.org \
--cc=anil.s.keshavamurthy@intel.com \
--cc=davem@davemloft.net \
--cc=john.ogness@linutronix.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=mhiramat@kernel.org \
--cc=namcao@linutronix.de \
--cc=naveen@kernel.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