filter markers by default in explorer

This commit is contained in:
2026-04-21 12:21:15 +02:00
parent 51fb2ef4d4
commit ed0a3b67de

View File

@ -23,8 +23,8 @@ my $local_archive_dir = "$local_root/injections";
# Select experiment to open
my @experiments = Util::find_subdirs($local_archive_dir);
my @selected_experiments =
TUI::select_from_list( "Select Archived Experiments to Delete",
0, @experiments );
TUI::select_from_list( "Select Archived Experiment to Open", 0,
@experiments );
die "No experiment selected" unless @selected_experiments;
my $selected_experiment = $selected_experiments[0];
@ -60,7 +60,7 @@ my @selected_benchs = @benchs;
my %index_of_benchs;
@index_of_benchs{@benchs} = 0 .. $#benchs;
my @selected_markers = @markers;
my @selected_markers = ("FAIL_MARKER");
my %index_of_markers;
@index_of_markers{@markers} = 0 .. $#markers;
@ -118,6 +118,7 @@ sub filter_marker_values {
# How much to disassemble around the address / how many lines to show
my $region_size = $cui->height() / 2 - 2;
my $asm_region_size = $region_size + 120;
my %assembly_cache;
@ -167,8 +168,8 @@ sub load_assembly_elf {
if ( !exists $assembly_cache{$address} ) {
my $file = "$local_archive_dir/$selected_experiment/system.elf";
my $start = $address - $region_size - 120;
my $end = $address + $region_size + 120;
my $start = $address - $asm_region_size;
my $end = $address + $asm_region_size;
my $objdump_address = lc substr( $marker->{fault_address}, 2 );
@ -261,16 +262,18 @@ sub load_source_c {
my $line = $lines[1]; # Ignore possible further lines
my ( $sourcefile, $lineno ) = split ":", $line;
($lineno) = $lineno =~ /^(\d+)/;
$sourcefile = remap_source_path($sourcefile);
my $remapped = remap_source_path($sourcefile);
my $source_region = read_source_file( $sourcefile, $lineno );
my $source_region = read_source_file( $remapped, $lineno );
if ( !defined $source_region or length($source_region) == 0 ) {
$source_text = "Failed to Read Source: $sourcefile:$lineno";
$source_text = "Failed to Read Source: $location";
$source_file = "Unknown";
$source_line = "Unknown";
return;
}
$source_cache{$address} = $source_region;
$source_file_cache{$address} = $sourcefile;
$source_file_cache{$address} = $remapped;
$source_line_cache{$address} = $lineno;
}
@ -283,7 +286,7 @@ sub load_source_c {
# UI Layout
# =============================================================================
my $win = $cui->add( 'root', 'Window' );
my $win = $cui->add( 'explorer', 'Window' );
my $left = $win->add( 'left', 'Container' ); # , -padbottom => 1,
my $middle = $win->add( 'middle', 'Container' ); # , -padbottom => 1,
@ -345,7 +348,7 @@ $win->add(
'info', 'Label',
-y => -1,
-text =>
"Space = toggle, F = filter markers, O = open source, P = open assembly, R = resize, Q = quit",
"Space = toggle, F = filter markers, S = open source, A = open assembly, R = resize, Q = quit",
);
sub set_geometry {
@ -540,7 +543,7 @@ $win->set_binding(
sub {
system( 'neovide', '--fork', $source_file, '--', "+$source_line" );
},
'o',
's',
);
my $objdump_out;
@ -581,7 +584,7 @@ $win->set_binding(
system( 'neovide', '--fork', $temp_file );
}
},
'p',
'a',
);
$win->set_binding(
@ -603,6 +606,7 @@ $win->set_binding(
# =============================================================================
load_faults_csv();
filter_marker_values();
layout_resize();
$markers_panel->focus();
@ -610,4 +614,4 @@ $refresh_panels->();
$cui->mainloop();
$cui->leave_curses();
$cui->delete('root');
$cui->delete('explorer');