linux-trace-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: linux-trace-devel@vger.kernel.org
Cc: "Yordan Karadzhov (VMware)" <y.karadz@gmail.com>
Subject: [PATCH 5/6 v2] kernelshark: Build libtraceevent and libtracefs locally
Date: Wed, 16 Dec 2020 18:19:47 -0500	[thread overview]
Message-ID: <20201216232145.792726583@goodmis.org> (raw)
In-Reply-To: 20201216231942.127326802@goodmis.org

From: "Steven Rostedt (VMware)" <rostedt@goodmis.org>

kernelshark v1 is now frozen in favor of developing kernelshark v2. Do not
use the system libraries libtraceevent or libtracefs for kernelshark v1, as
they may not be suitable. Use the frozen libtraceevent and libtracefs that
is in the local repository.

Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
---
 Makefile                | 24 ++++++++++++++++--------
 lib/traceevent/Makefile |  2 ++
 lib/tracefs/Makefile    |  3 +++
 3 files changed, 21 insertions(+), 8 deletions(-)

diff --git a/Makefile b/Makefile
index 662d24ba288f..7aef50b34a56 100644
--- a/Makefile
+++ b/Makefile
@@ -354,19 +354,14 @@ $(PKG_CONFIG_FILE) : ${PKG_CONFIG_SOURCE_FILE}.template $(BUILD_PREFIX)
 $(kshark-dir)/build/Makefile: $(kshark-dir)/CMakeLists.txt
 	$(Q) cd $(kshark-dir)/build && $(CMAKE_COMMAND) -DCMAKE_BUILD_TYPE=$(BUILD_TYPE) -D_INSTALL_PREFIX=$(prefix) -D_LIBDIR=$(libdir) ..
 
-gui: force
-	$(MAKE) $(CMD_TARGETS)
-	$(MAKE) $(kshark-dir)/build/Makefile
-	$(Q)$(MAKE) $(S) -C $(kshark-dir)/build
-	@echo "gui build complete"
-	@echo "  kernelshark located at $(kshark-dir)/bin"
-
 trace-cmd: force $(LIBTRACEEVENT_STATIC_BUILD) $(LIBTRACECMD_STATIC) $(LIBTRACEFS_STATIC_BUILD) \
 	force $(obj)/lib/trace-cmd/plugins/tracecmd_plugin_dir
 	$(Q)$(MAKE) -C $(src)/tracecmd $(obj)/tracecmd/$@
 
-$(LIBTRACEEVENT_STATIC): force $(obj)/lib/traceevent/plugins/trace_python_dir \
+LIBTRACEEVENT_DEPENDS = $(obj)/lib/traceevent/plugins/trace_python_dir \
 			 $(obj)/lib/traceevent/plugins/traceevent_plugin_dir
+
+$(LIBTRACEEVENT_STATIC): force $(LIBTRACEEVENT_DEPENDS)
 	$(Q)$(MAKE) -C $(src)/lib/traceevent libtraceevent
 
 $(LIBTRACECMD_STATIC): force
@@ -385,6 +380,19 @@ libtracefs.a: $(LIBTRACEFS_STATIC)
 
 libs: $(LIBTRACECMD_SHARED) $(LIBTRACEEVENT_STATIC_BUILD) $(LIBTRACEFS_STATIC_BUILD) $(PKG_CONFIG_FILE)
 
+libtraceevent_nowarn: $(LIBTRACEEVENT_DEPENDS)
+	$(Q)$(MAKE) -C $(src)/lib/traceevent $@
+
+libtracefs_nowarn: force
+	$(Q)$(MAKE) -C $(src)/lib/tracefs $@
+
+
+gui: force $(CMD_TARGETS) libtraceevent_nowarn libtracefs_nowarn
+	$(MAKE) $(kshark-dir)/build/Makefile
+	$(Q)$(MAKE) $(S) -C $(kshark-dir)/build
+	@echo "gui build complete"
+	@echo "  kernelshark located at $(kshark-dir)/bin"
+
 test: force $(LIBTRACEEVENT_STATIC_BUILD) $(LIBTRACEFS_STATIC_BUILD) $(LIBTRACECMD_STATIC)
 ifneq ($(CUNIT_INSTALLED),1)
 	$(error CUnit framework not installed, cannot build unit tests))
diff --git a/lib/traceevent/Makefile b/lib/traceevent/Makefile
index 21ef5a4ea59f..21eaffd21f7a 100644
--- a/lib/traceevent/Makefile
+++ b/lib/traceevent/Makefile
@@ -50,6 +50,8 @@ $(bdir)/libtraceevent.a: $(OBJS)
 
 libtraceevent: $(bdir)/libtraceevent.a warning
 
+libtraceevent_nowarn: $(bdir)/libtraceevent.a
+
 $(bdir)/%.o: %.c
 	$(Q)$(call do_fpic_compile)
 
diff --git a/lib/tracefs/Makefile b/lib/tracefs/Makefile
index 6f4370d96f10..74cb8829979f 100644
--- a/lib/tracefs/Makefile
+++ b/lib/tracefs/Makefile
@@ -47,6 +47,9 @@ $(bdir)/libtracefs.a: $(OBJS)
 	$(Q)$(call do_build_static_lib)
 
 libtracefs: $(bdir)/libtracefs.a warning
+
+libtracefs_nowarn: $(bdir)/libtracefs.a
+
 $(bdir)/%.o: %.c
 	$(Q)$(call do_fpic_compile)
 
-- 
2.29.2



  parent reply	other threads:[~2020-12-16 23:23 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-16 23:19 [PATCH 0/6 v2] trace-cmd/kernelshark: Fixed build, cleanups and fix kernelshark Steven Rostedt
2020-12-16 23:19 ` [PATCH 1/6 v2] trace-cmd: Move add_event_pid() out of #ifndef NO_PTRACE Steven Rostedt
2020-12-16 23:19 ` [PATCH 2/6 v2] trace-cmd: Add #include <fcntl.h> to trace-cmd-private.h Steven Rostedt
2020-12-16 23:19 ` [PATCH 3/6 v2] trace-cmd: Add a make-trace-cmd.sh script to simplify creating a trace-cmd package Steven Rostedt
2020-12-16 23:19 ` [PATCH 4/6 v2] trace-cmd: Do not have local builds of libtraceevent or libtracefs use system headers Steven Rostedt
2020-12-16 23:19 ` Steven Rostedt [this message]
2020-12-16 23:19 ` [PATCH 6/6 v2] trace-cmd: Re-enable the build of KernelShark v1 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=20201216232145.792726583@goodmis.org \
    --to=rostedt@goodmis.org \
    --cc=linux-trace-devel@vger.kernel.org \
    --cc=y.karadz@gmail.com \
    /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).