Jetpack/kernel_avc/kernel-4.9/scripts/profile2linkerlist.pl
dchvs 2b47ea911d Add CTI sources
Elroy L4T r32.4.4 – JetPack 4.4.1
2021-01-25 16:30:42 -06:00

20 lines
375 B
Perl
Executable File

#!/usr/bin/perl
#
# Takes a (sorted) output of readprofile and turns it into a list suitable for
# linker scripts
#
# usage:
# readprofile | sort -rn | perl profile2linkerlist.pl > functionlist
#
use strict;
while (<>) {
my $line = $_;
$_ =~ /\W*[0-9]+\W*([a-zA-Z\_0-9]+)\W*[0-9]+/;
print "*(.text.$1)\n"
unless ($line =~ /unknown/) || ($line =~ /total/);
}