All of lore.kernel.org
 help / color / mirror / Atom feed
From: Masami Hiramatsu (Google) <mhiramat@kernel.org>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Alexei Starovoitov <ast@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>,
	Andrii Nakryiko <andrii@kernel.org>, Jiri Olsa <jolsa@kernel.org>,
	linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
	bpf@vger.kernel.org
Subject: Re: [PATCH bpf v2 1/2] fprobe: samples: Add use_trace option and show hit/missed counter
Date: Wed, 22 Jun 2022 10:41:08 +0900	[thread overview]
Message-ID: <20220622104108.3a1cf1ac050eccba0ee2ef6b@kernel.org> (raw)
In-Reply-To: <20220617120651.1e525a02@gandalf.local.home>

On Fri, 17 Jun 2022 12:06:51 -0400
Steven Rostedt <rostedt@goodmis.org> wrote:

> On Wed,  8 Jun 2022 01:11:02 +0900
> "Masami Hiramatsu (Google)" <mhiramat@kernel.org> wrote:
> 
> >  
> >  static void sample_entry_handler(struct fprobe *fp, unsigned long ip, struct pt_regs *regs)
> >  {
> > -	pr_info("Enter <%pS> ip = 0x%p\n", (void *)ip, (void *)ip);
> > +	if (use_trace)
> > +		trace_printk("Enter <%pS> ip = 0x%p\n", (void *)ip, (void *)ip);
> 
> Could we add a comment stating something like "this is just an example, no
> kernel code should call trace_printk() except when actively debugging".

Indeed. I also add a description for this option so that user can
understand this is just a debug option.

Thank you,


-- 
Masami Hiramatsu (Google) <mhiramat@kernel.org>

  reply	other threads:[~2022-06-22  1:41 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-07 16:10 [PATCH bpf v2 0/2] rethook: Reject getting a rethook if RCU is not watching Masami Hiramatsu (Google)
2022-06-07 16:11 ` [PATCH bpf v2 1/2] fprobe: samples: Add use_trace option and show hit/missed counter Masami Hiramatsu (Google)
2022-06-17 16:06   ` Steven Rostedt
2022-06-22  1:41     ` Masami Hiramatsu [this message]
2022-06-07 16:11 ` [PATCH bpf v2 2/2] rethook: Reject getting a rethook if RCU is not watching Masami Hiramatsu (Google)
2022-06-17 16:19   ` Steven Rostedt
2022-06-17 11:27 ` [PATCH bpf v2 0/2] " Jiri Olsa

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=20220622104108.3a1cf1ac050eccba0ee2ef6b@kernel.org \
    --to=mhiramat@kernel.org \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.