Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 199547
b: refs/heads/master
c: 1f2a144
h: refs/heads/master
i:
  199545: 5d6db9a
  199543: 698540d
v: v3
  • Loading branch information
Stephen Hemminger authored and Michal Marek committed Mar 7, 2010
1 parent 4b63b57 commit 6f7ae1c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b59a12258460b3d019918719b1bd2563cf37ad9a
refs/heads/master: 1f2a144f5ab5e836b5ca8f67bd76b759fa947751
16 changes: 6 additions & 10 deletions trunk/scripts/checkstack.pl
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
#
# TODO : Port to all architectures (one regex per arch)

use strict;

# check for arch
#
# $re is used for two matches:
Expand Down Expand Up @@ -104,19 +106,11 @@
}
}

sub bysize($) {
my ($asize, $bsize);
($asize = $a) =~ s/.*: *(.*)$/$1/;
($bsize = $b) =~ s/.*: *(.*)$/$1/;
$bsize <=> $asize
}

#
# main()
#
my $funcre = qr/^$x* <(.*)>:$/;
my $func;
my $file, $lastslash;
my ($func, $file, $lastslash);

while (my $line = <STDIN>) {
if ($line =~ m/$funcre/) {
Expand Down Expand Up @@ -173,4 +167,6 @@ ($)
}
}

print sort bysize @stack;
# Sort output by size (last field)
print sort { ($b =~ /:\t*(\d+)$/)[0] <=> ($a =~ /:\t*(\d+)$/)[0] } @stack;

0 comments on commit 6f7ae1c

Please sign in to comment.