Compare commits

..
6 Commits
9 changed files with 42 additions and 38 deletions
+1 -1
View File
@@ -30,7 +30,7 @@ JOIN fspgroup g ON g.variant_id = t.variant_id AND g.instr2 = t.instr2 AND g.dat
JOIN result_GenericExperimentMessage r ON r.pilot_id = g.pilot_id JOIN result_GenericExperimentMessage r ON r.pilot_id = g.pilot_id
JOIN fsppilot p ON r.pilot_id = p.id JOIN fsppilot p ON r.pilot_id = p.id
LEFT JOIN objdump o ON o.variant_id = v.id AND o.instr_address = p.injection_instr_absolute LEFT JOIN objdump o ON o.variant_id = v.id AND o.instr_address = p.injection_instr_absolute
WHERE v.variant = '$experiment'$filters WHERE t.accesstype = 'R' AND v.variant = '$experiment'$filters
GROUP BY benchmark, resulttype, p.injection_instr_absolute GROUP BY benchmark, resulttype, p.injection_instr_absolute
ORDER BY benchmark, resulttype, SUM(t.time2 - t.time1 + 1) DESC;"; ORDER BY benchmark, resulttype, SUM(t.time2 - t.time1 + 1) DESC;";
+1 -1
View File
@@ -36,7 +36,7 @@ COUNT(DISTINCT t.instr2, t.data_physical_address) AS count
FROM variant v FROM variant v
JOIN trace t ON v.id = t.variant_id$filter_joins JOIN trace t ON v.id = t.variant_id$filter_joins
JOIN objdump o ON o.variant_id = v.id AND o.instr_address = t.instr2_absolute JOIN objdump o ON o.variant_id = v.id AND o.instr_address = t.instr2_absolute
WHERE v.variant = '$experiment'$filters WHERE t.accesstype = 'R' AND v.variant = '$experiment'$filters
GROUP BY mnemonic GROUP BY mnemonic
ORDER BY count DESC;"; ORDER BY count DESC;";
+1 -1
View File
@@ -23,7 +23,7 @@ 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 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 result_GenericExperimentMessage r ON r.pilot_id = g.pilot_id
JOIN fsppilot p ON r.pilot_id = p.id JOIN fsppilot p ON r.pilot_id = p.id
WHERE v.variant = '$experiment'$extra WHERE t.accesstype = 'R' AND v.variant = '$experiment'$extra
GROUP BY v.id, resulttype GROUP BY v.id, resulttype
ORDER BY variant, benchmark, resulttype;"; ORDER BY variant, benchmark, resulttype;";
+7 -1
View File
@@ -25,6 +25,12 @@ sub query {
# the number of injected bits. # the number of injected bits.
# For a single byte pilot (e.g., uint8 variable), the faultspace area # For a single byte pilot (e.g., uint8 variable), the faultspace area
# would be inflated by x8 (8 possible bits to inject). # would be inflated by x8 (8 possible bits to inject).
#
# This is the inject-on-read model: only reads are injected (write
# faults are covered by equivalence, because a write fault only
# materializes if the value is read afterwards), so the write rows in
# the trace (and the single write row in fspgroup that BasicPruner.cc
# inserts) are excluded.
my $querystring = "SELECT my $querystring = "SELECT
benchmark, resulttype, SUM(t.time2 - t.time1 + 1) AS faults benchmark, resulttype, SUM(t.time2 - t.time1 + 1) AS faults
FROM variant v FROM variant v
@@ -32,7 +38,7 @@ 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 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 result_GenericExperimentMessage r ON r.pilot_id = g.pilot_id
JOIN fsppilot p ON r.pilot_id = p.id JOIN fsppilot p ON r.pilot_id = p.id
WHERE v.variant = '$experiment'$extra WHERE t.accesstype = 'R' AND v.variant = '$experiment'$extra
GROUP BY v.id, resulttype GROUP BY v.id, resulttype
ORDER BY variant, benchmark, resulttype;"; ORDER BY variant, benchmark, resulttype;";
+24 -27
View File
@@ -16,27 +16,25 @@ sub query {
my $extra = my $extra =
Filters::build_filter_clause( $experiment_dir, @filter_config_names ); Filters::build_filter_clause( $experiment_dir, @filter_config_names );
# The write branch applies the data filters on the trace and the # Filters are applied per column because of the disjunct branch union
# instruction filters on the pilot, so the clause is built per column.
my $data_extra = my $data_extra =
Filters::build_filter_clause_restricted( $experiment_dir, qr/^g\./, Filters::build_filter_clause_restricted( $experiment_dir, qr/^g\./,
@filter_config_names ); @filter_config_names );
my $instr_extra = my $instr_extra =
Filters::build_filter_clause_restricted( $experiment_dir, qr/^p\./, Filters::build_filter_clause_restricted( $experiment_dir, qr/^p\./,
@filter_config_names ); @filter_config_names );
$instr_extra =~ s/\bp\.injection_instr_absolute\b/g.instr2_absolute/g;
# This is the same as ResultsData.pm (how much faultspace # This is the same as ResultsData.pm (how much faultspace
# area ended up in each possible outcome), but applies the # area ended up in each possible outcome), but includes the
# possible writegroups fix. # "inject-on-write" fault model like in global-occurrences-onwrite.sh
# #
# At first I have written this query similar to ResultsData.pm, with # A fault in a written value is treated as a fault in the next access to
# an inner join to reconstruct the "fixed" fspgroup table within the query. # the same address. Only a read consumes the value, if it is overwritten
# This was extremely slow since it resulted in a large cross product # first, the write is skipped.
# between the write groups/classes and the write pilots injections
# (also I don't think the indices were helping the way I wrote the query).
# #
# This version now constructs the result in two # FAIL weights the write area by SUM(t.width), this query uses
# disjunct branches (as the data is disjunct in known_outcome = 0/1). # (g.time2 - g.time1 + 1) instead.
my $resulttype_order = my $resulttype_order =
"FIELD(resulttype, 'OK_MARKER', 'FAIL_MARKER', 'DETECTED_MARKER'," "FIELD(resulttype, 'OK_MARKER', 'FAIL_MARKER', 'DETECTED_MARKER',"
. " 'GROUP1_MARKER', 'GROUP2_MARKER', 'GROUP3_MARKER', 'GROUP4_MARKER'," . " 'GROUP1_MARKER', 'GROUP2_MARKER', 'GROUP3_MARKER', 'GROUP4_MARKER',"
@@ -68,22 +66,21 @@ FROM (
UNION ALL UNION ALL
SELECT v.benchmark AS benchmark, rc.resulttype AS resulttype, wl.len * rc.cnt AS faults SELECT v.benchmark AS benchmark, r.resulttype AS resulttype,
FROM variant v SUM(g.time2 - g.time1 + 1) AS faults
JOIN ( FROM trace g
SELECT g.variant_id, SUM(g.time2 - g.time1 + 1) AS len JOIN variant v ON v.id = g.variant_id
FROM trace g JOIN trace t ON t.variant_id = g.variant_id
WHERE g.accesstype = 'W'$data_extra AND t.data_physical_address = g.data_physical_address
GROUP BY g.variant_id AND t.instr1 = g.instr2 + 1
) wl ON wl.variant_id = v.id AND t.accesstype = 'R'
JOIN ( JOIN fspgroup h ON h.variant_id = t.variant_id
SELECT p.variant_id, r.resulttype, COUNT(*) AS cnt AND h.data_physical_address = t.data_physical_address
FROM fsppilot p AND h.instr2 = t.instr2
JOIN result_GenericExperimentMessage r ON r.pilot_id = p.id AND h.fspmethod_id = (SELECT id FROM fspmethod WHERE method = 'basic')
WHERE p.known_outcome = 1$instr_extra JOIN result_GenericExperimentMessage r ON r.pilot_id = h.pilot_id
GROUP BY p.variant_id, r.resulttype WHERE g.accesstype = 'W'
) rc ON rc.variant_id = v.id AND v.variant = '$experiment'$data_extra$instr_extra
WHERE v.variant = '$experiment'
) x ) x
GROUP BY benchmark, resulttype GROUP BY benchmark, resulttype
ORDER BY benchmark, $resulttype_order;"; ORDER BY benchmark, $resulttype_order;";
+1 -1
View File
@@ -46,7 +46,7 @@ FROM variant v
JOIN trace t ON v.id = t.variant_id 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 fspgroup g ON g.variant_id = t.variant_id AND g.instr2 = t.instr2 AND g.data_physical_address = t.data_physical_address
JOIN fsppilot p ON p.id = g.pilot_id JOIN fsppilot p ON p.id = g.pilot_id
WHERE v.variant = '$experiment'$extra WHERE t.accesstype = 'R' AND v.variant = '$experiment'$extra
GROUP BY v.id, benchmark GROUP BY v.id, benchmark
ORDER BY variant, benchmark;"; ORDER BY variant, benchmark;";
+1 -1
View File
@@ -89,7 +89,7 @@ my %handlers = (
'Faults by benchmark, resulttype and fault address with mnemonic (faults.csv)', 'Faults by benchmark, resulttype and fault address with mnemonic (faults.csv)',
Mnemonics => Mnemonics =>
'Instruction count per mnemonic across the whole trace (mnemonics.csv)', 'Instruction count per mnemonic across read equivalence classes (mnemonics.csv)',
RegionMarker => RegionMarker =>
'Faults by code region with resulttype (regionmarker.csv)', 'Faults by code region with resulttype (regionmarker.csv)',
@@ -81,10 +81,11 @@ countnegative_initialize(matrix Array) {
register int OuterIndex, InnerIndex; register int OuterIndex, InnerIndex;
__pragma_loopbound(20, 20); __pragma_loopbound(20, 20);
for (OuterIndex = 0; OuterIndex < MAXSIZE; OuterIndex++) for (OuterIndex = 0; OuterIndex < MAXSIZE; OuterIndex++) {
__pragma_loopbound(20, 20); __pragma_loopbound(20, 20);
for (InnerIndex = 0; InnerIndex < MAXSIZE; InnerIndex++) for (InnerIndex = 0; InnerIndex < MAXSIZE; InnerIndex++)
Array[OuterIndex][InnerIndex] = countnegative_randomInteger(); Array[OuterIndex][InnerIndex] = countnegative_randomInteger();
}
} }
void void
@@ -98,7 +99,7 @@ countnegative_return(void) {
int checksum = (countnegative_postotal + countnegative_poscnt + int checksum = (countnegative_postotal + countnegative_poscnt +
countnegative_negtotal + countnegative_negcnt); countnegative_negtotal + countnegative_negcnt);
return ((checksum == (int) 0x1778de) ? 0 : -1); return ((checksum == (int) 0x3edcf) ? 0 : -1);
} }
void void
@@ -126,7 +126,7 @@ matrix1_return(void) {
for (i = 0; i < X * Z; i++) for (i = 0; i < X * Z; i++)
checksum += matrix1_C[i]; checksum += matrix1_C[i];
return (checksum == 1000 ? 0 : -1); return (checksum == 125 ? 0 : -1);
} }
/* /*