Re: [PATCH v2] trace-cmd: Re-enable the build of KernelShark v1

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 16 Dec 2020 15:07:15 +0200
"Yordan Karadzhov (VMware)" <y.karadz@xxxxxxxxx> wrote:

> libtraceevent and libtracefs are now stand-alone libraries, independent
> from trace-cmd, but nevertheless trace-cmd still provides legacy/obsolete
> versions of this libraries. Since we are "freezing" KernelShark v1 and
> all active development is now focused on  KernelShark v2, we will keep
> v1 use the legacy/obsolete versions of the libraries.
> 
> An additional problem is that trace-filter-hash.h is no longer a public
> header of libtracecmd. For this reason we are adding the path to the
> tarce-cmd private headers to the list of header file locations.
> 
> We also remove the inclusion of event-utils.h in parse-utils.c in order
> to fix a compilation error when building libtraceevent.a.
> 
> Signed-off-by: Yordan Karadzhov (VMware) <y.karadz@xxxxxxxxx>
> ---
>  Makefile                              | 16 ++++++++-------
>  kernel-shark/CMakeLists.txt           |  1 +
>  kernel-shark/build/FindTraceCmd.cmake | 29 ++++++---------------------
>  kernel-shark/src/libkshark.c          | 14 ++++++++-----
>  kernel-shark/src/libkshark.h          |  2 +-
>  lib/traceevent/parse-utils.c          |  2 --
>  6 files changed, 26 insertions(+), 38 deletions(-)
> 
> diff --git a/Makefile b/Makefile
> index ab91ae7..a2a41ae 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -356,13 +356,6 @@ $(PKG_CONFIG_FILE) : ${PKG_CONFIG_SOURCE_FILE}.template
>  $(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/$@
> @@ -387,6 +380,15 @@ libtracefs.a: $(LIBTRACEFS_STATIC)
>  
>  libs: $(LIBTRACECMD_SHARED) $(LIBTRACEEVENT_STATIC_BUILD) $(LIBTRACEFS_STATIC_BUILD)
>  
> +gui: force
> +	$(MAKE) $(CMD_TARGETS)
> +	$(MAKE) $(LIBTRACEEVENT_STATIC)
> +	$(MAKE) $(LIBTRACEFS_STATIC)
> +	$(MAKE) $(kshark-dir)/build/Makefile
> +	$(Q)$(MAKE) $(S) -C $(kshark-dir)/build
> +	@echo "gui build complete"
> +	@echo "  kernelshark located at $(kshark-dir)/bin"
> +
>

The above didn't seem to work, so I changed it to:

  gui: force $(CMD_TARGETS) $(LIBTRACEEVENT_STATIC) $(LIBTRACEFS_STATIC)
	$(MAKE) $(kshark-dir)/build/Makefile
	$(Q)$(MAKE) $(S) -C $(kshark-dir)/build
	@echo "gui build complete"
	@echo "  kernelshark located at $(kshark-dir)/bin"


And let the make dependencies do the work for us. And this appears to have
worked.

Want to send a v3?

Thanks,

-- Steve



[Index of Archives]     [Linux USB Development]     [Linux USB Development]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux