From a769f53472a159223f5587d8f81a50e68dfe03f5 Mon Sep 17 00:00:00 2001 From: Christoph Urlacher Date: Mon, 31 Aug 2026 21:04:48 +0200 Subject: [PATCH] Add resultsdata query without "de-pruning" --- scripts/Queries/ResultsDataPruned.pm | 58 ++++++++++++++++++++++++++++ scripts/menu.pl | 6 +++ 2 files changed, 64 insertions(+) create mode 100644 scripts/Queries/ResultsDataPruned.pm diff --git a/scripts/Queries/ResultsDataPruned.pm b/scripts/Queries/ResultsDataPruned.pm new file mode 100644 index 0000000..28a20c0 --- /dev/null +++ b/scripts/Queries/ResultsDataPruned.pm @@ -0,0 +1,58 @@ +package ResultsDataPruned; + +use strict; +use warnings; +use diagnostics; + +use FindBin; +use lib "$FindBin::Bin/../Modules"; +use Filters; + +use feature 'say'; + +sub query { + my ( $experiment, $experiment_dir, @filter_config_names ) = @_; + + my $extra = + Filters::build_filter_clause( $experiment_dir, @filter_config_names ); + + # This query basically asks: How many equivalence classes + # ended up in each possible outcome? + # In contrast to ResultsData.pm it doesn't do any "de-pruning", e.g. + # no expansion of the "data liveness interval length" + # SUM(t.time2 - t.time1 + 1). + # + # We run with --inject-single-bit, so the bits of one class can + # end up in different outcomes. + # This would be counted multiple times, + # so we'll have more results than pilots. + # + # The column is named "faults" so the charts still work with this. + my $querystring = "SELECT +benchmark, resulttype, COUNT(DISTINCT g.pilot_id) AS faults +FROM variant v +JOIN trace t ON v.id = t.variant_id +JOIN fspgroup g ON g.variant_id = t.variant_id AND g.instr2 = t.instr2 AND g.data_physical_address = t.data_physical_address +JOIN result_GenericExperimentMessage r ON r.pilot_id = g.pilot_id +JOIN fsppilot p ON r.pilot_id = p.id +WHERE v.variant = '$experiment'$extra +GROUP BY v.id, resulttype +ORDER BY variant, benchmark, resulttype;"; + + say $querystring; + + return $querystring; +} + +sub args { return "--batch --raw"; } + +sub filename { + my @filter_config_names = grep { defined && length } @_; + my $suffix = + @filter_config_names ? "_" . join( "+", sort @filter_config_names ) : ""; + return "resultsdata_pruned${suffix}.csv"; +} + +sub postprocess { $_[0] =~ s/\t/,/g; } + +1; diff --git a/scripts/menu.pl b/scripts/menu.pl index ced09b6..424fe48 100644 --- a/scripts/menu.pl +++ b/scripts/menu.pl @@ -95,6 +95,9 @@ my %handlers = ( ResultsData => 'Faults summary per benchmark with resulttype (resultsdata.csv)', + ResultsDataPruned => +'Faults summary per benchmark with resulttype, using the pruned data without expansion (resultsdata_pruned.csv)', + TargetClass => 'Faults by code type with data type (stack/heap/bss/...) and resulttype -> targetclass.csv', @@ -662,6 +665,9 @@ my %handlers = ( combined_fault_probability => 'marker probability per fault space (resultsdata.csv [+ traceweight.csv]).', + combined_fault_probability_merged => +'marker probability per fault space, ip/mem/regs merged (resultsdata.csv).', + combined_fault_rates_per_instruction => 'faults normalised by instruction count (faults.csv + mnemonics.csv).',