Skip to content

Commit

Permalink
fix_linking_sampling
Browse files Browse the repository at this point in the history
  • Loading branch information
TApplencourt committed Feb 5, 2025
1 parent bde2900 commit 6997363
Show file tree
Hide file tree
Showing 9 changed files with 12 additions and 28 deletions.
8 changes: 4 additions & 4 deletions cuda/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -293,19 +293,19 @@ nodist_libcuda_la_SOURCES = \
$(CUDA_PROBES_INCL) \
tracer_cuda.c

libcuda_la_CPPFLAGS = -I$(top_srcdir)/utils -I$(top_srcdir)/utils/include -I$(top_srcdir)/sampling -I$(srcdir)/include -I./
libcuda_la_CPPFLAGS = -I$(top_srcdir)/utils -I$(top_srcdir)/utils/include -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 = $(LTTNG_UST_LIBS) -ldl -lpthread $(LIBFFI_LIBS)
libcuda_la_LDFLAGS += -version-info 1:0:0
libcuda_la_LIBADD = libcudatracepoints.la

nodist_libcudart_la_SOURCES = \
$(CUDART_PROBES_INCL) \
tracer_cudart.c

libcudart_la_CPPFLAGS = -I$(top_srcdir)/utils -I$(top_srcdir)/utils/include -I$(top_srcdir)/sampling -I$(srcdir)/include -I./
libcudart_la_CPPFLAGS = -I$(top_srcdir)/utils -I$(top_srcdir)/utils/include -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 = $(LTTNG_UST_LIBS) -ldl -lpthread $(LIBFFI_LIBS)
libcudart_la_LDFLAGS += -version-number 12:1:55 -Wl,--version-script,tracer_cudart.map
libcudart_la_LIBADD = libcudarttracepoints.la

Expand Down
4 changes: 0 additions & 4 deletions cuda/tracer_cuda_helpers.include.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#include "thapi_sampling.h"

//pthread_mutex_t cuda_closures_mutex = PTHREAD_MUTEX_INITIALIZER;
//
//struct cuda_closure {
Expand Down Expand Up @@ -497,8 +495,6 @@ static void _load_tracer(void) {
void *handle = NULL;
int verbose = 0;

thapi_sampling_init();

s = getenv("LTTNG_UST_CUDA_LIBCUDA");
if (s)
handle = dlopen(s, RTLD_LAZY | RTLD_LOCAL | RTLD_DEEPBIND);
Expand Down
4 changes: 0 additions & 4 deletions cuda/tracer_cudart_helpers.include.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#include "thapi_sampling.h"

static pthread_once_t _init = PTHREAD_ONCE_INIT;
static __thread volatile int in_init = 0;
static volatile int _initialized = 0;
Expand All @@ -9,8 +7,6 @@ static void _load_tracer(void) {
void *handle = NULL;
int verbose = 0;

thapi_sampling_init();

s = getenv("LTTNG_UST_CUDART_LIBCUDART");
if (s)
handle = dlopen(s, RTLD_LAZY | RTLD_LOCAL);
Expand Down
4 changes: 2 additions & 2 deletions hip/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -295,9 +295,9 @@ nodist_libamdhip64_la_SOURCES = \
$(HIP_PROBES_INCL) \
tracer_hip.c

libamdhip64_la_CPPFLAGS = -I$(top_srcdir)/utils -I$(top_srcdir)/utils/include -I$(top_srcdir)/sampling -I$(srcdir)/include -I./utils -I./
libamdhip64_la_CPPFLAGS = -I$(top_srcdir)/utils -I$(top_srcdir)/utils/include -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 = $(LTTNG_UST_LIBS) -ldl -lpthread $(LIBFFI_LIBS)
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
Expand Down
4 changes: 2 additions & 2 deletions omp/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -143,9 +143,9 @@ nodist_libTracerOMPT_la_SOURCES = \
$(OMP_PROBES_INCL) \
tracer_ompt.c

libTracerOMPT_la_CPPFLAGS = -I$(top_srcdir)/utils -I$(top_srcdir)/utils/include -I$(top_srcdir)/sampling -I./modified_include -I./
libTracerOMPT_la_CPPFLAGS = -I$(top_srcdir)/utils -I$(top_srcdir)/utils/include -I./modified_include -I./
libTracerOMPT_la_CFLAGS = -Wall -Wextra $(WERROR) $(LTTNG_UST_CFLAGS)
libTracerOMPT_la_LDFLAGS = $(LTTNG_UST_LIBS) -avoid-version -module ../sampling/libThapiSampling.la
libTracerOMPT_la_LDFLAGS = $(LTTNG_UST_LIBS) -avoid-version -module
libTracerOMPT_la_LIBADD = libompttracepoints.la

xprof_utils.hpp: $(top_srcdir)/utils/xprof_utils.hpp
Expand Down
4 changes: 0 additions & 4 deletions omp/tracer_ompt_helpers.include.c.erb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#include "thapi_sampling.h"

<% require "yaml" %>
<% require "set" %>

Expand Down Expand Up @@ -36,8 +34,6 @@ static int _ompt_initialize(ompt_function_lookup_t lookup,
int do_callbacks_emi = 1;
int verbose = 0;

thapi_sampling_init();

/* TODO: enable when oneAPI updates ompt runtime omp_version
if (tool_data->value < 202011) {
// Note: version 202011 is 5.1, where the emi callbacks were added
Expand Down
4 changes: 2 additions & 2 deletions opencl/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -175,9 +175,9 @@ nodist_libOpenCL_la_SOURCES = \
tracer_opencl.h \
tracer_opencl.c

libOpenCL_la_CPPFLAGS = -I$(top_srcdir)/utils -I$(top_srcdir)/utils/include -I$(top_srcdir)/sampling -I$(srcdir)/include -I../utils -I./
libOpenCL_la_CPPFLAGS = -I$(top_srcdir)/utils -I$(top_srcdir)/utils/include -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 = $(LTTNG_UST_LIBS) -ldl -lpthread $(LIBFFI_LIBS)
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
Expand Down
4 changes: 0 additions & 4 deletions opencl/tracer_opencl_helpers.include.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#include "thapi_sampling.h"

void CL_CALLBACK event_notify (cl_event event, cl_int event_command_exec_status, void *user_data) {
(void)user_data;
if (tracepoint_enabled(lttng_ust_opencl_profiling, event_profiling_results)) {
Expand Down Expand Up @@ -1182,8 +1180,6 @@ static void _load_tracer(void) {
void * handle = NULL;
int verbose = 0;

thapi_sampling_init();

s = getenv("LTTNG_UST_OPENCL_LIBOPENCL");
if (s)
handle = dlopen(s, RTLD_LAZY | RTLD_LOCAL | RTLD_DEEPBIND);
Expand Down
4 changes: 2 additions & 2 deletions ze/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -196,9 +196,9 @@ nodist_libze_loader_la_SOURCES = \
$(ZE_STATIC_PROBES_INCL) \
tracer_ze.c

libze_loader_la_CPPFLAGS = -I$(top_srcdir)/utils -I$(top_srcdir)/utils/include -I$(top_srcdir)/sampling -I$(srcdir)/include -I$(top_srcdir)/utils -I./
libze_loader_la_CPPFLAGS = -I$(top_srcdir)/utils -I$(top_srcdir)/utils/include -I$(srcdir)/include -I$(top_srcdir)/utils -I./
libze_loader_la_CFLAGS = -Wall -Wextra $(WERROR) $(LIBFFI_CFLAGS) $(LTTNG_UST_CFLAGS)
libze_loader_la_LDFLAGS = $(LTTNG_UST_LIBS) -ldl -lpthread $(LIBFFI_LIBS) ../sampling/libThapiSampling.la
libze_loader_la_LDFLAGS = $(LTTNG_UST_LIBS) -ldl -lpthread $(LIBFFI_LIBS)
libze_loader_la_LDFLAGS += -version-info 1:0:0
libze_loader_la_LIBADD = libzetracepoints.la

Expand Down

0 comments on commit 6997363

Please sign in to comment.