linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/2] Enable new kprobe event at boot
@ 2019-05-22  8:32 Masami Hiramatsu
  2019-05-22  8:32 ` [PATCH v2 1/2] kprobes: Initialize kprobes at postcore_initcall Masami Hiramatsu
  2019-05-22  8:32 ` [PATCH v2 2/2] tracing/kprobe: Add kprobe_event= boot parameter Masami Hiramatsu
  0 siblings, 2 replies; 16+ messages in thread
From: Masami Hiramatsu @ 2019-05-22  8:32 UTC (permalink / raw)
  To: Steven Rostedt
  Cc: Ingo Molnar, Naveen N . Rao, Anil S Keshavamurthy,
	David S . Miller, Masami Hiramatsu, linux-kernel, linux-doc

Hi,

This v2 series adds a kernel parameter, 'kprobe_event=' to add and enable
new kprobe events at boot time.

In this version, I changed to use postcore_initcall() instead of
subsys_initcall() for kprobes initialization.

Currently ftrace can enable some existing trace events at boot time.
This also allows admin/developer to add new kprobe-events at boot
time to debug device drivers etc.

The syntax is similar to tracing/kprobe_events interface, but
uses ',' and ';' instead of ' ' and '\n' respectively. e.g.

  kprobe_event=p,func1,$arg1,$arg2;p,func2,$arg1

will add probes on func1 with the 1st and the 2nd arguments and on
func2 with the 1st argument.

Note that 'trace_event=' option enables trace event at very early
timing, but the events added by 'kprobe_event=' are enabled right
before enabling device drivers at this point. It is enough for
tracing device driver initialization etc.

Thank you,

---

Masami Hiramatsu (2):
      kprobes: Initialize kprobes at postcore_initcall
      tracing/kprobe: Add kprobe_event= boot parameter


 Documentation/admin-guide/kernel-parameters.txt |   13 ++++++
 Documentation/trace/kprobetrace.rst             |   14 ++++++
 kernel/kprobes.c                                |    3 -
 kernel/trace/trace_kprobe.c                     |   54 +++++++++++++++++++++++
 4 files changed, 82 insertions(+), 2 deletions(-)

--
Masami Hiramatsu (Linaro)

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2019-06-14 20:38 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-22  8:32 [PATCH v2 0/2] Enable new kprobe event at boot Masami Hiramatsu
2019-05-22  8:32 ` [PATCH v2 1/2] kprobes: Initialize kprobes at postcore_initcall Masami Hiramatsu
2019-05-22  8:32 ` [PATCH v2 2/2] tracing/kprobe: Add kprobe_event= boot parameter Masami Hiramatsu
2019-05-28 12:23   ` Anders Roxell
2019-05-28 12:36     ` Steven Rostedt
2019-05-28 13:39       ` Anders Roxell
2019-06-03 11:52         ` Masami Hiramatsu
2019-06-03 12:41           ` Masami Hiramatsu
2019-06-03 13:04             ` [PATCH] kprobes: Fix to init kprobes in subsys_initcall Masami Hiramatsu
2019-06-03 20:33               ` Anders Roxell
2019-06-04  9:06               ` Steven Rostedt
2019-06-04 15:56                 ` Masami Hiramatsu
2019-06-12  7:59               ` Masami Hiramatsu
2019-06-12 13:47                 ` Steven Rostedt
2019-06-13  7:08                   ` Masami Hiramatsu
2019-06-14 20:38                     ` Steven Rostedt

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).