swh:1:snp:49cd9498d6cccc5e78252c27dcb645bcf7bf0c91
Raw File
Tip revision: 4a10c2ac2f368583138b774ca41fac4207911983 authored by Linus Torvalds on 23 September 2013, 22:41:09 UTC
Linux 3.12-rc2
Tip revision: 4a10c2a
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
#
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/);
}
back to top