swh:1:snp:3c665ee4f67729f27f2e40193ab88e7298cf0fef
Raw File
Tip revision: 9fa7eb283c5cdc2b0f4a8cfe6387ed82e5e9a3d3 authored by Linus Torvalds on 03 June 2009, 03:07:25 UTC
Linux 2.6.30-rc8
Tip revision: 9fa7eb2
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