profile2linkerlist: fix perl warnings
Turn on strict checking. Simplify code by using "unless" statement. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Acked-by: WANG Cong <amwang@redhat.com> Cc: Michal Marek <mmarek@suse.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Michal Marek <mmarek@suse.cz>hifive-unleashed-5.1
parent
86d08e569f
commit
9c49fd307a
|
@ -7,15 +7,13 @@
|
||||||
# usage:
|
# usage:
|
||||||
# readprofile | sort -rn | perl profile2linkerlist.pl > functionlist
|
# readprofile | sort -rn | perl profile2linkerlist.pl > functionlist
|
||||||
#
|
#
|
||||||
|
use strict;
|
||||||
|
|
||||||
while (<>) {
|
while (<>) {
|
||||||
my $line = $_;
|
my $line = $_;
|
||||||
|
|
||||||
$_ =~ /\W*[0-9]+\W*([a-zA-Z\_0-9]+)\W*[0-9]+/;
|
$_ =~ /\W*[0-9]+\W*([a-zA-Z\_0-9]+)\W*[0-9]+/;
|
||||||
|
|
||||||
if ( ($line =~ /unknown/) || ($line =~ /total/)) {
|
print "*(.text.$1)\n"
|
||||||
|
unless ($line =~ /unknown/) || ($line =~ /total/);
|
||||||
} else {
|
|
||||||
print "*(.text.$1)\n";
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue