linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: linux-kernel@vger.kernel.org, linux-trace-devel@vger.kernel.org
Cc: Ingo Molnar <mingo@kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Masami Hiramatsu <mhiramat@kernel.org>,
	"Tzvetomir Stoyanov" <tz.stoyanov@gmail.com>,
	Tom Zanussi <zanussi@kernel.org>
Subject: [PATCH v7 00/10] tracing: Creation of event probe
Date: Thu, 19 Aug 2021 00:13:21 -0400	[thread overview]
Message-ID: <20210819041321.105110033@goodmis.org> (raw)

The first 5 patches of this series has had Masami's updates as well as his
acks, and will no longer be in future series, as I'll be pushing them into
my linux-next queue.

Patch 6 received an ack from Masami, but I updated it, by pulling more out
of the old patch 7 and into that patch, adding more of the enum logic into
the internal processing of the set_print_fmt() code. This way, it adds the
switch statement, such that the addition of the eprobe only needs to add a
new case.

I pulled out the code from the old patch 7 that converts the parameter for
process_fetch_insn() regs into a void pointer called rec. I figured that
should be a separate patch as it's more set up for the eprobe code, then
having to do with the eprobe code itself.

For the eprobe code, I incorporated more of Masami's comments as well as
found some minor bugs. Those updates were:

Masami's suggestions:

 - Remove "return" for void function calls in trace_event_put_ref()
 - Used bit mask over checking separate bits of flags one at a time.
 - Check for duplicate eprobes.

Fixes:

 - Check for NULL pointer for probe_cleanup as there was an error path that
   could call it with a NULL pointer.
 - Check on create that it's for an eprobe (check for 'e'). Was breaking
   updates to kprobes and uprobes that were added by dynamic_events.
 - Add paranoid check of by enum to print_fmt call.
 - Fixed error_log ^ index handling

Other updates:

 - Updated the README to include eprobes
 - Added clear_dynamic_events() to selftests, to remove them even when
   there's a dependency between them.
 - Added a selftest to test the eprobes.


Steven Rostedt (VMware) (9):
      tracing: Add DYNAMIC flag for dynamic events
      tracing: Have dynamic events have a ref counter
      tracing/probe: Have traceprobe_parse_probe_arg() take a const arg
      tracing/probes: Allow for dot delimiter as well as slash for system names
      tracing/probes: Use struct_size() instead of defining custom macros
      tracing/probe: Change traceprobe_set_print_fmt() to take a type
      tracing/probes: Have process_fetch_insn() take a void * instead of pt_regs
      selftests/ftrace: Add clear_dynamic_events() to test cases
      selftests/ftrace: Add selftest for testing eprobe events

Tzvetomir Stoyanov (VMware) (1):
      tracing: Add a probe that attaches to trace events

----
 include/linux/trace_events.h                       |  52 +-
 kernel/trace/Makefile                              |   1 +
 kernel/trace/trace.c                               |   9 +-
 kernel/trace/trace.h                               |  18 +
 kernel/trace/trace_dynevent.c                      |  38 +
 kernel/trace/trace_dynevent.h                      |   4 +-
 kernel/trace/trace_eprobe.c                        | 932 +++++++++++++++++++++
 kernel/trace/trace_event_perf.c                    |   6 +-
 kernel/trace/trace_events.c                        |  22 +-
 kernel/trace/trace_events_synth.c                  |  21 +-
 kernel/trace/trace_events_trigger.c                |  20 +-
 kernel/trace/trace_kprobe.c                        |  43 +-
 kernel/trace/trace_probe.c                         |  84 +-
 kernel/trace/trace_probe.h                         |  15 +-
 kernel/trace/trace_probe_tmpl.h                    |   6 +-
 kernel/trace/trace_uprobe.c                        |  34 +-
 .../ftrace/test.d/dynevent/add_remove_eprobe.tc    |  53 ++
 tools/testing/selftests/ftrace/test.d/functions    |  22 +
 18 files changed, 1275 insertions(+), 105 deletions(-)
 create mode 100644 kernel/trace/trace_eprobe.c
 create mode 100644 tools/testing/selftests/ftrace/test.d/dynevent/add_remove_eprobe.tc

             reply	other threads:[~2021-08-19  4:18 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-19  4:13 Steven Rostedt [this message]
2021-08-19  4:13 ` [PATCH v7 01/10] tracing: Add DYNAMIC flag for dynamic events Steven Rostedt
2021-08-19  4:13 ` [PATCH v7 02/10] tracing: Have dynamic events have a ref counter Steven Rostedt
2021-08-19  4:13 ` [PATCH v7 03/10] tracing/probe: Have traceprobe_parse_probe_arg() take a const arg Steven Rostedt
2021-08-19  4:13 ` [PATCH v7 04/10] tracing/probes: Allow for dot delimiter as well as slash for system names Steven Rostedt
2021-08-19  4:13 ` [PATCH v7 05/10] tracing/probes: Use struct_size() instead of defining custom macros Steven Rostedt
2021-08-19  4:13 ` [PATCH v7 06/10] tracing/probe: Change traceprobe_set_print_fmt() to take a type Steven Rostedt
2021-08-19  4:51   ` Masami Hiramatsu
2021-08-19  4:13 ` [PATCH v7 07/10] tracing/probes: Have process_fetch_insn() take a void * instead of pt_regs Steven Rostedt
2021-08-19  4:52   ` Masami Hiramatsu
2021-08-19  4:13 ` [PATCH v7 08/10] tracing: Add a probe that attaches to trace events Steven Rostedt
2021-08-19 10:22   ` Masami Hiramatsu
2021-08-19 10:26     ` [PATCH] tracing/probes: Reject events which have the same name of existing one Masami Hiramatsu
2021-08-19 12:53     ` [PATCH v7 08/10] tracing: Add a probe that attaches to trace events Steven Rostedt
2021-08-19  4:13 ` [PATCH v7 09/10] selftests/ftrace: Add clear_dynamic_events() to test cases Steven Rostedt
2021-08-19 13:57   ` Steven Rostedt
2021-08-19  4:13 ` [PATCH v7 10/10] selftests/ftrace: Add selftest for testing eprobe events Steven Rostedt

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=20210819041321.105110033@goodmis.org \
    --to=rostedt@goodmis.org \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-trace-devel@vger.kernel.org \
    --cc=mhiramat@kernel.org \
    --cc=mingo@kernel.org \
    --cc=tz.stoyanov@gmail.com \
    --cc=zanussi@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;
as well as URLs for NNTP newsgroup(s).