[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20220622104108.3a1cf1ac050eccba0ee2ef6b@kernel.org>
Date: Wed, 22 Jun 2022 10:41:08 +0900
From: Masami Hiramatsu (Google) <mhiramat@...nel.org>
To: Steven Rostedt <rostedt@...dmis.org>
Cc: Alexei Starovoitov <ast@...nel.org>,
Daniel Borkmann <daniel@...earbox.net>,
Andrii Nakryiko <andrii@...nel.org>,
Jiri Olsa <jolsa@...nel.org>, linux-kernel@...r.kernel.org,
netdev@...r.kernel.org, bpf@...r.kernel.org
Subject: Re: [PATCH bpf v2 1/2] fprobe: samples: Add use_trace option and
show hit/missed counter
On Fri, 17 Jun 2022 12:06:51 -0400
Steven Rostedt <rostedt@...dmis.org> wrote:
> On Wed, 8 Jun 2022 01:11:02 +0900
> "Masami Hiramatsu (Google)" <mhiramat@...nel.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@...nel.org>
Powered by blists - more mailing lists