[v3,0/5] Remove redundant trace-cmd plugin handling logic
mbox series

Message ID 20191002114152.30048-1-tz.stoyanov@gmail.com
Headers show
Series
  • Remove redundant trace-cmd plugin handling logic
Related show

Message

Tzvetomir Stoyanov Oct. 2, 2019, 11:41 a.m. UTC
Currently there are no trace-cmd related plugins, all of them
are designed to be used with libtraceeevnt. As both libtraceevent
and trace-cmd have logic for managing plugins, the one in trace-cmd
is redundant. Those redundant code is removed and replaced with calls
to libtraceeevnt plugin APIs. When trace-cmd has to load any plugins,
it uses libtraceeevnt to do the job.

All existing plugins are moved from plugins/ to lib/traceevent/plugins
directory, as all of them are designed to be used with the traceevent
library.

An initial infrastructure for trace-cmd specific plugins is added - 
new lib/trace-cmd/plugins directory and initial set of APIs
for working with trace-cmd plugins.

Tzvetomir Stoyanov (1):
  trace-cmd: Change plugin install directories

Tzvetomir Stoyanov (VMware) (4):
  trace-cmd: Move libtraceevent plugins in its own directory.
  trace-cmd: Rename plugin_python to plugin_python_loader.
  trace-cmd: Load libtraceevent plugins from build folder, if exists.
  trace-cmd: Add initial infrastructure for trace-cmd specific plugins.

 .gitignore                                    |   4 +-
 Makefile                                      |  83 +++--
 include/trace-cmd/trace-cmd.h                 |  44 ++-
 lib/trace-cmd/Makefile                        |   3 +-
 lib/trace-cmd/plugins/Makefile                |  58 ++++
 lib/trace-cmd/trace-plugin.c                  | 313 ++++++++++++++++++
 lib/traceevent/event-plugin.c                 |  34 +-
 {plugins => lib/traceevent/plugins}/Makefile  |  16 +-
 .../traceevent/plugins}/plugin_blk.c          |   0
 .../traceevent/plugins}/plugin_cfg80211.c     |   0
 .../traceevent/plugins}/plugin_function.c     |   0
 .../traceevent/plugins}/plugin_futex.c        |   0
 .../traceevent/plugins}/plugin_hrtimer.c      |   0
 .../traceevent/plugins}/plugin_jbd2.c         |   0
 .../traceevent/plugins}/plugin_kmem.c         |   0
 .../traceevent/plugins}/plugin_kvm.c          |   0
 .../traceevent/plugins}/plugin_mac80211.c     |   0
 .../traceevent/plugins/plugin_python_loader.c |   0
 .../traceevent/plugins}/plugin_sched_switch.c |   0
 .../traceevent/plugins}/plugin_scsi.c         |   0
 .../traceevent/plugins}/plugin_tlb.c          |   0
 .../traceevent/plugins}/plugin_xen.c          |   0
 22 files changed, 505 insertions(+), 50 deletions(-)
 create mode 100644 lib/trace-cmd/plugins/Makefile
 create mode 100644 lib/trace-cmd/trace-plugin.c
 rename {plugins => lib/traceevent/plugins}/Makefile (81%)
 rename {plugins => lib/traceevent/plugins}/plugin_blk.c (100%)
 rename {plugins => lib/traceevent/plugins}/plugin_cfg80211.c (100%)
 rename {plugins => lib/traceevent/plugins}/plugin_function.c (100%)
 rename {plugins => lib/traceevent/plugins}/plugin_futex.c (100%)
 rename {plugins => lib/traceevent/plugins}/plugin_hrtimer.c (100%)
 rename {plugins => lib/traceevent/plugins}/plugin_jbd2.c (100%)
 rename {plugins => lib/traceevent/plugins}/plugin_kmem.c (100%)
 rename {plugins => lib/traceevent/plugins}/plugin_kvm.c (100%)
 rename {plugins => lib/traceevent/plugins}/plugin_mac80211.c (100%)
 rename plugins/plugin_python.c => lib/traceevent/plugins/plugin_python_loader.c (100%)
 rename {plugins => lib/traceevent/plugins}/plugin_sched_switch.c (100%)
 rename {plugins => lib/traceevent/plugins}/plugin_scsi.c (100%)
 rename {plugins => lib/traceevent/plugins}/plugin_tlb.c (100%)
 rename {plugins => lib/traceevent/plugins}/plugin_xen.c (100%)