From c47706563c9a25606e6750891744bcc9b3d23f16 Mon Sep 17 00:00:00 2001 From: Lukas Abelt Date: Fri, 19 Apr 2024 16:49:10 +0200 Subject: [PATCH 1/5] * Fix threshold for PicoSAT --- varats/varats/experiments/vara/feature_perf_precision.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/varats/varats/experiments/vara/feature_perf_precision.py b/varats/varats/experiments/vara/feature_perf_precision.py index 52a01ff3a..93887ab20 100644 --- a/varats/varats/experiments/vara/feature_perf_precision.py +++ b/varats/varats/experiments/vara/feature_perf_precision.py @@ -99,14 +99,14 @@ def get_threshold(project: VProject) -> int: if project.DOMAIN is ProjectDomains.TEST: if project.name in [ "SynthSAFieldSensitivity", "SynthIPRuntime", "SynthIPTemplate", - "SynthIPTemplate2", "SynthIPCombined", "PicoSATLoadTime" + "SynthIPTemplate2", "SynthIPCombined" ]: # Don't instrument everything for these synthetic projects return 10 return 0 - if project.name in ["HyTeg"]: + if project.name in ["HyTeg", "PicoSATLoadTime"]: return 0 return 100 From 0a92d8aa64fd3453d36b6d52f8d3679f532ec469 Mon Sep 17 00:00:00 2001 From: Lukas Abelt Date: Fri, 19 Apr 2024 16:49:55 +0200 Subject: [PATCH 2/5] * Add switch to select correct Dune binary depending on patch configuration --- .../vara/feature_perf_precision.py | 27 ++++++++++++++----- 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/varats/varats/experiments/vara/feature_perf_precision.py b/varats/varats/experiments/vara/feature_perf_precision.py index 93887ab20..2c02e1987 100644 --- a/varats/varats/experiments/vara/feature_perf_precision.py +++ b/varats/varats/experiments/vara/feature_perf_precision.py @@ -16,6 +16,7 @@ from plumbum import local, BG from plumbum.commands.modifiers import Future +from varats.base.configuration import PatchConfiguration from varats.data.reports.performance_influence_trace_report import ( PerfInfluenceTraceReportAggregate, ) @@ -44,7 +45,7 @@ from varats.report.report import ReportSpecification from varats.report.tef_report import TEFReportAggregate from varats.tools.research_tools.vara import VaRA -from varats.utils.config import get_current_config_id +from varats.utils.config import get_current_config_id, get_config from varats.utils.git_util import ShortCommitHash REPS = 3 @@ -77,10 +78,24 @@ def perf_prec_workload_commands( def select_project_binaries(project: VProject) -> tp.List[ProjectBinaryWrapper]: """Uniformly select the binaries that should be analyzed.""" if project.name == "DunePerfRegression": - return [ - binary for binary in project.binaries - if binary.name == "poisson_yasp_q2_3d" - ] + config = get_config(project, PatchConfiguration) + if not config: + return [] + + f_tags = {opt.value for opt in config.options()} + + grid_binary_map = { + "YaspGrid": "poisson_yasp_q2_3d", + "UGGrid": "poisson_ug_pk_2d", + "ALUGrid": "poisson_alugrid" + } + + for grid in grid_binary_map: + if grid in f_tags: + return [ + binary for binary in project.binaries + if binary.name == grid_binary_map[grid] + ] return [project.binaries[0]] @@ -343,7 +358,7 @@ def run_traced_code(self, tmp_dir: Path) -> StepResult: f"Running example {prj_command.command.label}" ) - bpf_runner = bpf_runner = self.attach_usdt_bcc( + bpf_runner = self.attach_usdt_bcc( local_tracefile_path, self.project.source_of_primary / self._binary.path From cc109e2546f59d3b4914a6537cb940a7b70afd75 Mon Sep 17 00:00:00 2001 From: Lukas Abelt Date: Fri, 19 Apr 2024 16:50:42 +0200 Subject: [PATCH 3/5] * Add EBPF profiler to precision table --- varats/varats/tables/feature_perf_precision.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/varats/varats/tables/feature_perf_precision.py b/varats/varats/tables/feature_perf_precision.py index 212765368..d1b2b4453 100644 --- a/varats/varats/tables/feature_perf_precision.py +++ b/varats/varats/tables/feature_perf_precision.py @@ -169,7 +169,7 @@ def _prepare_data_table( def tabulate(self, table_format: TableFormat, wrap_table: bool) -> str: """Setup performance precision table.""" case_studies = get_loaded_paper_config().get_all_case_studies() - profilers: tp.List[Profiler] = [VXray(), PIMTracer()] + profilers: tp.List[Profiler] = [VXray(), PIMTracer(), EbpfTraceTEF()] # Data aggregation df = self._prepare_data_table(case_studies, profilers) From f6b98797336ca3ef3188b4c86dde52e0d361bf26 Mon Sep 17 00:00:00 2001 From: Lukas Abelt Date: Mon, 22 Apr 2024 09:11:08 +0200 Subject: [PATCH 4/5] * Pylint adjustments --- varats/varats/experiments/vara/feature_perf_precision.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/varats/varats/experiments/vara/feature_perf_precision.py b/varats/varats/experiments/vara/feature_perf_precision.py index 2c02e1987..73c6bd220 100644 --- a/varats/varats/experiments/vara/feature_perf_precision.py +++ b/varats/varats/experiments/vara/feature_perf_precision.py @@ -90,7 +90,7 @@ def select_project_binaries(project: VProject) -> tp.List[ProjectBinaryWrapper]: "ALUGrid": "poisson_alugrid" } - for grid in grid_binary_map: + for grid, _ in grid_binary_map.items(): if grid in f_tags: return [ binary for binary in project.binaries From 4994f06b0635b4bff8d71025eacd931f68c6f84a Mon Sep 17 00:00:00 2001 From: Lukas Abelt Date: Mon, 22 Apr 2024 09:22:50 +0200 Subject: [PATCH 5/5] * Pylint adjustments --- varats/varats/experiments/vara/feature_perf_precision.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/varats/varats/experiments/vara/feature_perf_precision.py b/varats/varats/experiments/vara/feature_perf_precision.py index 73c6bd220..185931615 100644 --- a/varats/varats/experiments/vara/feature_perf_precision.py +++ b/varats/varats/experiments/vara/feature_perf_precision.py @@ -90,11 +90,11 @@ def select_project_binaries(project: VProject) -> tp.List[ProjectBinaryWrapper]: "ALUGrid": "poisson_alugrid" } - for grid, _ in grid_binary_map.items(): + for grid, binary_name in grid_binary_map.items(): if grid in f_tags: return [ binary for binary in project.binaries - if binary.name == grid_binary_map[grid] + if binary.name == binary_name ] return [project.binaries[0]]