diff --git a/cuda/Makefile.am b/cuda/Makefile.am index d8093bc7..6a326a50 100644 --- a/cuda/Makefile.am +++ b/cuda/Makefile.am @@ -280,46 +280,34 @@ libcudarttracepoints_la_CPPFLAGS = -I$(top_srcdir)/utils -I$(top_srcdir)/utils/i libcudarttracepoints_la_CFLAGS = $(LTTNG_UST_CFLAGS) libcudarttracepoints_la_LDFLAGS = $(LTTNG_UST_LIBS) -lib_LTLIBRARIES = libTracerCUDA.la libTracerCUDART.la libCUDAInterval.la +cudadir = $(pkglibdir)/cuda +cuda_LTLIBRARIES = libcuda.la -nodist_libTracerCUDA_la_SOURCES = \ +cudartdir = $(pkglibdir)/cudart +cudart_LTLIBRARIES = libcudart.la + +bt2dir = $(pkglibdir)/bt2 +bt2_LTLIBRARIES = libCUDAInterval.la + +nodist_libcuda_la_SOURCES = \ $(CUDA_PROBES_INCL) \ tracer_cuda.c -libTracerCUDA_la_CPPFLAGS = -I$(top_srcdir)/utils -I$(top_srcdir)/utils/include -I$(top_srcdir)/sampling -I$(srcdir)/include -I./ -libTracerCUDA_la_CFLAGS = -Wall -Wextra $(WERROR) $(LIBFFI_CFLAGS) $(LTTNG_UST_CFLAGS) -libTracerCUDA_la_LDFLAGS = $(LTTNG_UST_LIBS) -ldl -lpthread $(LIBFFI_LIBS) ../sampling/libThapiSampling.la -libTracerCUDA_la_LDFLAGS += -version-info 1:0:0 -libTracerCUDA_la_LIBADD = libcudatracepoints.la +libcuda_la_CPPFLAGS = -I$(top_srcdir)/utils -I$(top_srcdir)/utils/include -I$(top_srcdir)/sampling -I$(srcdir)/include -I./ +libcuda_la_CFLAGS = -Wall -Wextra $(WERROR) $(LIBFFI_CFLAGS) $(LTTNG_UST_CFLAGS) +libcuda_la_LDFLAGS = $(LTTNG_UST_LIBS) -ldl -lpthread $(LIBFFI_LIBS) ../sampling/libThapiSampling.la +libcuda_la_LDFLAGS += -version-info 1:0:0 +libcuda_la_LIBADD = libcudatracepoints.la -nodist_libTracerCUDART_la_SOURCES = \ +nodist_libcudart_la_SOURCES = \ $(CUDART_PROBES_INCL) \ tracer_cudart.c -libTracerCUDART_la_CPPFLAGS = -I$(top_srcdir)/utils -I$(top_srcdir)/utils/include -I$(top_srcdir)/sampling -I$(srcdir)/include -I./ -libTracerCUDART_la_CFLAGS = -Wall -Wextra $(WERROR) $(LIBFFI_CFLAGS) $(LTTNG_UST_CFLAGS) -libTracerCUDART_la_LDFLAGS = $(LTTNG_UST_LIBS) -ldl -lpthread $(LIBFFI_LIBS) ../sampling/libThapiSampling.la -libTracerCUDART_la_LDFLAGS += -version-number 12:1:55 -Wl,--version-script,tracer_cudart.map -libTracerCUDART_la_LIBADD = libcudarttracepoints.la - -install-exec-hook: - $(MKDIR_P) $(DESTDIR)$(pkglibdir)/cudart - $(MKDIR_P) $(DESTDIR)$(pkglibdir)/cuda - $(LN_S) -f $(DESTDIR)$(libdir)/libTracerCUDART.so.12.1.55 $(DESTDIR)$(pkglibdir)/cudart/libcudart.so.12 - $(LN_S) -f $(DESTDIR)$(pkglibdir)/cudart/libcudart.so.12 $(DESTDIR)$(pkglibdir)/cudart/libcudart.so - $(LN_S) -f $(DESTDIR)$(libdir)/libTracerCUDA.so.1.0.0 $(DESTDIR)$(pkglibdir)/cuda/libcuda.so.1 - $(LN_S) -f $(DESTDIR)$(pkglibdir)/cuda/libcuda.so.1 $(DESTDIR)$(pkglibdir)/cuda/libcuda.so - $(MKDIR_P) $(DESTDIR)$(pkglibdir)/bt2 - $(LN) -f $(DESTDIR)$(libdir)/libCUDAInterval.so $(DESTDIR)$(pkglibdir)/bt2/libCUDAInterval.so - - -uninstall-hook: - $(RM) -f $(DESTDIR)$(pkglibdir)/cudart/libcudart.so.12 $(DESTDIR)$(pkglibdir)/cudart/libcudart.so - $(RM) -f $(DESTDIR)$(pkglibdir)/cuda/libcuda.so.1 $(DESTDIR)$(pkglibdir)/cuda/libcuda.so - -rmdir $(DESTDIR)$(pkglibdir)/cudart - -rmdir $(DESTDIR)$(pkglibdir)/cuda - $(RM) -f $(DESTDIR)$(pkglibdir)/bt2/libCUDAInterval.so - -rmdir $(DESTDIR)$(pkglibdir)/bt2 +libcudart_la_CPPFLAGS = -I$(top_srcdir)/utils -I$(top_srcdir)/utils/include -I$(top_srcdir)/sampling -I$(srcdir)/include -I./ +libcudart_la_CFLAGS = -Wall -Wextra $(WERROR) $(LIBFFI_CFLAGS) $(LTTNG_UST_CFLAGS) +libcudart_la_LDFLAGS = $(LTTNG_UST_LIBS) -ldl -lpthread $(LIBFFI_LIBS) ../sampling/libThapiSampling.la +libcudart_la_LDFLAGS += -version-number 12:1:55 -Wl,--version-script,tracer_cudart.map +libcudart_la_LIBADD = libcudarttracepoints.la tmplibdir = $(libdir)/tmp install-data-hook: diff --git a/cuda/tracer_cuda.sh.in b/cuda/tracer_cuda.sh.in index c0390577..3e1d5f1c 100644 --- a/cuda/tracer_cuda.sh.in +++ b/cuda/tracer_cuda.sh.in @@ -120,7 +120,7 @@ then else export LD_LIBRARY_PATH=$pkglibdir/cuda:$LD_LIBRARY_PATH fi -export LD_PRELOAD=$libdir/libTracerCUDA.so:$LD_PRELOAD +export LD_PRELOAD=$pkglibdir/cuda/libcuda.so:$LD_PRELOAD export LTTNG_UST_ALLOW_BLOCKING=1 export LTTNG_UST_CUDA_VERBOSE=1 if [ ! -z "$cudart" ] @@ -136,7 +136,7 @@ then else export LD_LIBRARY_PATH=$pkglibdir/cudart:$LD_LIBRARY_PATH fi - export LD_PRELOAD=$libdir/libTracerCUDART.so:$LD_PRELOAD + export LD_PRELOAD=$pkglibdir/cudart/libcudart.so:$LD_PRELOAD export LTTNG_UST_CUDART_VERBOSE=1 fi lttng start diff --git a/hip/Makefile.am b/hip/Makefile.am index f387ae7a..e6193459 100644 --- a/hip/Makefile.am +++ b/hip/Makefile.am @@ -285,34 +285,22 @@ libhiptracepoints_la_CPPFLAGS = -I$(top_srcdir)/utils -I$(top_srcdir)/utils/incl libhiptracepoints_la_CFLAGS = -fPIC -Wall -Wextra -Wno-unused-parameter -Wno-type-limits -Wno-sign-compare $(WERROR) $(LTTNG_UST_CFLAGS) libhiptracepoints_la_LDFLAGS = $(LTTNG_UST_LIBS) -lib_LTLIBRARIES = \ - libTracerHIP.la \ - libHIPInterval.la +hipdir = $(pkglibdir)/hip +hip_LTLIBRARIES = libamdhip64.la -nodist_libTracerHIP_la_SOURCES = \ +bt2dir = $(pkglibdir)/bt2 +bt2_LTLIBRARIES = libHIPInterval.la + +nodist_libamdhip64_la_SOURCES = \ $(HIP_PROBES_INCL) \ tracer_hip.c -libTracerHIP_la_CPPFLAGS = -I$(top_srcdir)/utils -I$(top_srcdir)/utils/include -I$(top_srcdir)/sampling -I$(srcdir)/include -I./utils -I./ -libTracerHIP_la_CFLAGS = -Wall -Wextra $(WERROR) $(LIBFFI_CFLAGS) $(LTTNG_UST_CFLAGS) -libTracerHIP_la_LDFLAGS = $(LTTNG_UST_LIBS) -ldl -lpthread $(LIBFFI_LIBS) ../sampling/libThapiSampling.la -libTracerHIP_la_LDFLAGS += -Wl,--version-script,$(srcdir)/hip.map -version-number 5:4:50400 -libTracerHIP_la_DEPENDS = $(srcdir)/hip.map -libTracerHIP_la_LIBADD = libhiptracepoints.la - -install-exec-hook: - $(MKDIR_P) $(DESTDIR)$(pkglibdir)/hip - $(LN_S) -f $(DESTDIR)$(libdir)/libTracerHIP.so.5.4.50400 $(DESTDIR)$(pkglibdir)/hip/libamdhip64.so.5 - $(LN_S) -f $(DESTDIR)$(pkglibdir)/hip/libamdhip64.so.5 $(DESTDIR)$(pkglibdir)/hip/libamdhip64.so - $(MKDIR_P) $(DESTDIR)$(pkglibdir)/bt2 - $(LN) -f $(DESTDIR)$(libdir)/libHIPInterval.so $(DESTDIR)$(pkglibdir)/bt2/libHIPInterval.so - - -uninstall-hook: - $(RM) -f $(DESTDIR)$(pkglibdir)/hip/libamdhip64.so.5 $(DESTDIR)$(pkglibdir)/hip/libamdhip64.so - -rmdir $(DESTDIR)$(pkglibdir)/hip - $(RM) -f $(DESTDIR)$(pkglibdir)/bt2/libHIPInterval.so - -rmdir $(DESTDIR)$(pkglibdir)/bt2 +libamdhip64_la_CPPFLAGS = -I$(top_srcdir)/utils -I$(top_srcdir)/utils/include -I$(top_srcdir)/sampling -I$(srcdir)/include -I./utils -I./ +libamdhip64_la_CFLAGS = -Wall -Wextra $(WERROR) $(LIBFFI_CFLAGS) $(LTTNG_UST_CFLAGS) +libamdhip64_la_LDFLAGS = $(LTTNG_UST_LIBS) -ldl -lpthread $(LIBFFI_LIBS) ../sampling/libThapiSampling.la +libamdhip64_la_LDFLAGS += -Wl,--version-script,$(srcdir)/hip.map -version-number 5:4:50400 +libamdhip64_la_DEPENDS = $(srcdir)/hip.map +libamdhip64_la_LIBADD = libhiptracepoints.la tmplibdir = $(libdir)/tmp diff --git a/hip/tracer_hip.sh.in b/hip/tracer_hip.sh.in index ae247beb..b0faf4c5 100644 --- a/hip/tracer_hip.sh.in +++ b/hip/tracer_hip.sh.in @@ -82,7 +82,7 @@ then else export LD_LIBRARY_PATH=$pkglibdir/hip:$LD_LIBRARY_PATH fi -export LD_PRELOAD=$libdir/libTracerHIP.so:$LD_PRELOAD +export LD_PRELOAD=$pkglibdir/hip/libamdhip64.so:$LD_PRELOAD export LTTNG_UST_ALLOW_BLOCKING=1 export LTTNG_UST_HIP_VERBOSE=1 lttng start diff --git a/mpi/Makefile.am b/mpi/Makefile.am index b3424df0..da32c02c 100644 --- a/mpi/Makefile.am +++ b/mpi/Makefile.am @@ -128,30 +128,22 @@ libmpitracepoints_la_CPPFLAGS = -I$(top_srcdir)/utils -I$(top_srcdir)/utils/incl libmpitracepoints_la_CFLAGS = -fPIC -Wall -Wextra -Wno-unused-parameter -Wno-type-limits -Wno-sign-compare $(WERROR) $(LTTNG_UST_CFLAGS) libmpitracepoints_la_LDFLAGS = $(LTTNG_UST_LIBS) -nodist_libTracerMPI_la_SOURCES = \ +mpidir = $(pkglibdir)/mpi +mpi_LTLIBRARIES = libmpi.la + +bt2dir = $(pkglibdir)/bt2 +bt2_LTLIBRARIES = libMPIInterval.la + +nodist_libmpi_la_SOURCES = \ $(MPI_PROBES_INCL) \ $(MPI_STATIC_PROBES_INCL) \ tracer_mpi.c -libTracerMPI_la_CPPFLAGS = -I$(top_srcdir)/utils -I$(top_srcdir)/utils/include -I$(srcdir)/include -I./utils -I./ -libTracerMPI_la_CFLAGS = -Wall -Wextra $(WERROR) $(LIBFFI_CFLAGS) $(LTTNG_UST_CFLAGS) -libTracerMPI_la_LDFLAGS = $(LTTNG_UST_LIBS) -ldl -lpthread -libTracerMPI_la_LIBADD = libmpitracepoints.la - -install-exec-hook: - $(MKDIR_P) $(DESTDIR)$(pkglibdir)/mpi - $(LN_S) -f $(DESTDIR)$(libdir)/libTracerMPI.so.1.0.0 $(DESTDIR)$(pkglibdir)/mpi/libmpi.so.1 - $(LN_S) -f $(DESTDIR)$(pkglibdir)/mpi/libmpi.so.1 $(DESTDIR)$(pkglibdir)/mpi/libmpi.so - $(MKDIR_P) $(DESTDIR)$(pkglibdir)/bt2 - $(LN) -f $(DESTDIR)$(libdir)/libMPIInterval.so $(DESTDIR)$(pkglibdir)/bt2/libMPIInterval.so - - -uninstall-hook: - $(RM) -f $(DESTDIR)$(libdir)/libTracerMPI.so.1.0.0 $(DESTDIR)$(pkglibdir)/mpi/libmpi.so.1 - $(RM) -f $(DESTDIR)$(pkglibdir)/mpi/libmpi.so.1 $(DESTDIR)$(pkglibdir)/mpi/libmpi.so - -rmdir $(DESTDIR)$(pkglibdir)/mpi - $(RM) -f $(DESTDIR)$(pkglibdir)/bt2/libMPIInterval.so - -rmdir $(DESTDIR)$(pkglibdir)/bt2 +libmpi_la_CPPFLAGS = -I$(top_srcdir)/utils -I$(top_srcdir)/utils/include -I$(srcdir)/include -I./utils -I./ +libmpi_la_CFLAGS = -Wall -Wextra $(WERROR) $(LIBFFI_CFLAGS) $(LTTNG_UST_CFLAGS) +libmpi_la_LDFLAGS = $(LTTNG_UST_LIBS) -ldl -lpthread +libmpi_la_LDFLAGS += -version-info 1:0:0 +libmpi_la_LIBADD = libmpitracepoints.la tmplibdir = $(libdir)/tmp install-data-hook: @@ -222,8 +214,3 @@ libMPIInterval_la_CPPFLAGS = -I$(top_srcdir)/utils -I$(top_srcdir)/utils/include libMPIInterval_la_CFLAGS = -Wall -Wextra -Wno-unused-parameter $(WERROR) $(BABELTRACE2_CFLAGS) libMPIInterval_la_CXXFLAGS = -std=c++17 -Wall -Wextra -Wno-unused-parameter $(WERROR) $(BABELTRACE2_CFLAGS) libMPIInterval_la_LDFLAGS = $(BABELTRACE2_LIBS) -avoid-version -module - -lib_LTLIBRARIES = \ - libTracerMPI.la \ - libMPIInterval.la - diff --git a/mpi/tracer_mpi.sh.in b/mpi/tracer_mpi.sh.in index 8dc958c8..4504009b 100644 --- a/mpi/tracer_mpi.sh.in +++ b/mpi/tracer_mpi.sh.in @@ -82,7 +82,7 @@ then else export LD_LIBRARY_PATH=$pkglibdir/mpi:$LD_LIBRARY_PATH fi -export LD_PRELOAD=$libdir/libTracerMPI.so:$LD_PRELOAD +export LD_PRELOAD=$pkglibdir/mpi/libmpi.so:$LD_PRELOAD export LTTNG_UST_ALLOW_BLOCKING=1 export LTTNG_UST_MPI_VERBOSE=1 lttng start diff --git a/mpi/tracer_mpi_helpers.include.c b/mpi/tracer_mpi_helpers.include.c index bdbdea6e..0fdf92b4 100644 --- a/mpi/tracer_mpi_helpers.include.c +++ b/mpi/tracer_mpi_helpers.include.c @@ -7,7 +7,7 @@ static void _load_tracer(void) { void *handle = NULL; int verbose = 0; - s = getenv("LTTNG_UST_MPI_LIBMPI_LOADER"); + s = getenv("LTTNG_UST_MPI_LIBMPI"); if (s) handle = dlopen(s, RTLD_LAZY | RTLD_LOCAL | RTLD_DEEPBIND); else diff --git a/omp/Makefile.am b/omp/Makefile.am index 69545c12..1d3bac2c 100644 --- a/omp/Makefile.am +++ b/omp/Makefile.am @@ -134,7 +134,10 @@ libompttracepoints_la_CPPFLAGS = -I$(top_srcdir)/utils -I$(top_srcdir)/utils/inc libompttracepoints_la_CFLAGS = -fPIC -Wall -Wextra -Wno-unused-parameter -Wno-type-limits -Wno-sign-compare $(WERROR) $(LTTNG_UST_CFLAGS) libompttracepoints_la_LDFLAGS = $(LTTNG_UST_LIBS) -lib_LTLIBRARIES = libTracerOMPT.la libOMPInterval.la +lib_LTLIBRARIES = libTracerOMPT.la + +bt2dir = $(pkglibdir)/bt2 +bt2_LTLIBRARIES = libOMPInterval.la nodist_libTracerOMPT_la_SOURCES = \ $(OMP_PROBES_INCL) \ @@ -145,18 +148,6 @@ libTracerOMPT_la_CFLAGS = -Wall -Wextra $(WERROR) $(LTTNG_UST_CFLAGS) libTracerOMPT_la_LDFLAGS = $(LTTNG_UST_LIBS) -avoid-version -module ../sampling/libThapiSampling.la libTracerOMPT_la_LIBADD = libompttracepoints.la -install-exec-hook: - $(MKDIR_P) $(DESTDIR)$(pkglibdir)/ompt - $(LN_S) -f $(DESTDIR)$(libdir)/libTracerOMPT.so $(DESTDIR)$(pkglibdir)/ompt/libompt.so - $(MKDIR_P) $(DESTDIR)$(pkglibdir)/bt2 - $(LN) -f $(DESTDIR)$(libdir)/libOMPInterval.so $(DESTDIR)$(pkglibdir)/bt2/libOMPInterval.so - -uninstall-hook: - $(RM) -f $(DESTDIR)$(pkglibdir)/ompt/libompt.so - -rmdir $(DESTDIR)$(pkglibdir)/ompt - $(RM) -f $(DESTDIR)$(pkglibdir)/bt2/libOMPInterval.so - -rmdir $(DESTDIR)$(pkglibdir)/bt2 - xprof_utils.hpp: $(top_srcdir)/utils/xprof_utils.hpp cp $< $@ diff --git a/opencl/Makefile.am b/opencl/Makefile.am index ff4d64e5..449a7de8 100644 --- a/opencl/Makefile.am +++ b/opencl/Makefile.am @@ -163,33 +163,24 @@ libOpenCLtracepoints_la_CPPFLAGS = -I$(top_srcdir)/utils -I$(top_srcdir)/utils/i libOpenCLtracepoints_la_CFLAGS = -fPIC -Wall -Wextra -Wno-unused-parameter -Wno-type-limits -Wno-sign-compare $(WERROR) $(LTTNG_UST_CFLAGS) libOpenCLtracepoints_la_LDFLAGS = $(LTTNG_UST_LIBS) -lib_LTLIBRARIES = libTracerOpenCL.la libCLInterval.la +opencldir = $(pkglibdir)/opencl +opencl_LTLIBRARIES = libOpenCL.la -nodist_libTracerOpenCL_la_SOURCES = \ +bt2dir = $(pkglibdir)/bt2 +bt2_LTLIBRARIES = libCLInterval.la + +nodist_libOpenCL_la_SOURCES = \ $(OPENCL_PROBES_INCL) \ $(OPENCL_STATIC_PROBES_INCL) \ tracer_opencl.h \ tracer_opencl.c -libTracerOpenCL_la_CPPFLAGS = -I$(top_srcdir)/utils -I$(top_srcdir)/utils/include -I$(top_srcdir)/sampling -I$(srcdir)/include -I../utils -I./ -libTracerOpenCL_la_CFLAGS = -Wall -Wextra -Wno-unused-parameter $(WERROR) $(LIBFFI_CFLAGS) $(LTTNG_UST_CFLAGS) -libTracerOpenCL_la_LDFLAGS = $(LTTNG_UST_LIBS) -ldl -lpthread $(LIBFFI_LIBS) ../sampling/libThapiSampling.la -libTracerOpenCL_la_LDFLAGS += -Wl,--version-script,$(srcdir)/tracer_opencl.map -version-info 1:0:0 -libTracerOpenCL_la_DEPENDS = $(srcdir)/tracer_opencl.map -libTracerOpenCL_la_LIBADD = libOpenCLtracepoints.la - -install-exec-hook: - $(MKDIR_P) $(DESTDIR)$(pkglibdir)/opencl - $(LN_S) -f $(DESTDIR)$(libdir)/libTracerOpenCL.so.1.0.0 $(DESTDIR)$(pkglibdir)/opencl/libOpenCL.so.1 - $(LN_S) -f $(DESTDIR)$(pkglibdir)/opencl/libOpenCL.so.1 $(DESTDIR)$(pkglibdir)/opencl/libOpenCL.so - $(MKDIR_P) $(DESTDIR)$(pkglibdir)/bt2 - $(LN) -f $(DESTDIR)$(libdir)/libCLInterval.so $(DESTDIR)$(pkglibdir)/bt2/libCLInterval.so - -uninstall-hook: - $(RM) -f $(DESTDIR)$(pkglibdir)/opencl/libOpenCL.so.1 $(DESTDIR)$(pkglibdir)/opencl/libOpenCL.so - -rmdir $(DESTDIR)$(pkglibdir)/opencl - $(RM) -f $(DESTDIR)$(pkglibdir)/bt2/libCLInterval.so - -rmdir $(DESTDIR)$(pkglibdir)/bt2 +libOpenCL_la_CPPFLAGS = -I$(top_srcdir)/utils -I$(top_srcdir)/utils/include -I$(top_srcdir)/sampling -I$(srcdir)/include -I../utils -I./ +libOpenCL_la_CFLAGS = -Wall -Wextra -Wno-unused-parameter $(WERROR) $(LIBFFI_CFLAGS) $(LTTNG_UST_CFLAGS) +libOpenCL_la_LDFLAGS = $(LTTNG_UST_LIBS) -ldl -lpthread $(LIBFFI_LIBS) ../sampling/libThapiSampling.la +libOpenCL_la_LDFLAGS += -Wl,--version-script,$(srcdir)/tracer_opencl.map -version-info 1:0:0 +libOpenCL_la_DEPENDS = $(srcdir)/tracer_opencl.map +libOpenCL_la_LIBADD = libOpenCLtracepoints.la # Cannot use check_LTLIBRARIES because we need the shared version of those # Thanks Vincent Danjean diff --git a/opencl/tracer_opencl.sh.in b/opencl/tracer_opencl.sh.in index 67a866e5..8ff8486d 100644 --- a/opencl/tracer_opencl.sh.in +++ b/opencl/tracer_opencl.sh.in @@ -140,7 +140,7 @@ then else export LD_LIBRARY_PATH=$pkglibdir/opencl:$LD_LIBRARY_PATH fi -export LD_PRELOAD=$libdir/libTracerOpenCL.so:$LD_PRELOAD +export LD_PRELOAD=$pkglibdir/opencl/libOpenCL.so:$LD_PRELOAD export LTTNG_UST_ALLOW_BLOCKING=1 export LTTNG_UST_OPENCL_VERBOSE=1 lttng start diff --git a/xprof/Makefile.am b/xprof/Makefile.am index e59bba0c..ed47bcd1 100644 --- a/xprof/Makefile.am +++ b/xprof/Makefile.am @@ -87,9 +87,6 @@ BUILT_SOURCES = \ perfetto_prunned.pb.h \ perfetto_prunned.pb.cc -# Library to be packaged -lib_LTLIBRARIES = libXTally.la libXTimeline.la libXAggreg.la libXStripper.la - # File generated but not distributed nodist_libXTally_la_SOURCES = \ $(BTX_TALLY_GENERATED) \ @@ -125,6 +122,10 @@ libXAggreg_la_SOURCES = \ tally_core.hpp \ btx_aggreg.cpp +# Library to be packaged +bt2dir = $(pkglibdir)/bt2 +bt2_LTLIBRARIES = libXTally.la libXTimeline.la libXAggreg.la libXStripper.la + # JSON: Right now we harcode it, We should use pkgtools at some point https://github.com/nlohmann/json/blob/develop/single_include/nlohmann/json.hpp # Compiler flags @@ -148,17 +149,6 @@ libXStripper_la_CFLAGS = -Wall -Wextra -Wno-unused-parameter $(WERROR) -fno-fast libXStripper_la_CXXFLAGS = -std=c++17 -Wall -Wextra -Wno-unused-parameter $(WERROR) -fno-fast-math $(BABELTRACE2_CFLAGS) libXStripper_la_LDFLAGS = $(BABELTRACE2_LIBS) -avoid-version -module -install-exec-hook: - $(MKDIR_P) $(DESTDIR)$(pkglibdir)/bt2 - $(LN) -f $(DESTDIR)$(libdir)/libXAggreg.so $(DESTDIR)$(pkglibdir)/bt2/libXAggreg.so - $(LN) -f $(DESTDIR)$(libdir)/libXTimeline.so $(DESTDIR)$(pkglibdir)/bt2/libXTimeline.so - $(LN) -f $(DESTDIR)$(libdir)/libXTally.so $(DESTDIR)$(pkglibdir)/bt2/libXTally.so - $(LN) -f $(DESTDIR)$(libdir)/libXStripper.so $(DESTDIR)$(pkglibdir)/bt2/libXStripper.so - -uninstall-hook: - $(RM) $(DESTDIR)$(pkglibdir)/bt2/libXAggreg.so $(DESTDIR)$(pkglibdir)/bt2/libXTimeline.so $(DESTDIR)$(pkglibdir)/bt2/libXTally.so $(DESTDIR)$(pkglibdir)/bt2/libXStripper.so - -rmdir $(DESTDIR)$(pkglibdir)/bt2 - # Cannot use check_LTLIBRARIES because we need the shared version of those # Thanks Vincent Danjean # noinst_LTLIBRARIES would be the correct thing but then libtool diff --git a/xprof/xprof.rb.in b/xprof/xprof.rb.in index 4343a6ab..90df5f30 100755 --- a/xprof/xprof.rb.in +++ b/xprof/xprof.rb.in @@ -1,6 +1,5 @@ #!/usr/bin/env ruby - # 2.7 for Lazy in Enumerable. 2.7 was released 25 Dec 2019 THAPI_RUBY_MINIMAL_VERSION = '2.6.0' if Gem::Version.new(RUBY_VERSION) < Gem::Version.new(THAPI_RUBY_MINIMAL_VERSION) @@ -380,11 +379,11 @@ def env_tracers h = Hash.new { |h, k| h[k] = [] } backends = [] - [%w[opencl cl libOpenCL libTracerOpenCL], - %w[ze ze libze_loader libze_loader], - %w[cuda cuda libcuda libTracerCUDA], - %w[hip hip libamdhip64 libTracerHIP], - %w[mpi mpi libmpi libTracerMPI]].each do |name, bt_name, lib, libtracer| + [%w[opencl cl libOpenCL], + %w[ze ze libze_loader], + %w[cuda cuda libcuda], + %w[hip hip libamdhip64], + %w[mpi mpi libmpi]].each do |name, bt_name, lib| # Backend requested, skip omp. It will be handled in a custom case bellow next unless OPTIONS[:'backend-names'].include?(bt_name) @@ -403,7 +402,7 @@ def env_tracers # Add our "stud" library to the path h[%w[LD_LIBRARY_PATH prepend]] << File.join(PKGLIBDIR, name) # Preload our own lib - h[%w[LD_PRELOAD prepend]] << File.join(LIBDIR, "#{libtracer}.so") + h[%w[LD_PRELOAD prepend]] << File.join(PKGLIBDIR, name, "#{lib}.so") h["LTTNG_UST_#{name.upcase}_PROFILE"] = 1 if OPTIONS[:profile] h["LTTNG_UST_#{name.upcase}_VERBOSE"] = 1 if LOGGER.level <= Logger::DEBUG end diff --git a/ze/Makefile.am b/ze/Makefile.am index 19ee789f..d7adb31c 100644 --- a/ze/Makefile.am +++ b/ze/Makefile.am @@ -168,7 +168,11 @@ libzetracepoints_la_CPPFLAGS = -I$(top_srcdir)/utils -I$(top_srcdir)/utils/inclu libzetracepoints_la_CFLAGS = -fPIC -Wall -Wextra -Wno-unused-parameter -Wno-type-limits -Wno-sign-compare $(WERROR) $(LTTNG_UST_CFLAGS) libzetracepoints_la_LDFLAGS = $(LTTNG_UST_LIBS) -lib_LTLIBRARIES = libze_loader.la libZEInterval.la +zedir = $(pkglibdir)/ze +ze_LTLIBRARIES = libze_loader.la + +bt2dir = $(pkglibdir)/bt2 +bt2_LTLIBRARIES = libZEInterval.la nodist_libze_loader_la_SOURCES = \ $(ZE_PROBES_INCL) \ @@ -181,19 +185,6 @@ libze_loader_la_LDFLAGS = $(LTTNG_UST_LIBS) -ldl -lpthread $(LIBFFI_LIBS) ../sam libze_loader_la_LDFLAGS += -version-info 1:0:0 libze_loader_la_LIBADD = libzetracepoints.la -install-exec-hook: - $(MKDIR_P) $(DESTDIR)$(pkglibdir)/ze - $(LN_S) -f $(DESTDIR)$(libdir)/libze_loader.so.1.0.0 $(DESTDIR)$(pkglibdir)/ze/libze_loader.so.1 - $(LN_S) -f $(DESTDIR)$(pkglibdir)/ze/libze_loader.so.1 $(DESTDIR)$(pkglibdir)/ze/libze_loader.so - $(MKDIR_P) $(DESTDIR)$(pkglibdir)/bt2 - $(LN) -f $(DESTDIR)$(libdir)/libZEInterval.so $(DESTDIR)$(pkglibdir)/bt2/libZEInterval.so - -uninstall-hook: - $(RM) -f $(DESTDIR)$(pkglibdir)/ze/libze_loader.so.1 $(DESTDIR)$(pkglibdir)/ze/libze_loader.so - -rmdir $(DESTDIR)$(pkglibdir)/ze - $(RM) -f $(DESTDIR)$(pkglibdir)/bt2/libZEInterval.so - -rmdir $(DESTDIR)$(pkglibdir)/bt2 - tmplibdir = $(libdir)/tmp install-data-hook: diff --git a/ze/tracer_ze.sh.in b/ze/tracer_ze.sh.in index 0185ac43..9741af9d 100644 --- a/ze/tracer_ze.sh.in +++ b/ze/tracer_ze.sh.in @@ -126,7 +126,7 @@ then else export LD_LIBRARY_PATH=$pkglibdir/ze:$LD_LIBRARY_PATH fi -export LD_PRELOAD=$libdir/libze_loader.so:$LD_PRELOAD +export LD_PRELOAD=$pkglibdir/ze/libze_loader.so:$LD_PRELOAD export LTTNG_UST_ALLOW_BLOCKING=1 export LTTNG_UST_ZE_VERBOSE=1 lttng start