swh:1:snp:c2847dfd741eae21606027cf29250d1ebcd63fb4
Raw File
Tip revision: 39403865d2e4590802553370a56c9ab93131e4ee authored by Linus Torvalds on 13 May 2007, 01:45:56 UTC
Linux 2.6.22-rc1
Tip revision: 3940386
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