display corresponding section for markers in explorer
This commit is contained in:
@ -75,7 +75,6 @@ my %index_of_markers;
|
||||
|
||||
my $selected_threshold = 0;
|
||||
|
||||
# TODO: Display the segment the addresses belong to
|
||||
sub load_faults_csv {
|
||||
@marker_values = ();
|
||||
%marker_labels = ();
|
||||
@ -86,11 +85,8 @@ sub load_faults_csv {
|
||||
headers => 'auto'
|
||||
);
|
||||
|
||||
sub format_number_sep {
|
||||
my ($number) = @_;
|
||||
1 while $number =~ s/^(-?\d+)(\d{3})/$1.$2/;
|
||||
return $number;
|
||||
}
|
||||
my @sections = Util::elf_read_sections(
|
||||
"$local_archive_dir/$selected_experiment/system.elf");
|
||||
|
||||
# Result:
|
||||
# [ { benchmark => "ip", resulttype => "OK_MARKER",
|
||||
@ -101,9 +97,12 @@ sub load_faults_csv {
|
||||
%marker_labels =
|
||||
map {
|
||||
$_ => sprintf(
|
||||
"%5s %10s %20s %15sx",
|
||||
$_->{benchmark}, $_->{fault_address},
|
||||
$_->{resulttype}, format_number_sep( $_->{faults} ),
|
||||
"%5s %10s %10s %20s %15sx",
|
||||
$_->{benchmark},
|
||||
$_->{fault_address},
|
||||
Util::get_section_name( $_->{fault_address}, @sections ),
|
||||
$_->{resulttype},
|
||||
Util::format_number_sep( $_->{faults} ),
|
||||
);
|
||||
} @marker_values;
|
||||
}
|
||||
@ -379,8 +378,8 @@ sub layout_resize {
|
||||
my $w = $win->width();
|
||||
my $h = $win->height();
|
||||
|
||||
my $w1 = int( $w * 0.2 );
|
||||
my $w2 = int( $w * 0.4 );
|
||||
my $w1 = int( $w * 0.3 );
|
||||
my $w2 = int( $w * 0.3 );
|
||||
my $w3 = int( $w - $w1 - $w2 );
|
||||
|
||||
set_geometry( $left, 0, 1, $w1, $h - 2 );
|
||||
|
||||
Reference in New Issue
Block a user