lkml.org 
[lkml]   [2009]   [Nov]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    SubjectPATCH [2/2] - CHECKSTACK: simplify text-formatting for displaying the stacksize

    Signed-off-by: Patrick Boettcher <pboettcher@kernellabs.com>

    ----
    diff --git a/tools/checkstack.pl b/tools/checkstack.pl
    index e0af9c7..4fed8c7 100755
    --- a/tools/checkstack.pl
    +++ b/tools/checkstack.pl
    @@ -139,7 +139,7 @@ while (my $line = <STDIN>) {
    $size += 0x80000000;
    $size += 0x80000000;
    }
    - next if ($size > 0x10000000);
    + next if ($size > 0x10000000) || ($size < 100);

    next if $line !~ m/^($xs*)/;
    my $addr = $1;
    @@ -147,13 +147,7 @@ while (my $line = <STDIN>) {
    $addr = "0x$addr";

    my $intro = "$addr $func [$file]:";
    - my $padlen = 56 - length($intro);
    - while ($padlen > 0) {
    - $intro .= ' ';
    - $padlen -= 8;
    - }
    - next if ($size < 100);
    - push @stack, "$intro$size\n";
    + push @stack, sprintf("%-64s %d\n", $intro, $size);
    }
    elsif (defined $dre && $line =~ m/$dre/) {
    my $size = "Dynamic ($1)";
    @@ -164,12 +158,7 @@ while (my $line = <STDIN>) {
    $addr = "0x$addr";

    my $intro = "$addr $func [$file]:";
    - my $padlen = 56 - length($intro);
    - while ($padlen > 0) {
    - $intro .= ' ';
    - $padlen -= 8;
    - }
    - push @stack, "$intro$size\n";
    + push @stack, sprintf("%-64s %d\n", $intro, $size);
    }
    }


    \
     
     \ /
      Last update: 2009-11-23 12:09    [W:0.021 / U:15.972 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site