From 66b4e737094ca5c9dd5c4038b6d8612a5db71446 Mon Sep 17 00:00:00 2001 From: Florian Sattler Date: Fri, 20 Oct 2023 14:01:29 +0200 Subject: [PATCH] Fixes threshold handling for feature experiments --- varats/varats/experiments/vara/feature_experiment.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/varats/varats/experiments/vara/feature_experiment.py b/varats/varats/experiments/vara/feature_experiment.py index fd4ce236e..a4cc8722d 100644 --- a/varats/varats/experiments/vara/feature_experiment.py +++ b/varats/varats/experiments/vara/feature_experiment.py @@ -17,6 +17,7 @@ Compile, Clean, ) +from benchbuild.utils.requirements import Requirement, SlurmMem from plumbum import local from varats.experiment.experiment_util import ( @@ -72,6 +73,8 @@ class FeatureExperiment(VersionExperiment, shorthand=""): REPORT_SPEC = ReportSpecification() + REQUIREMENTS: tp.List[Requirement] = [SlurmMem("250G")] + @abstractmethod def actions_for_project(self, project: VProject) -> tp.MutableSequence[Step]: @@ -180,18 +183,23 @@ def get_vara_tracing_cflags( Returns: list of tracing specific cflags """ c_flags = [] + if instr_type != FeatureInstrType.NONE: c_flags += ["-fsanitize=vara", f"-fvara-instr={instr_type.value}"] + c_flags += [ "-flto", "-fuse-ld=lld", "-flegacy-pass-manager", "-fno-omit-frame-pointer" ] - if instruction_threshold is not None: + + if instruction_threshold is None: # For test projects, do not exclude small regions if project is not None and project.domain == ProjectDomains.TEST: instruction_threshold = 1 + if instruction_threshold is not None: c_flags += [f"-fvara-instruction-threshold={instruction_threshold}"] + if save_temps: c_flags += ["-Wl,-plugin-opt=save-temps"] @@ -230,7 +238,7 @@ def __call__(self) -> StepResult: def __str__(self, indent: int = 0) -> str: return textwrap.indent( - f"* {self.project.name}: Run instrumentation verifier", indent * " " + f"* {self.project.name}: Run instrumented code", indent * " " ) def run_traced_code(self) -> StepResult: