Skip to content

Commit

Permalink
simplify xprof?
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Applencourt committed Oct 22, 2024
1 parent 7d3f133 commit 8377e0f
Showing 1 changed file with 6 additions and 6 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] + [File.join(PKGLIBDIR,'opencl','libTracerOpenCL.so')],
%w[ze ze libze_loader] + [File.join(PKGLIBDIR,'ze','libze_loader.so')],
%w[cuda cuda libcuda] + [File.join(PKGLIBDIR,'cuda','libcuda.so')],
%w[hip hip libamdhip64] + [File.join(PKGLIBDIR,'hip', 'libamdhip64.so')],
%w[mpi mpi libmpi] + [File.join(PKGLIBDIR,'mpi','libTracerMPI.so')]].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 +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]] << libtracer
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

0 comments on commit 8377e0f

Please sign in to comment.