extrae: Update dyninst dependency (#47359)
This commit is contained in:
parent
42fd1cafe6
commit
37de92e7a2
@ -0,0 +1,19 @@
|
||||
diff --git a/src/launcher/dyninst/commonSnippets.C b/src/launcher/dyninst/commonSnippets.C
|
||||
index 94904a23..2f918949 100644
|
||||
--- a/src/launcher/dyninst/commonSnippets.C
|
||||
+++ b/src/launcher/dyninst/commonSnippets.C
|
||||
@@ -482,9 +482,10 @@ string decodeBasicBlocks(BPatch_function * function, string routine)
|
||||
ParseAPI::Block* b = ParseAPI::convert(block);
|
||||
void * buf = b->region()->getPtrToInstruction(b->start());
|
||||
InstructionAPI::InstructionDecoder dec((unsigned char*)buf,b->size(),b->region()->getArch());
|
||||
- InstructionAPI::Instruction::Ptr insn;
|
||||
- while((insn = dec.decode())) {
|
||||
- res <<loop_name<<"# "<<line++<<": "<< insn->format() << endl;
|
||||
+ InstructionAPI::Instruction insn = dec.decode();
|
||||
+ while(insn.isValid()) {
|
||||
+ res <<loop_name<<"# "<<line++<<": "<< insn.format() << endl;
|
||||
+ insn = dec.decode();
|
||||
}
|
||||
}
|
||||
return res.str();
|
||||
|
@ -16,6 +16,8 @@
|
||||
# --with-papi=/usr
|
||||
# --with-dwarf=/usr
|
||||
# --with-elf=/usr
|
||||
# --with-elfutils=/usr
|
||||
# --with-tbb=/usr
|
||||
# --with-dyninst=/usr
|
||||
# --with-binutils=/usr
|
||||
# --with-xml-prefix=/usr
|
||||
@ -88,7 +90,10 @@ class Extrae(AutotoolsPackage):
|
||||
build_directory = "spack-build"
|
||||
|
||||
variant("dyninst", default=False, description="Use dyninst for dynamic code installation")
|
||||
depends_on("dyninst@:9", when="+dyninst")
|
||||
with when("+dyninst"):
|
||||
depends_on("dyninst@10.1.0:")
|
||||
depends_on("elfutils", when="@4.1.2:")
|
||||
depends_on("intel-oneapi-tbb", when="@4.1.2:")
|
||||
|
||||
variant("papi", default=True, description="Use PAPI to collect performance counters")
|
||||
depends_on("papi", when="+papi")
|
||||
@ -106,6 +111,12 @@ class Extrae(AutotoolsPackage):
|
||||
description="Enable single MPI instrumentation library that supports both Fortran and C",
|
||||
)
|
||||
|
||||
patch(
|
||||
"dyninst_instruction.patch",
|
||||
when="@:4.0.6 +dyninst",
|
||||
sha256="c1df1627b51b9d0f38711aee50ff11f30ffc34c43e520c39118157e9c31a927e",
|
||||
)
|
||||
|
||||
def configure_args(self):
|
||||
spec = self.spec
|
||||
if spec.satisfies("^[virtuals=mpi] intel-oneapi-mpi"):
|
||||
@ -129,11 +140,16 @@ def configure_args(self):
|
||||
else ["--without-papi"]
|
||||
)
|
||||
|
||||
args += (
|
||||
["--with-dyninst=%s" % spec["dyninst"].prefix]
|
||||
if spec.satisfies("+dyninst")
|
||||
else ["--without-dyninst"]
|
||||
)
|
||||
if spec.satisfies("+dyninst"):
|
||||
args += ["--with-dyninst={spec['dyninst'].prefix}"]
|
||||
|
||||
if spec.satisfies("@4.1.2:"):
|
||||
args += [
|
||||
f"--with-elfutils={spec['elfutils'].prefix}",
|
||||
f"--with-tbb={spec['tbb'].prefix}",
|
||||
]
|
||||
else:
|
||||
args += ["--without-dyninst"]
|
||||
|
||||
args += (
|
||||
["--with-cuda=%s" % spec["cuda"].prefix]
|
||||
@ -147,7 +163,7 @@ def configure_args(self):
|
||||
|
||||
args += ["--with-cupti=%s" % cupti_dir] if "+cupti" in spec else ["--without-cupti"]
|
||||
|
||||
if spec.satisfies("^dyninst@9.3.0:"):
|
||||
if spec.satisfies("+dyninst"):
|
||||
make.add_default_arg("CXXFLAGS=%s" % self.compiler.cxx11_flag)
|
||||
args.append("CXXFLAGS=%s" % self.compiler.cxx11_flag)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user