linux-trace-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] trace-cmd: Clean up library and KernelShark remnants
@ 2021-07-26 16:28 Steven Rostedt
  2021-07-26 16:28 ` [PATCH 1/3] trace-cmd: Remove traceevent/ and tracefs/ from include headers Steven Rostedt
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Steven Rostedt @ 2021-07-26 16:28 UTC (permalink / raw)
  To: linux-trace-devel; +Cc: Steven Rostedt (VMware)

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

Remove leftover remnants of building KernelShark, libtraceevent and
libtracefs from the trace-cmd Makefiles.

Steven Rostedt (VMware) (3):
  trace-cmd: Remove traceevent/ and tracefs/ from include headers
  trace-cmd: Remove leftover traces of libtraceevent in Makefiles
  trace-cmd: Remove remnants of KernelShark build

 .gitignore                                    |  1 -
 Makefile                                      | 39 ++-----------------
 include/trace-cmd/trace-cmd.h                 |  4 +-
 .../include/private/trace-cmd-private.h       |  2 +-
 lib/trace-cmd/trace-util.c                    |  4 +-
 python/Makefile                               |  2 +-
 6 files changed, 9 insertions(+), 43 deletions(-)

-- 
2.30.2


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 1/3] trace-cmd: Remove traceevent/ and tracefs/ from include headers
  2021-07-26 16:28 [PATCH 0/3] trace-cmd: Clean up library and KernelShark remnants Steven Rostedt
@ 2021-07-26 16:28 ` Steven Rostedt
  2021-07-26 16:28 ` [PATCH 2/3] trace-cmd: Remove leftover traces of libtraceevent in Makefiles Steven Rostedt
  2021-07-26 16:28 ` [PATCH 3/3] trace-cmd: Remove remnants of KernelShark build Steven Rostedt
  2 siblings, 0 replies; 4+ messages in thread
From: Steven Rostedt @ 2021-07-26 16:28 UTC (permalink / raw)
  To: linux-trace-devel; +Cc: Steven Rostedt (VMware)

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

trace-cmd now depends on the external libraries of both libtraceevent and
libtracefs and uses pkg-config to find their headers. As pkg-config will
find the full path to the headers, do not include parts of the path when
including them, because they may change, and the hardcoded path in the
code will not.

Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
---
 include/trace-cmd/trace-cmd.h                     | 4 ++--
 lib/trace-cmd/include/private/trace-cmd-private.h | 2 +-
 lib/trace-cmd/trace-util.c                        | 4 ++--
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/include/trace-cmd/trace-cmd.h b/include/trace-cmd/trace-cmd.h
index 6984db863303..7fea4e017b26 100644
--- a/include/trace-cmd/trace-cmd.h
+++ b/include/trace-cmd/trace-cmd.h
@@ -6,8 +6,8 @@
 #ifndef _TRACE_CMD_H
 #define _TRACE_CMD_H
 
-#include "traceevent/event-parse.h"
-#include "tracefs/tracefs.h"
+#include "event-parse.h"
+#include "tracefs.h"
 
 struct tracecmd_input;
 
diff --git a/lib/trace-cmd/include/private/trace-cmd-private.h b/lib/trace-cmd/include/private/trace-cmd-private.h
index 6440084ddd9d..c58b09e9da48 100644
--- a/lib/trace-cmd/include/private/trace-cmd-private.h
+++ b/lib/trace-cmd/include/private/trace-cmd-private.h
@@ -8,7 +8,7 @@
 
 #include <fcntl.h> /* for iovec */
 #include <sys/types.h>
-#include "traceevent/event-parse.h"
+#include "event-parse.h"
 #include "trace-cmd/trace-cmd.h"
 
 #define __packed __attribute__((packed))
diff --git a/lib/trace-cmd/trace-util.c b/lib/trace-cmd/trace-util.c
index b0c98c724363..9bc948224732 100644
--- a/lib/trace-cmd/trace-util.c
+++ b/lib/trace-cmd/trace-util.c
@@ -20,8 +20,8 @@
 #include <sys/stat.h>
 #include <sys/sysinfo.h>
 #include <time.h>
-#include <traceevent/event-parse.h>
-#include <traceevent/event-utils.h>
+#include <event-parse.h>
+#include <event-utils.h>
 
 #include "trace-cmd-private.h"
 #include "trace-cmd-local.h"
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/3] trace-cmd: Remove leftover traces of libtraceevent in Makefiles
  2021-07-26 16:28 [PATCH 0/3] trace-cmd: Clean up library and KernelShark remnants Steven Rostedt
  2021-07-26 16:28 ` [PATCH 1/3] trace-cmd: Remove traceevent/ and tracefs/ from include headers Steven Rostedt
@ 2021-07-26 16:28 ` Steven Rostedt
  2021-07-26 16:28 ` [PATCH 3/3] trace-cmd: Remove remnants of KernelShark build Steven Rostedt
  2 siblings, 0 replies; 4+ messages in thread
From: Steven Rostedt @ 2021-07-26 16:28 UTC (permalink / raw)
  To: linux-trace-devel; +Cc: Steven Rostedt (VMware)

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

There's still references to libtraceevent that was used for handling the
libtraceevent that was located in the repo. As these are now handled by
the libtraceevent external repo, they no longer need to be handled here.

Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
---
 .gitignore      |  1 -
 Makefile        | 23 ++---------------------
 python/Makefile |  2 +-
 3 files changed, 3 insertions(+), 23 deletions(-)

diff --git a/.gitignore b/.gitignore
index f0719c5ef126..eb1b0dbea6f2 100644
--- a/.gitignore
+++ b/.gitignore
@@ -20,7 +20,6 @@ ctracecmdgui_wrap.c
 tags
 TAGS
 cscope*
-traceevent_plugin_dir
 trace_python_dir
 tracecmd_plugin_dir
 libtracecmd.pc
diff --git a/Makefile b/Makefile
index d6fd09d8d0e5..951e717e1d87 100644
--- a/Makefile
+++ b/Makefile
@@ -89,17 +89,13 @@ export img_install img_install_SQ libdir libdir_SQ includedir_SQ
 export DESTDIR DESTDIR_SQ
 
 ifeq ($(prefix),$(HOME))
-plugin_traceevent_dir = $(HOME)/.local/lib/traceevent/plugins
 plugin_tracecmd_dir = $(libdir)/trace-cmd/plugins
-python_dir ?= $(libdir)/traceevent/python
+python_dir ?= $(libdir)/trace-cmd/python
 var_dir = $(HOME)/.trace-cmd/
 else
-plugin_traceevent_dir = $(libdir)/trace-cmd/plugins
 python_dir ?= $(libdir)/trace-cmd/python
-PLUGIN_DIR_TRACEEVENT = -DPLUGIN_TRACEEVENT_DIR="$(plugin_traceevent_dir)"
 PLUGIN_DIR_TRACECMD = -DPLUGIN_TRACECMD_DIR="$(plugin_tracecmd_dir)"
 PYTHON_DIR = -DPYTHON_DIR="$(python_dir)"
-PLUGIN_DIR_TRACEEVENT_SQ = '$(subst ','\'',$(PLUGIN_DIR_TRACEEVENT))'
 PLUGIN_DIR_TRACECMD_SQ = '$(subst ','\'',$(PLUGIN_DIR_TRACECMD))'
 PYTHON_DIR_SQ = '$(subst ','\'',$(PYTHON_DIR))'
 var_dir = /var
@@ -108,7 +104,6 @@ endif
 # Shell quotes
 bindir_SQ = $(subst ','\'',$(bindir))
 bindir_relative_SQ = $(subst ','\'',$(bindir_relative))
-plugin_traceevent_dir_SQ = $(subst ','\'',$(plugin_traceevent_dir))
 plugin_tracecmd_dir_SQ = $(subst ','\'',$(plugin_tracecmd_dir))
 python_dir_SQ = $(subst ','\'',$(python_dir))
 
@@ -124,11 +119,9 @@ HELP_DIR_SQ = '$(subst ','\'',$(HELP_DIR))'
 
 BASH_COMPLETE_DIR ?= $(etcdir)/bash_completion.d
 
-export PLUGIN_DIR_TRACEEVENT
 export PLUGIN_DIR_TRACECMD
 export PYTHON_DIR
 export PYTHON_DIR_SQ
-export plugin_traceevent_dir_SQ
 export plugin_tracecmd_dir_SQ
 export python_dir_SQ
 export var_dir
@@ -346,7 +339,7 @@ endif
 
 # Append required CFLAGS
 override CFLAGS += $(INCLUDES) $(VAR_DIR)
-override CFLAGS += $(PLUGIN_DIR_TRACEEVENT_SQ) $(PLUGIN_DIR_TRACECMD_SQ)
+override CFLAGS += $(PLUGIN_DIR_TRACECMD_SQ)
 override CFLAGS += $(udis86-flags) $(blk-flags)
 override LDFLAGS += $(udis86-ldflags)
 
@@ -431,24 +424,14 @@ ifneq ($(CUNIT_INSTALLED),1)
 endif
 	$(Q)$(MAKE) -C $(src)/utest $@
 
-plugins_traceevent: force $(obj)/lib/traceevent/plugins/traceevent_plugin_dir \
-		   $(obj)/lib/traceevent/plugins/trace_python_dir
-	$(Q)$(MAKE) -C $(src)/lib/traceevent/plugins
-
 plugins_tracecmd: force $(obj)/lib/trace-cmd/plugins/tracecmd_plugin_dir
 	$(Q)$(MAKE) -C $(src)/lib/trace-cmd/plugins
 
 plugins: plugins_tracecmd
 
-$(obj)/lib/traceevent/plugins/traceevent_plugin_dir: force
-	$(Q)$(MAKE) -C $(src)/lib/traceevent/plugins $@
-
 $(obj)/lib/trace-cmd/plugins/tracecmd_plugin_dir: force
 	$(Q)$(MAKE) -C $(src)/lib/trace-cmd/plugins $@
 
-$(obj)/lib/traceevent/plugins/trace_python_dir: force
-	$(Q)$(MAKE) -C $(src)/lib/traceevent/plugins $@
-
 show_other_make:
 	@echo "Note: to build man pages, type \"make doc\""
 	@echo "      to build unit tests, type \"make test\""
@@ -472,8 +455,6 @@ cscope: force
 	$(RM) cscope*
 	$(call find_tag_files) | cscope -b -q
 
-install_plugins_traceevent: force
-	$(Q)$(MAKE) -C $(src)/lib/traceevent/plugins install_plugins
 install_plugins_tracecmd: force
 	$(Q)$(MAKE) -C $(src)/lib/trace-cmd/plugins install_plugins
 
diff --git a/python/Makefile b/python/Makefile
index acd67e918033..63f5736dec45 100644
--- a/python/Makefile
+++ b/python/Makefile
@@ -9,7 +9,7 @@ PYTHON_PY_LIBS := tracecmd.install
 endif
 
 ctracecmd.so: ctracecmd.i $(LIBTRACECMD_STATIC)
-	swig -Wall -python -noproxy -I$(src)/include/traceevent -I$(src)/include/trace-cmd $(LIBTRACEEVENT_CFLAGS) ctracecmd.i
+	swig -Wall -python -noproxy -I$(src)/include/trace-cmd $(LIBTRACEEVENT_CFLAGS) ctracecmd.i
 	$(CC) -fpic -c $(CPPFLAGS) $(CFLAGS) $(PYTHON_INCLUDES)  ctracecmd_wrap.c
 	$(CC) --shared $(LIBTRACECMD_STATIC) $(LDFLAGS) ctracecmd_wrap.o -o ctracecmd.so $(TRACE_LIBS)
 
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 3/3] trace-cmd: Remove remnants of KernelShark build
  2021-07-26 16:28 [PATCH 0/3] trace-cmd: Clean up library and KernelShark remnants Steven Rostedt
  2021-07-26 16:28 ` [PATCH 1/3] trace-cmd: Remove traceevent/ and tracefs/ from include headers Steven Rostedt
  2021-07-26 16:28 ` [PATCH 2/3] trace-cmd: Remove leftover traces of libtraceevent in Makefiles Steven Rostedt
@ 2021-07-26 16:28 ` Steven Rostedt
  2 siblings, 0 replies; 4+ messages in thread
From: Steven Rostedt @ 2021-07-26 16:28 UTC (permalink / raw)
  To: linux-trace-devel; +Cc: Steven Rostedt (VMware)

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

There were still some KernelShark make commands for building the gui and
cleaning up the files. Remove them as KernelShark is lives in its own
repository now.

Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
---
 Makefile | 16 +---------------
 1 file changed, 1 insertion(+), 15 deletions(-)

diff --git a/Makefile b/Makefile
index 951e717e1d87..91f628593ee4 100644
--- a/Makefile
+++ b/Makefile
@@ -70,9 +70,7 @@ bindir_relative = bin
 bindir = $(prefix)/$(bindir_relative)
 man_dir = $(prefix)/share/man
 man_dir_SQ = '$(subst ','\'',$(man_dir))'
-html_install = $(prefix)/share/kernelshark/html
 html_install_SQ = '$(subst ','\'',$(html_install))'
-img_install = $(prefix)/share/kernelshark/html/images
 img_install_SQ = '$(subst ','\'',$(img_install))'
 libdir = $(prefix)/$(libdir_relative)
 libdir_SQ = '$(subst ','\'',$(libdir))'
@@ -207,9 +205,7 @@ PKG_CONFIG_FILE := $(addprefix $(BUILD_OUTPUT)/,$(PKG_CONFIG_SOURCE_FILE))
 
 export pkgconfig_dir PKG_CONFIG_FILE
 
-kshark-dir	= $(src)/kernel-shark
-
-export prefix bindir src obj kshark-dir
+export prefix bindir src obj
 
 LIBS = -ldl
 
@@ -355,11 +351,6 @@ all: all_cmd plugins show_other_make
 
 all_cmd: $(CMD_TARGETS)
 
-CMAKE_COMMAND = /usr/bin/cmake
-
-# Build with "BUILD_TYPE=Release" to remove cmake debug info
-BUILD_TYPE ?= RelWithDebInfo
-
 BUILD_PREFIX := $(BUILD_OUTPUT)/build_prefix
 
 $(BUILD_PREFIX): force
@@ -368,9 +359,6 @@ $(BUILD_PREFIX): force
 $(PKG_CONFIG_FILE) : ${PKG_CONFIG_SOURCE_FILE}.template $(BUILD_PREFIX) $(VERSION_FILE)
 	$(Q) $(call do_make_pkgconfig_file,$(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) ..
-
 trace-cmd: force $(LIBTRACECMD_STATIC) \
 	force $(obj)/lib/trace-cmd/plugins/tracecmd_plugin_dir
 	$(Q)$(MAKE) -C $(src)/tracecmd $(obj)/tracecmd/$@
@@ -496,8 +484,6 @@ clean:
 	$(MAKE) -C $(src)/utest 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
-	cd $(kshark-dir)/build; ./cmake_clean.sh
 
 define build_uninstall_script
 	$(Q)mkdir $(BUILD_OUTPUT)/tmp_build
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-07-26 16:29 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-26 16:28 [PATCH 0/3] trace-cmd: Clean up library and KernelShark remnants Steven Rostedt
2021-07-26 16:28 ` [PATCH 1/3] trace-cmd: Remove traceevent/ and tracefs/ from include headers Steven Rostedt
2021-07-26 16:28 ` [PATCH 2/3] trace-cmd: Remove leftover traces of libtraceevent in Makefiles Steven Rostedt
2021-07-26 16:28 ` [PATCH 3/3] trace-cmd: Remove remnants of KernelShark build Steven Rostedt

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).