swh:1:snp:13806c77fd4b7f42b1e985e730bd615fd52cfac1
Raw File
Tip revision: 012abeea669ea49636cf952d13298bb68654146a authored by Linus Torvalds on 16 October 2009, 00:41:50 UTC
Linux 2.6.32-rc5
Tip revision: 012abee
profile2linkerlist.pl
#!/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
#

while (<>) {
  my $line = $_;

  $_ =~ /\W*[0-9]+\W*([a-zA-Z\_0-9]+)\W*[0-9]+/;

  if ( ($line =~ /unknown/) || ($line =~ /total/)) {

  } else {
    print "*(.text.$1)\n";
  }
}
back to top