Skip to content

tools lib traceevent: Plugin unload enhancement

Namhyung Kim lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest17 patches 23 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/17tools lib traceevent: Add state member to struct trace_seqtools/lib/traceevent/Makefile tools/lib/traceevent/event-parse.h tools/lib/traceevent/trace-seq.c+49 -66 replies
2/17tools lib traceevent: Check return value of realloc()tools/lib/traceevent/trace-seq.c+9 -41 reply
3/17tools lib traceevent: Get rid of malloc_or_die() in trace_seq_init()tools/lib/traceevent/trace-seq.c+5 -21 reply
4/17tools lib traceevent: Get rid of die() finally!!tools/lib/traceevent/event-utils.h tools/lib/traceevent/parse-utils.c+0 -480 replies
5/17tools lib traceevent: Make plugin unload function receive peventtools/lib/traceevent/event-parse.h tools/lib/traceevent/event-plugin.c tools/lib/traceevent/plugin_function.c +1 more+8 -71 reply
6/17tools lib traceevent: Add pevent_unregister_event_handler()tools/lib/traceevent/event-parse.c tools/lib/traceevent/event-parse.h+102 -146 replies
7/17tools lib traceevent: Add pevent_unregister_print_function()tools/lib/traceevent/event-parse.c tools/lib/traceevent/event-parse.h+25 -01 reply
8/17tools lib traceevent: Unregister handler when function plugin unloadedtools/lib/traceevent/plugin_function.c+3 -01 reply
9/17tools lib traceevent: Unregister handler when hrtimer plugin unloadedtools/lib/traceevent/plugin_hrtimer.c+10 -01 reply
10/17tools lib traceevent: Unregister handler when kmem plugin unloadedtools/lib/traceevent/plugin_kmem.c+22 -00 replies
11/17tools lib traceevent: Unregister handler when kvm plugin unloadedtools/lib/traceevent/plugin_kvm.c+30 -00 replies
12/17tools lib traceevent: Unregister handler when sched_switch plugin unloadedtools/lib/traceevent/plugin_sched_switch.c+12 -00 replies
13/17tools lib traceevent: Unregister handler when mac80211 plugin unloadedtools/lib/traceevent/plugin_mac80211.c+7 -01 reply
14/17tools lib traceevent: Unregister handler when cfg80211 plugin unloadedtools/lib/traceevent/plugin_cfg80211.c+7 -01 reply
15/17tools lib traceevent: Unregister handler when jbd2 plugin unloadedtools/lib/traceevent/plugin_jbd2.c+11 -01 reply
16/17tools lib traceevent: Unregister handler when scsi plugin unloadedtools/lib/traceevent/plugin_scsi.c+7 -01 reply
17/17tools lib traceevent: Unregister handler when xen plugin unloadedtools/lib/traceevent/plugin_xen.c+7 -00 replies

Reviews trailers per patch

8 of 17 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchSteven RostedtJiri Olsa
SeriesR-b
1/17A-b A-b
2/17A-b
3/17A-b
4/17
5/17A-b
6/17
7/17A-b
8/17A-b
9/17A-b
10/17
11/17
12/17
13/17A-b
14/17
15/17
16/17
17/17

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCHSET 00/17] tools lib traceevent: Plugin unload enhancement

Hello,

When plugins are loaded, they register various event and function handlers. But they don't unregister even after the plugins unloaded so that events could have refererences to non-existing handlers.

This patchset added relevant unregister functions to handle that.

Note that this is not a problem as of now since all of users unload plugins after finishing their access to events. But being a generic library, it should be handled properly IMHO.

The patch 1-4 are resend of the previous die removal series so independent to this series.

I put the series on the 'libtraceevent/plugin-v1' branch in my tree

git://git.kernel.org/pub/scm/linux/kernel/git/namhyung/linux-perf.git

Any comments are welcome, thanks
Namhyung

Namhyung Kim (17):
tools lib traceevent: Add state member to struct trace_seq tools lib traceevent: Check return value of realloc() tools lib traceevent: Get rid of malloc_or_die() in trace_seq_init() tools lib traceevent: Get rid of die() finally!!
tools lib traceevent: Make plugin unload function receive pevent tools lib traceevent: Add pevent_unregister_event_handler() tools lib traceevent: Add pevent_unregister_print_function() tools lib traceevent: Unregister handler when function plugin
unloaded
tools lib traceevent: Unregister handler when hrtimer plugin unloaded tools lib traceevent: Unregister handler when kmem plugin unloaded tools lib traceevent: Unregister handler when kvm plugin unloaded tools lib traceevent: Unregister handler when sched_switch plugin
unloaded
tools lib traceevent: Unregister handler when mac80211 plugin
unloaded
tools lib traceevent: Unregister handler when cfg80211 plugin
unloaded
tools lib traceevent: Unregister handler when jbd2 plugin unloaded tools lib traceevent: Unregister handler when scsi plugin unloaded tools lib traceevent: Unregister handler when xen plugin unloaded

 tools/lib/traceevent/Makefile              |   2 +-
 tools/lib/traceevent/event-parse.c         | 136 ++++++++++++++++++++++++++---
 tools/lib/traceevent/event-parse.h         |  19 +++-
 tools/lib/traceevent/event-plugin.c        |   4 +-
 tools/lib/traceevent/event-utils.h         |   4 -
 tools/lib/traceevent/parse-utils.c         |  44 ----------
 tools/lib/traceevent/plugin_cfg80211.c     |   7 ++
 tools/lib/traceevent/plugin_function.c     |   5 +-
 tools/lib/traceevent/plugin_hrtimer.c      |  10 +++
 tools/lib/traceevent/plugin_jbd2.c         |  11 +++
 tools/lib/traceevent/plugin_kmem.c         |  22 +++++
 tools/lib/traceevent/plugin_kvm.c          |  30 +++++++
 tools/lib/traceevent/plugin_mac80211.c     |   7 ++
 tools/lib/traceevent/plugin_sched_switch.c |  12 +++
 tools/lib/traceevent/plugin_scsi.c         |   7 ++
 tools/lib/traceevent/plugin_xen.c          |   7 ++
 tools/lib/traceevent/trace-seq.c           |  58 ++++++++++--
 tools/perf/util/trace-event.c              |   2 +-
 18 files changed, 310 insertions(+), 77 deletions(-)
Signature · 1 line
1.7.11.7