Skip to content

Commit

Permalink
improve ze?
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Applencourt committed Oct 22, 2024
1 parent 1cdaf03 commit 41ee67a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 20 deletions.
12 changes: 6 additions & 6 deletions xprof/xprof.rb.in
Original file line number Diff line number Diff line change
Expand Up @@ -380,11 +380,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] + [File.join(LIBDIR,'libTracerOpenCL.so')],
%w[ze ze libze_loader] + [File.join(PKGLIBDIR,'ze','libze_loader.so')],
%w[cuda cuda libcud] + [File.join(LIBDIR,'libTracerCUDA.so')],
%w[hip hip libamdhip64] + [File.join(LIBDIR,'libTracerHIP.so')],
%w[mpi mpi libmpi] + [File.join(LIBDIR,'libTracerMPI.so')]].each do |name, bt_name, lib, libtracer|
# 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 +403,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]] << libtracer
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
19 changes: 5 additions & 14 deletions ze/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -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) \
Expand All @@ -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:
Expand Down

0 comments on commit 41ee67a

Please sign in to comment.