mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-25 00:50:54 +07:00
06ed5c2bfa
The Makefiles call the respective interpreter explicitly, but this makes it easier to use the scripts manually. Signed-off-by: Michal Marek <mmarek@suse.cz>
20 lines
375 B
Perl
Executable File
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/);
|
|
}
|