From: "Tzvetomir Stoyanov (VMware)" <tz.stoyanov@gmail.com>
To: rostedt@goodmis.org
Cc: linux-trace-devel@vger.kernel.org
Subject: [PATCH v4 1/5] trace-cmd: Move libtraceevent plugins in its own directory.
Date: Fri, 4 Oct 2019 16:36:43 +0300 [thread overview]
Message-ID: <20191004133647.27759-2-tz.stoyanov@gmail.com> (raw)
In-Reply-To: <20191004133647.27759-1-tz.stoyanov@gmail.com>
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 => lib/traceevent/plugins}/Makefile | 6 ++--
.../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.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
18 files changed, 18 insertions(+), 20 deletions(-)
rename {plugins => lib/traceevent/plugins}/Makefile (93%)
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 => lib/traceevent/plugins}/plugin_python.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%)
diff --git a/.gitignore b/.gitignore
index b7b405f..20bb5a3 100644
--- a/.gitignore
+++ b/.gitignore
@@ -18,5 +18,5 @@ ctracecmdgui_wrap.c
tags
TAGS
cscope*
-trace_plugin_dir
+traceevent_plugin_dir
trace_python_dir
diff --git a/Makefile b/Makefile
index dabdf8d..f336f7a 100644
--- a/Makefile
+++ b/Makefile
@@ -273,16 +273,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)/lib/traceevent/plugins/traceevent_plugin_dir
$(Q)$(MAKE) -C $(src)/lib/traceevent $@
-$(LIBTRACEEVENT_STATIC): force
+$(LIBTRACEEVENT_STATIC): force $(obj)/lib/traceevent/plugins/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)
@@ -292,14 +292,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)/lib/traceevent/plugins/traceevent_plugin_dir $(obj)/lib/traceevent/plugins/trace_python_dir
+ $(Q)$(MAKE) -C $(src)/lib/traceevent/plugins
-$(obj)/plugins/trace_plugin_dir: force
- $(Q)$(MAKE) -C $(src)/plugins $@
+$(obj)/lib/traceevent/plugins/traceevent_plugin_dir: force
+ $(Q)$(MAKE) -C $(src)/lib/traceevent/plugins $@
-$(obj)/plugins/trace_python_dir: force
- $(Q)$(MAKE) -C $(src)/plugins $@
+$(obj)/lib/traceevent/plugins/trace_python_dir: force
+ $(Q)$(MAKE) -C $(src)/lib/traceevent/plugins $@
show_gui_make:
@echo "Note: to build the gui, type \"make gui\""
@@ -325,7 +325,7 @@ cscope: force
$(call find_tag_files) | cscope -b -q
install_plugins: force
- $(Q)$(MAKE) -C $(src)/plugins $@
+ $(Q)$(MAKE) -C $(src)/lib/traceevent/plugins $@
install_python: force
$(Q)$(MAKE) -C $(src)/python $@
@@ -372,7 +372,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)/lib/traceevent/plugins 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
@@ -421,8 +421,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)/lib/traceevent/plugins/trace_python_dir
+ $(Q)$(MAKE) -C $(src)/lib/traceevent/plugins $(obj)/lib/traceevent/plugins/plugin_python.so
dist:
git archive --format=tar --prefix=trace-cmd-$(TRACECMD_VERSION)/ HEAD \
diff --git a/lib/trace-cmd/Makefile b/lib/trace-cmd/Makefile
index 78875e4..3b4b5aa 100644
--- a/lib/trace-cmd/Makefile
+++ b/lib/trace-cmd/Makefile
@@ -40,8 +40,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) $< > $@
diff --git a/plugins/Makefile b/lib/traceevent/plugins/Makefile
similarity index 93%
rename from plugins/Makefile
rename to lib/traceevent/plugins/Makefile
index 4598e83..e0a7566 100644
--- a/plugins/Makefile
+++ b/lib/traceevent/plugins/Makefile
@@ -1,6 +1,6 @@
include $(src)/scripts/utils.mk
-bdir:=$(obj)/plugins
+bdir:=$(obj)/lib/traceevent/plugins
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
diff --git a/plugins/plugin_blk.c b/lib/traceevent/plugins/plugin_blk.c
similarity index 100%
rename from plugins/plugin_blk.c
rename to lib/traceevent/plugins/plugin_blk.c
diff --git a/plugins/plugin_cfg80211.c b/lib/traceevent/plugins/plugin_cfg80211.c
similarity index 100%
rename from plugins/plugin_cfg80211.c
rename to lib/traceevent/plugins/plugin_cfg80211.c
diff --git a/plugins/plugin_function.c b/lib/traceevent/plugins/plugin_function.c
similarity index 100%
rename from plugins/plugin_function.c
rename to lib/traceevent/plugins/plugin_function.c
diff --git a/plugins/plugin_futex.c b/lib/traceevent/plugins/plugin_futex.c
similarity index 100%
rename from plugins/plugin_futex.c
rename to lib/traceevent/plugins/plugin_futex.c
diff --git a/plugins/plugin_hrtimer.c b/lib/traceevent/plugins/plugin_hrtimer.c
similarity index 100%
rename from plugins/plugin_hrtimer.c
rename to lib/traceevent/plugins/plugin_hrtimer.c
diff --git a/plugins/plugin_jbd2.c b/lib/traceevent/plugins/plugin_jbd2.c
similarity index 100%
rename from plugins/plugin_jbd2.c
rename to lib/traceevent/plugins/plugin_jbd2.c
diff --git a/plugins/plugin_kmem.c b/lib/traceevent/plugins/plugin_kmem.c
similarity index 100%
rename from plugins/plugin_kmem.c
rename to lib/traceevent/plugins/plugin_kmem.c
diff --git a/plugins/plugin_kvm.c b/lib/traceevent/plugins/plugin_kvm.c
similarity index 100%
rename from plugins/plugin_kvm.c
rename to lib/traceevent/plugins/plugin_kvm.c
diff --git a/plugins/plugin_mac80211.c b/lib/traceevent/plugins/plugin_mac80211.c
similarity index 100%
rename from plugins/plugin_mac80211.c
rename to lib/traceevent/plugins/plugin_mac80211.c
diff --git a/plugins/plugin_python.c b/lib/traceevent/plugins/plugin_python.c
similarity index 100%
rename from plugins/plugin_python.c
rename to lib/traceevent/plugins/plugin_python.c
diff --git a/plugins/plugin_sched_switch.c b/lib/traceevent/plugins/plugin_sched_switch.c
similarity index 100%
rename from plugins/plugin_sched_switch.c
rename to lib/traceevent/plugins/plugin_sched_switch.c
diff --git a/plugins/plugin_scsi.c b/lib/traceevent/plugins/plugin_scsi.c
similarity index 100%
rename from plugins/plugin_scsi.c
rename to lib/traceevent/plugins/plugin_scsi.c
diff --git a/plugins/plugin_tlb.c b/lib/traceevent/plugins/plugin_tlb.c
similarity index 100%
rename from plugins/plugin_tlb.c
rename to lib/traceevent/plugins/plugin_tlb.c
diff --git a/plugins/plugin_xen.c b/lib/traceevent/plugins/plugin_xen.c
similarity index 100%
rename from plugins/plugin_xen.c
rename to lib/traceevent/plugins/plugin_xen.c
--
2.21.0
next prev parent reply other threads:[~2019-10-04 13:36 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-04 13:36 [PATCH v4 0/5] Remove redundant trace-cmd plugin handling logic Tzvetomir Stoyanov (VMware)
2019-10-04 13:36 ` Tzvetomir Stoyanov (VMware) [this message]
2019-10-04 13:36 ` [PATCH v4 2/5] trace-cmd: Rename plugin_python to plugin_python_loader Tzvetomir Stoyanov (VMware)
2019-10-04 13:36 ` [PATCH v4 3/5] trace-cmd: Load libtraceevent plugins from build folder, if exists Tzvetomir Stoyanov (VMware)
2019-10-04 15:09 ` Steven Rostedt
2019-10-04 13:36 ` [PATCH v4 4/5] trace-cmd: Change plugin install directories Tzvetomir Stoyanov (VMware)
2019-10-04 13:36 ` [PATCH v4 5/5] trace-cmd: Add initial infrastructure for trace-cmd specific plugins Tzvetomir Stoyanov (VMware)
2019-10-04 14:46 ` [PATCH v4 0/5] Remove redundant trace-cmd plugin handling logic Steven Rostedt
2019-10-04 14:48 ` Tzvetomir Stoyanov
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=20191004133647.27759-2-tz.stoyanov@gmail.com \
--to=tz.stoyanov@gmail.com \
--cc=linux-trace-devel@vger.kernel.org \
--cc=rostedt@goodmis.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).