Skip to content

Commit

Permalink
remove install-hook (#300)
Browse files Browse the repository at this point in the history
* improve ze?

* cuda

* fix hip?

* mpi?

* opencl?

* simplify xprof?

* fix mpi.la

* omp?

* fix mpi

* xprof/bt?

* rubocop

---------

Co-authored-by: Thomas Applencourt <[email protected]>
Co-authored-by: Thomas Applencourt <[email protected]>
  • Loading branch information
3 people authored Oct 22, 2024
1 parent 1cdaf03 commit f3a65b7
Show file tree
Hide file tree
Showing 14 changed files with 82 additions and 157 deletions.
52 changes: 20 additions & 32 deletions cuda/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions cuda/tracer_cuda.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -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" ]
Expand All @@ -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
Expand Down
36 changes: 12 additions & 24 deletions hip/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion hip/tracer_hip.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
37 changes: 12 additions & 25 deletions mpi/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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

2 changes: 1 addition & 1 deletion mpi/tracer_mpi.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion mpi/tracer_mpi_helpers.include.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
17 changes: 4 additions & 13 deletions omp/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -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) \
Expand All @@ -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 $< $@

Expand Down
33 changes: 12 additions & 21 deletions opencl/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion opencl/tracer_opencl.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
18 changes: 4 additions & 14 deletions xprof/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -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) \
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
13 changes: 6 additions & 7 deletions xprof/xprof.rb.in
Original file line number Diff line number Diff line change
@@ -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)
Expand Down Expand Up @@ -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)

Expand All @@ -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
Expand Down
Loading

0 comments on commit f3a65b7

Please sign in to comment.