From: Steven Rostedt <rostedt@goodmis.org>
To: richard clark <richard.xnu.clark@gmail.com>
Cc: bristot@kernel.org, linux-trace-devel@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: Question about 'for_each_kernel_tracepoint(...)' function
Date: Fri, 21 Oct 2022 08:32:54 -0400 [thread overview]
Message-ID: <20221021083254.3c879824@rorschach.local.home> (raw)
In-Reply-To: <CAJNi4rPPDp0xeEmqMBqX-pBqgAX7Biivyd+P_zhC7Y0-K3W0VQ@mail.gmail.com>
On Fri, 21 Oct 2022 11:51:20 +0800
richard clark <richard.xnu.clark@gmail.com> wrote:
> On Fri, Oct 21, 2022 at 10:12 AM Steven Rostedt <rostedt@goodmis.org> wrote:
> >
> > On Fri, 21 Oct 2022 09:43:14 +0800
> > richard clark <richard.xnu.clark@gmail.com> wrote:
> >
> >
> > > Ah, as you can see that I did it, but the result is not what I
> > > expected :-). Help?
> >
> > Looking at the code, I see it does indeed only look at builtin tracepoints.
>
> What the logic behind is not to implement a function like
> 'for_each_tracepoints' instead of 'for_each_kernel_tracepoint' to find
> all the TPs defined by both builtin kernel and external kernel
> modules, just like we can find all the kernel symbols and exported
> symbols from external module?
Why? It's not needed upstream. If you push your code upstream and it's
something to get accepted, then we can think about adding that.
>
> >
> > But if you want one module to have access to the tracepoints of another,
> > then you can have the first one export it.
> >
> > EXPORT_SYMBOL_TRACEPOINT_GPL(function_event_a);
> >
> > And then module b should have access to it.
> >
> Yes, but module b needs to register a new probe call back function for
> the new TPs defined by module a in my case, so first it needs to find
> the TPs defined by module a. Any comments?
No, because I have no idea what you are doing or why you need this.
-- Steve
next prev parent reply other threads:[~2022-10-21 12:32 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-20 9:32 Question about 'for_each_kernel_tracepoint(...)' function richard clark
2022-10-20 15:14 ` Steven Rostedt
2022-10-21 1:43 ` richard clark
2022-10-21 2:12 ` Steven Rostedt
2022-10-21 3:51 ` richard clark
2022-10-21 12:32 ` Steven Rostedt [this message]
2022-10-22 2:55 ` richard clark
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=20221021083254.3c879824@rorschach.local.home \
--to=rostedt@goodmis.org \
--cc=bristot@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-trace-devel@vger.kernel.org \
--cc=richard.xnu.clark@gmail.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 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).