@@ -18,5 +18,5 @@ ctracecmdgui_wrap.c
tags
TAGS
cscope*
-trace_plugin_dir
+traceevent_plugin_dir
trace_python_dir
@@ -266,16 +266,16 @@ gui: force $(CMD_TARGETS) $(kshark-dir)/build/Makefile
trace-cmd: force $(LIBTRACEEVENT_STATIC) $(LIBTRACECMD_STATIC)
$(Q)$(MAKE) -C $(src)/tracecmd $(obj)/tracecmd/$@
-$(LIBTRACEEVENT_SHARED): force
+$(LIBTRACEEVENT_SHARED): force $(obj)/plugins/traceevent/traceevent_plugin_dir
$(Q)$(MAKE) -C $(src)/lib/traceevent $@
-$(LIBTRACEEVENT_STATIC): force
+$(LIBTRACEEVENT_STATIC): force $(obj)/plugins/traceevent/traceevent_plugin_dir
$(Q)$(MAKE) -C $(src)/lib/traceevent $@
-$(LIBTRACECMD_STATIC): force $(obj)/plugins/trace_plugin_dir
+$(LIBTRACECMD_STATIC): force
$(Q)$(MAKE) -C $(src)/lib/trace-cmd $@
-$(LIBTRACECMD_SHARED): force $(obj)/plugins/trace_plugin_dir
+$(LIBTRACECMD_SHARED): force
$(Q)$(MAKE) -C $(src)/lib/trace-cmd $@
libtraceevent.so: $(LIBTRACEEVENT_SHARED)
@@ -285,14 +285,14 @@ libtracecmd.so: $(LIBTRACECMD_SHARED)
libs: $(LIBTRACECMD_SHARED) $(LIBTRACEEVENT_SHARED)
-plugins: force $(obj)/plugins/trace_plugin_dir $(obj)/plugins/trace_python_dir
- $(Q)$(MAKE) -C $(src)/plugins
+plugins: force $(obj)/plugins/traceevent/traceevent_plugin_dir $(obj)/plugins/traceevent/trace_python_dir
+ $(Q)$(MAKE) -C $(src)/plugins/traceevent
-$(obj)/plugins/trace_plugin_dir: force
- $(Q)$(MAKE) -C $(src)/plugins $@
+$(obj)/plugins/traceevent/traceevent_plugin_dir: force
+ $(Q)$(MAKE) -C $(src)/plugins/traceevent $@
-$(obj)/plugins/trace_python_dir: force
- $(Q)$(MAKE) -C $(src)/plugins $@
+$(obj)/plugins/traceevent/trace_python_dir: force
+ $(Q)$(MAKE) -C $(src)/plugins/traceevent $@
show_gui_make:
@echo "Note: to build the gui, type \"make gui\""
@@ -318,7 +318,7 @@ cscope: force
$(call find_tag_files) | cscope -b -q
install_plugins: force
- $(Q)$(MAKE) -C $(src)/plugins $@
+ $(Q)$(MAKE) -C $(src)/plugins/traceevent $@
install_python: force
$(Q)$(MAKE) -C $(src)/python $@
@@ -356,7 +356,7 @@ clean:
$(RM) tags TAGS cscope*
$(MAKE) -C $(src)/lib/traceevent clean
$(MAKE) -C $(src)/lib/trace-cmd clean
- $(MAKE) -C $(src)/plugins clean
+ $(MAKE) -C $(src)/plugins/traceevent clean
$(MAKE) -C $(src)/python clean
$(MAKE) -C $(src)/tracecmd clean
if [ -f $(kshark-dir)/build/Makefile ]; then $(MAKE) -C $(kshark-dir)/build clean; fi
@@ -405,8 +405,8 @@ python-gui: $(PYTHON_GUI)
PHONY += python-plugin
python-plugin: $(PYTHON_PLUGINS)
-plugin_python.so: force $(obj)/plugins/trace_python_dir
- $(Q)$(MAKE) -C $(src)/plugins $(obj)/plugins/plugin_python.so
+plugin_python.so: force $(obj)/plugins/traceevent/trace_python_dir
+ $(Q)$(MAKE) -C $(src)/plugins/traceevent $(obj)/plugins/traceevent/plugin_python.so
dist:
git archive --format=tar --prefix=trace-cmd-$(TRACECMD_VERSION)/ HEAD \
@@ -38,8 +38,6 @@ $(bdir)/libtracecmd.so: $(OBJS)
$(bdir)/%.o: %.c
$(Q)$(call do_fpic_compile)
-$(bdir)/trace-util.o: $(obj)/plugins/trace_plugin_dir
-
$(DEPS): $(bdir)/.%.d: %.c
$(Q)$(CC) -M $(CPPFLAGS) $(CFLAGS) $< > $@
similarity index 93%
rename from plugins/Makefile
rename to plugins/traceevent/Makefile
@@ -1,6 +1,6 @@
include $(src)/scripts/utils.mk
-bdir:=$(obj)/plugins
+bdir:=$(obj)/plugins/traceevent
PLUGIN_OBJS =
PLUGIN_OBJS += plugin_jbd2.o
@@ -61,7 +61,7 @@ install_plugins: $(PLUGINS_INSTALL)
# and $(PYTHON_DIR) change. Without them, a full clean build would necessary
# in order to get the binaries updated.
-$(bdir)/trace_plugin_dir: $(bdir) force
+$(bdir)/traceevent_plugin_dir: $(bdir) force
$(Q)$(N)$(call update_dir, 'PLUGIN_DIR=$(PLUGIN_DIR)')
$(bdir)/trace_python_dir: $(bdir) force
@@ -75,7 +75,7 @@ ifneq ($(dep_includes),)
endif
clean:
- $(RM) -f $(bdir)/*.a $(bdir)/*.so $(bdir)/*.o $(bdir)/.*.d $(bdir)/trace_plugin_dir $(bdir)/trace_python_dir
+ $(RM) -f $(bdir)/*.a $(bdir)/*.so $(bdir)/*.o $(bdir)/.*.d $(bdir)/traceevent_plugin_dir $(bdir)/trace_python_dir
force:
.PHONY: clean force
similarity index 100%
rename from plugins/plugin_blk.c
rename to plugins/traceevent/plugin_blk.c
similarity index 100%
rename from plugins/plugin_cfg80211.c
rename to plugins/traceevent/plugin_cfg80211.c
similarity index 100%
rename from plugins/plugin_function.c
rename to plugins/traceevent/plugin_function.c
similarity index 100%
rename from plugins/plugin_futex.c
rename to plugins/traceevent/plugin_futex.c
similarity index 100%
rename from plugins/plugin_hrtimer.c
rename to plugins/traceevent/plugin_hrtimer.c
similarity index 100%
rename from plugins/plugin_jbd2.c
rename to plugins/traceevent/plugin_jbd2.c
similarity index 100%
rename from plugins/plugin_kmem.c
rename to plugins/traceevent/plugin_kmem.c
similarity index 100%
rename from plugins/plugin_kvm.c
rename to plugins/traceevent/plugin_kvm.c
similarity index 100%
rename from plugins/plugin_mac80211.c
rename to plugins/traceevent/plugin_mac80211.c
similarity index 100%
rename from plugins/plugin_python.c
rename to plugins/traceevent/plugin_python.c
similarity index 100%
rename from plugins/plugin_sched_switch.c
rename to plugins/traceevent/plugin_sched_switch.c
similarity index 100%
rename from plugins/plugin_scsi.c
rename to plugins/traceevent/plugin_scsi.c
similarity index 100%
rename from plugins/plugin_tlb.c
rename to plugins/traceevent/plugin_tlb.c
similarity index 100%
rename from plugins/plugin_xen.c
rename to plugins/traceevent/plugin_xen.c
All existing plugins are moved from plugins/ to plugins/traceevent/ directory, as all of them (except plugin_python) are designed to be used with the traceevent library. This change paves the way for implementing trace-cmd specific plugins. Signed-off-by: Tzvetomir Stoyanov (VMware) <tz.stoyanov@gmail.com> --- .gitignore | 2 +- Makefile | 28 +++++++++---------- lib/trace-cmd/Makefile | 2 -- plugins/{ => traceevent}/Makefile | 6 ++-- plugins/{ => traceevent}/plugin_blk.c | 0 plugins/{ => traceevent}/plugin_cfg80211.c | 0 plugins/{ => traceevent}/plugin_function.c | 0 plugins/{ => traceevent}/plugin_futex.c | 0 plugins/{ => traceevent}/plugin_hrtimer.c | 0 plugins/{ => traceevent}/plugin_jbd2.c | 0 plugins/{ => traceevent}/plugin_kmem.c | 0 plugins/{ => traceevent}/plugin_kvm.c | 0 plugins/{ => traceevent}/plugin_mac80211.c | 0 plugins/{ => traceevent}/plugin_python.c | 0 .../{ => traceevent}/plugin_sched_switch.c | 0 plugins/{ => traceevent}/plugin_scsi.c | 0 plugins/{ => traceevent}/plugin_tlb.c | 0 plugins/{ => traceevent}/plugin_xen.c | 0 18 files changed, 18 insertions(+), 20 deletions(-) rename plugins/{ => traceevent}/Makefile (93%) rename plugins/{ => traceevent}/plugin_blk.c (100%) rename plugins/{ => traceevent}/plugin_cfg80211.c (100%) rename plugins/{ => traceevent}/plugin_function.c (100%) rename plugins/{ => traceevent}/plugin_futex.c (100%) rename plugins/{ => traceevent}/plugin_hrtimer.c (100%) rename plugins/{ => traceevent}/plugin_jbd2.c (100%) rename plugins/{ => traceevent}/plugin_kmem.c (100%) rename plugins/{ => traceevent}/plugin_kvm.c (100%) rename plugins/{ => traceevent}/plugin_mac80211.c (100%) rename plugins/{ => traceevent}/plugin_python.c (100%) rename plugins/{ => traceevent}/plugin_sched_switch.c (100%) rename plugins/{ => traceevent}/plugin_scsi.c (100%) rename plugins/{ => traceevent}/plugin_tlb.c (100%) rename plugins/{ => traceevent}/plugin_xen.c (100%)