Compare commits
12 Commits
a6f33f1960
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
9ca8e88ec0
|
|||
|
be2c4b7bf2
|
|||
|
644603fb8b
|
|||
|
0dccd1df46
|
|||
|
9db4cb8bb1
|
|||
| 10fe608a90 | |||
|
2de6e20675
|
|||
|
bc98e2af5c
|
|||
|
3819e84acb
|
|||
|
6ce8987ebd
|
|||
|
6859402483
|
|||
|
32b1f3fa31
|
BIN
fail/bin/fail-x86-tracing
(Stored with Git LFS)
BIN
fail/bin/fail-x86-tracing
(Stored with Git LFS)
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
fail/bin/generic-experiment-client
(Stored with Git LFS)
BIN
fail/bin/generic-experiment-client
(Stored with Git LFS)
Binary file not shown.
BIN
fail/bin/generic-experiment-server
(Stored with Git LFS)
BIN
fail/bin/generic-experiment-server
(Stored with Git LFS)
Binary file not shown.
BIN
fail/bin/import-trace
(Stored with Git LFS)
BIN
fail/bin/import-trace
(Stored with Git LFS)
Binary file not shown.
BIN
fail/bin/prune-trace
(Stored with Git LFS)
BIN
fail/bin/prune-trace
(Stored with Git LFS)
Binary file not shown.
@ -12,7 +12,7 @@ benchmark, resulttype, SUM(t.time2 - t.time1 + 1) AS faults,
|
|||||||
CONCAT('0x', HEX(p.injection_instr_absolute)) AS fault_address
|
CONCAT('0x', HEX(p.injection_instr_absolute)) AS fault_address
|
||||||
FROM variant v
|
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_address = t.data_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'
|
WHERE v.variant = '$experiment'
|
||||||
|
|||||||
@ -11,7 +11,7 @@ sub query {
|
|||||||
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
|
||||||
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_address = t.data_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'
|
WHERE v.variant = '$experiment'
|
||||||
|
|||||||
@ -11,7 +11,7 @@ sub query {
|
|||||||
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
|
||||||
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_address = t.data_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'
|
WHERE v.variant = '$experiment'
|
||||||
|
|||||||
@ -381,7 +381,11 @@ my %handlers = (
|
|||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|
||||||
'20. Run Build in GDB' => sub {
|
'20. Open TablePlus (Mars)' => sub {
|
||||||
|
system('tableplus');
|
||||||
|
},
|
||||||
|
|
||||||
|
'21. Run Build in GDB' => sub {
|
||||||
my @builds = grep { /linux/ } Util::find_subdirs($local_builds_dir);
|
my @builds = grep { /linux/ } Util::find_subdirs($local_builds_dir);
|
||||||
my @selected_builds =
|
my @selected_builds =
|
||||||
TUI::select_from_list( "Select Build to Run in GDB", 0, @builds );
|
TUI::select_from_list( "Select Build to Run in GDB", 0, @builds );
|
||||||
|
|||||||
@ -35,11 +35,9 @@ my $result_browser = "$fail_bin/resultbrowser.py";
|
|||||||
sub trace {
|
sub trace {
|
||||||
my ($experiment) = @_;
|
my ($experiment) = @_;
|
||||||
|
|
||||||
Util::notify("Tracing $experiment...");
|
# Util::notify("Tracing $experiment...");
|
||||||
|
|
||||||
system(
|
my $trace_command = join " ", (
|
||||||
join " ",
|
|
||||||
(
|
|
||||||
"$bochs_runner",
|
"$bochs_runner",
|
||||||
"-V $fail_share/vgabios.bin",
|
"-V $fail_share/vgabios.bin",
|
||||||
"-b $fail_share/BIOS-bochs-latest",
|
"-b $fail_share/BIOS-bochs-latest",
|
||||||
@ -53,23 +51,24 @@ sub trace {
|
|||||||
"-Wf,--end-symbol=fail_stop_trace",
|
"-Wf,--end-symbol=fail_stop_trace",
|
||||||
"-Wf,--state-file=$remote_builds_dir/$experiment/state",
|
"-Wf,--state-file=$remote_builds_dir/$experiment/state",
|
||||||
"-Wf,--trace-file=$remote_builds_dir/$experiment/trace.pb",
|
"-Wf,--trace-file=$remote_builds_dir/$experiment/trace.pb",
|
||||||
"-Wf,--elf-file=$remote_builds_dir/$experiment/system.elf"
|
"-Wf,--elf-file=$remote_builds_dir/$experiment/system.elf",
|
||||||
|
|
||||||
# "-Wf,--full-trace",
|
# "-Wf,--full-trace",
|
||||||
# "-Wf,--check-bounds",
|
# "-Wf,--check-bounds",
|
||||||
)
|
">$remote_builds_dir/$experiment/1_trace.log"
|
||||||
);
|
);
|
||||||
|
say "Trace command: $trace_command";
|
||||||
|
|
||||||
|
system($trace_command);
|
||||||
}
|
}
|
||||||
|
|
||||||
sub import_trace {
|
sub import_trace {
|
||||||
my ($experiment) = @_;
|
my ($experiment) = @_;
|
||||||
|
|
||||||
Util::notify("Importing $experiment trace...");
|
# Util::notify("Importing $experiment trace...");
|
||||||
|
|
||||||
# Benchmark: ip
|
# Benchmark: ip
|
||||||
system(
|
my $import_ip_command = join " ", (
|
||||||
join " ",
|
|
||||||
(
|
|
||||||
"$fail_import",
|
"$fail_import",
|
||||||
"--database-option-file $remote_db_conf",
|
"--database-option-file $remote_db_conf",
|
||||||
"-t $remote_builds_dir/$experiment/trace.pb",
|
"-t $remote_builds_dir/$experiment/trace.pb",
|
||||||
@ -78,13 +77,15 @@ sub import_trace {
|
|||||||
"-v $experiment",
|
"-v $experiment",
|
||||||
"-b ip",
|
"-b ip",
|
||||||
"--no-gp", # Don't inject general purpose registers
|
"--no-gp", # Don't inject general purpose registers
|
||||||
"--ip" # Inject instruction pointer
|
"--ip", # Inject instruction pointer
|
||||||
)
|
">$remote_builds_dir/$experiment/2_import_ip.log"
|
||||||
);
|
);
|
||||||
|
say "Import IP command: $import_ip_command";
|
||||||
|
|
||||||
|
system($import_ip_command);
|
||||||
|
|
||||||
# Benchmark: mem
|
# Benchmark: mem
|
||||||
system(
|
my $import_mem_command = join " ",
|
||||||
join " ",
|
|
||||||
(
|
(
|
||||||
"$fail_import",
|
"$fail_import",
|
||||||
"--database-option-file $remote_db_conf",
|
"--database-option-file $remote_db_conf",
|
||||||
@ -92,14 +93,15 @@ sub import_trace {
|
|||||||
"-i MemoryImporter",
|
"-i MemoryImporter",
|
||||||
"-e $remote_builds_dir/$experiment/system.elf",
|
"-e $remote_builds_dir/$experiment/system.elf",
|
||||||
"-v $experiment",
|
"-v $experiment",
|
||||||
"-b mem"
|
"-b mem",
|
||||||
)
|
">$remote_builds_dir/$experiment/2_import_mem.log"
|
||||||
);
|
);
|
||||||
|
say "Import MEM command: $import_mem_command";
|
||||||
|
|
||||||
|
system($import_mem_command);
|
||||||
|
|
||||||
# Benchmark: regs
|
# Benchmark: regs
|
||||||
system(
|
my $import_regs_command = join " ", (
|
||||||
join " ",
|
|
||||||
(
|
|
||||||
"$fail_import",
|
"$fail_import",
|
||||||
"--database-option-file $remote_db_conf",
|
"--database-option-file $remote_db_conf",
|
||||||
"-t $remote_builds_dir/$experiment/trace.pb",
|
"-t $remote_builds_dir/$experiment/trace.pb",
|
||||||
@ -107,76 +109,82 @@ sub import_trace {
|
|||||||
"-e $remote_builds_dir/$experiment/system.elf",
|
"-e $remote_builds_dir/$experiment/system.elf",
|
||||||
"-v $experiment",
|
"-v $experiment",
|
||||||
"-b regs",
|
"-b regs",
|
||||||
"--flags" # Inject flags register
|
"--flags", # Inject flags register
|
||||||
)
|
">$remote_builds_dir/$experiment/2_import_regs.log"
|
||||||
);
|
);
|
||||||
|
say "Import REGS command: $import_regs_command";
|
||||||
|
|
||||||
|
system($import_regs_command);
|
||||||
|
|
||||||
# Import fulltrace for VisualFAIL
|
# Import fulltrace for VisualFAIL
|
||||||
system(
|
# system(
|
||||||
join " ",
|
# join " ",
|
||||||
(
|
# (
|
||||||
"$fail_import",
|
# "$fail_import",
|
||||||
"--database-option-file $remote_db_conf",
|
# "--database-option-file $remote_db_conf",
|
||||||
"-t $remote_builds_dir/$experiment/trace.pb",
|
# "-t $remote_builds_dir/$experiment/trace.pb",
|
||||||
"-i FullTraceImporter",
|
# "-i FullTraceImporter",
|
||||||
"-e $remote_builds_dir/$experiment/system.elf",
|
# "-e $remote_builds_dir/$experiment/system.elf",
|
||||||
"-v $experiment",
|
# "-v $experiment",
|
||||||
)
|
# )
|
||||||
);
|
# );
|
||||||
|
|
||||||
# Import objdump disassembly + source files
|
# Import objdump disassembly + source files
|
||||||
system(
|
# system(
|
||||||
join " ",
|
# join " ",
|
||||||
(
|
# (
|
||||||
"$fail_import",
|
# "$fail_import",
|
||||||
"--database-option-file $remote_db_conf",
|
# "--database-option-file $remote_db_conf",
|
||||||
"-t $remote_builds_dir/$experiment/trace.pb",
|
# "-t $remote_builds_dir/$experiment/trace.pb",
|
||||||
"-i ElfImporter",
|
# "-i ElfImporter",
|
||||||
"-e $remote_builds_dir/$experiment/system.elf",
|
# "-e $remote_builds_dir/$experiment/system.elf",
|
||||||
"-v $experiment",
|
# "-v $experiment",
|
||||||
"-b ip",
|
# "-b ip",
|
||||||
"--objdump objdump",
|
# "--objdump objdump",
|
||||||
"--sources",
|
#
|
||||||
)
|
# # "--sources",
|
||||||
);
|
# )
|
||||||
system(
|
# );
|
||||||
join " ",
|
# system(
|
||||||
(
|
# join " ",
|
||||||
"$fail_import",
|
# (
|
||||||
"--database-option-file $remote_db_conf",
|
# "$fail_import",
|
||||||
"-t $remote_builds_dir/$experiment/trace.pb",
|
# "--database-option-file $remote_db_conf",
|
||||||
"-i ElfImporter",
|
# "-t $remote_builds_dir/$experiment/trace.pb",
|
||||||
"-e $remote_builds_dir/$experiment/system.elf",
|
# "-i ElfImporter",
|
||||||
"-v $experiment",
|
# "-e $remote_builds_dir/$experiment/system.elf",
|
||||||
"-b mem",
|
# "-v $experiment",
|
||||||
"--objdump objdump",
|
# "-b mem",
|
||||||
"--sources",
|
# "--objdump objdump",
|
||||||
)
|
#
|
||||||
);
|
# # "--sources",
|
||||||
system(
|
# )
|
||||||
join " ",
|
# );
|
||||||
(
|
# system(
|
||||||
"$fail_import",
|
# join " ",
|
||||||
"--database-option-file $remote_db_conf",
|
# (
|
||||||
"-t $remote_builds_dir/$experiment/trace.pb",
|
# "$fail_import",
|
||||||
"-i ElfImporter",
|
# "--database-option-file $remote_db_conf",
|
||||||
"-e $remote_builds_dir/$experiment/system.elf",
|
# "-t $remote_builds_dir/$experiment/trace.pb",
|
||||||
"-v $experiment",
|
# "-i ElfImporter",
|
||||||
"-b regs",
|
# "-e $remote_builds_dir/$experiment/system.elf",
|
||||||
"--objdump objdump",
|
# "-v $experiment",
|
||||||
"--sources",
|
# "-b regs",
|
||||||
)
|
# "--objdump objdump",
|
||||||
);
|
#
|
||||||
|
# # "--sources",
|
||||||
|
# )
|
||||||
|
# );
|
||||||
|
|
||||||
system(
|
my $prune_command = join " ",
|
||||||
join " ",
|
|
||||||
(
|
(
|
||||||
"$fail_prune",
|
"$fail_prune", "--database-option-file $remote_db_conf",
|
||||||
"--database-option-file $remote_db_conf",
|
"-v $experiment", "-b %%",
|
||||||
"-v $experiment",
|
"--overwrite", ">$remote_builds_dir/$experiment/2_prune.log"
|
||||||
"-b %%", "--overwrite"
|
|
||||||
)
|
|
||||||
);
|
);
|
||||||
|
say "Prune command: $prune_command";
|
||||||
|
|
||||||
|
system($prune_command);
|
||||||
}
|
}
|
||||||
|
|
||||||
sub inject {
|
sub inject {
|
||||||
@ -186,39 +194,18 @@ sub inject {
|
|||||||
|
|
||||||
Util::notify("Injecting $experiment using $count cores...");
|
Util::notify("Injecting $experiment using $count cores...");
|
||||||
|
|
||||||
say "Forking...";
|
my $server_command = join " ", (
|
||||||
my $pid = fork();
|
|
||||||
die "fork failed: $!" unless defined $pid;
|
|
||||||
|
|
||||||
if ( $pid == 0 ) {
|
|
||||||
|
|
||||||
# child -> server
|
|
||||||
|
|
||||||
say "Running server in child process...";
|
|
||||||
exec(
|
|
||||||
join " ",
|
|
||||||
(
|
|
||||||
"$fail_server",
|
"$fail_server",
|
||||||
"--port $fail_server_port",
|
|
||||||
"--database-option-file $remote_db_conf",
|
|
||||||
"-v $experiment",
|
|
||||||
"-b %",
|
|
||||||
"--inject-single-bit",
|
|
||||||
"--inject-registers"
|
|
||||||
)
|
|
||||||
) == 0 or die "exec server failed: $!";
|
|
||||||
}
|
|
||||||
|
|
||||||
# parent -> client
|
# "--port $fail_server_port",
|
||||||
|
"--database-option-file $remote_db_conf", "-v $experiment",
|
||||||
|
"-b %", "--inject-single-bit",
|
||||||
|
"--inject-registers",
|
||||||
|
">$remote_builds_dir/$experiment/3_server.log"
|
||||||
|
);
|
||||||
|
say "Server command: $server_command";
|
||||||
|
|
||||||
say "Waiting for server...";
|
my $client_command = join " ", (
|
||||||
sleep(10);
|
|
||||||
|
|
||||||
say "Running client with $count cores in parent process";
|
|
||||||
|
|
||||||
system(
|
|
||||||
join " ",
|
|
||||||
(
|
|
||||||
"nice $bochs_runner",
|
"nice $bochs_runner",
|
||||||
"-V $fail_share/vgabios.bin",
|
"-V $fail_share/vgabios.bin",
|
||||||
"-b $fail_share/BIOS-bochs-latest",
|
"-b $fail_share/BIOS-bochs-latest",
|
||||||
@ -227,7 +214,8 @@ sub inject {
|
|||||||
"-i $remote_builds_dir/$experiment/system.iso",
|
"-i $remote_builds_dir/$experiment/system.iso",
|
||||||
"-j $count",
|
"-j $count",
|
||||||
"--",
|
"--",
|
||||||
"-Wf,--server-port=$fail_server_port",
|
|
||||||
|
# "-Wf,--server-port=$fail_server_port",
|
||||||
"-Wf,--state-dir=$remote_builds_dir/$experiment/state",
|
"-Wf,--state-dir=$remote_builds_dir/$experiment/state",
|
||||||
"-Wf,--trap",
|
"-Wf,--trap",
|
||||||
"-Wf,--catch-outerspace",
|
"-Wf,--catch-outerspace",
|
||||||
@ -236,9 +224,30 @@ sub inject {
|
|||||||
"-Wf,--ok-marker=fail_marker_positive",
|
"-Wf,--ok-marker=fail_marker_positive",
|
||||||
"-Wf,--fail-marker=fail_marker_negative",
|
"-Wf,--fail-marker=fail_marker_negative",
|
||||||
"-Wf,--detected-marker=fail_marker_detected",
|
"-Wf,--detected-marker=fail_marker_detected",
|
||||||
|
|
||||||
">/dev/null"
|
">/dev/null"
|
||||||
)
|
|
||||||
) == 0 or die "client failed: $?";
|
# ">$remote_builds_dir/$experiment/4_client.log"
|
||||||
|
);
|
||||||
|
say "Client command: $client_command";
|
||||||
|
|
||||||
|
say "Forking...";
|
||||||
|
my $pid = fork();
|
||||||
|
die "fork failed: $!" unless defined $pid;
|
||||||
|
|
||||||
|
if ( $pid == 0 ) {
|
||||||
|
|
||||||
|
# child -> server
|
||||||
|
say "Running server in child process...";
|
||||||
|
exec($server_command) == 0 or die "exec server failed: $!";
|
||||||
|
}
|
||||||
|
|
||||||
|
# parent -> client
|
||||||
|
say "Waiting for server...";
|
||||||
|
sleep(10);
|
||||||
|
|
||||||
|
say "Running client with $count cores in parent process";
|
||||||
|
system($client_command) == 0 or die "client failed: $?";
|
||||||
|
|
||||||
say "Killing server with pid $pid...";
|
say "Killing server with pid $pid...";
|
||||||
kill 'TERM', $pid;
|
kill 'TERM', $pid;
|
||||||
|
|||||||
Reference in New Issue
Block a user