Staging
v0.5.1
https://github.com/torvalds/linux
Raw File
Tip revision: 802eee95bde72fd0cd0f3a5b2098375a487d1eda authored by Linus Torvalds on 30 December 2013, 00:01:33 UTC
Linux 3.13-rc6
Tip revision: 802eee9
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