Received: by 2002:a25:23cc:0:0:0:0:0 with SMTP id j195csp526828ybj; Thu, 7 May 2020 01:16:27 -0700 (PDT) X-Google-Smtp-Source: APiQypKW+HLoqvMJTRDIXLn7J/KaYvurlDa0ubcAuQxPNrsk5osMnlJJOG6+Qj5UpcwDG0TIjZzS X-Received: by 2002:aa7:cd01:: with SMTP id b1mr10899230edw.163.1588839387239; Thu, 07 May 2020 01:16:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588839387; cv=none; d=google.com; s=arc-20160816; b=S2eSayJr7CcAXk2b823AmVUXJJzqpiYrLa2xLp16XTPf3Ey6Vh6XJT9TqrEZd37H/m yvmeRgNUDvQUO75ElHSt+IVF0alZyglEgG802Y0KFZIZfJECvY7QkrEYrhEL5Xqvwnwb IauSYSKzkbelJKvIJlmEvjHIqGs4eiCQ6EkcIyzDOLGYersek1IU8ZM6t8umEkDzLMX6 sUk39aDvB89r+zhyqyLAVvMUOY+uzVGOGjXtQKk76X93TlFHqCQZtNWHjoZY1vCycbT0 36d8sUvVE4thvvsXG5mkFnPRJuACbocoSFe0xXjsBOuiFieTmdP1xd44WT3+oWdI07lL 8I3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature:dkim-filter; bh=oO23HSsWhRBDhOTb98SBCWFO49siOAirG9x+sRE0UoY=; b=xX990MT6FW+N4nbmfuwHPo129Eb2j7qWWgGHIkbGTvPkl8kth7vZqPDWJj8fVMmAnO VvwDQZaH++NdXXvQgBKkTbes3rZEv2vq7SLwx+4oZxky33VYs5DLD1HRpUKj/5SRjrbr Gk3nAwZ9waEgTQI7eRLbgrQ+zwtTaXYTVTpXjMLF2d4axp4xh9eN63DdcFzCzSleqI5Z 41/zYhDXvtXibf8zEEm3XNlFPgtPTbbWPM2s/xJo+qLcB9SjGRJEmVs0MIeIoBHO4o5V +uz3PjQPmQRjnNMN4CjTwIg3KZvZzzHS6HiPgmuuby8GrAhU6PmbsFJPhR75nucvushd cYKg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=BaWCx5Rz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e21si2630609edq.508.2020.05.07.01.16.03; Thu, 07 May 2020 01:16:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=BaWCx5Rz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726509AbgEGION (ORCPT + 99 others); Thu, 7 May 2020 04:14:13 -0400 Received: from conssluserg-06.nifty.com ([210.131.2.91]:34939 "EHLO conssluserg-06.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725857AbgEGIOM (ORCPT ); Thu, 7 May 2020 04:14:12 -0400 Received: from mail-vs1-f49.google.com (mail-vs1-f49.google.com [209.85.217.49]) (authenticated) by conssluserg-06.nifty.com with ESMTP id 0478Dc5P008707 for ; Thu, 7 May 2020 17:13:39 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-06.nifty.com 0478Dc5P008707 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1588839219; bh=oO23HSsWhRBDhOTb98SBCWFO49siOAirG9x+sRE0UoY=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=BaWCx5RzNwzhamAV77FD4rs3gnmwdJ+Zaa7bSJn/GYFhICn6TmXOG5IrDP6D8N6HL qI3VUS6MizO/GSE1vbgx4SeNnrR8SydfXto0y6Qpqh6coGUpx7fAMuqLfH/KT+42oj ZdOqwUky5jZgMtMOlHU68zbmcUMNzFLuBHsSSlDb3DDQSj7pQGt/tPzEiYmQUaPJXY udPvY4id8t86ZxdtTMg4hsefqh1EvsFpOMUlEPOl7/6+dX1oCN4q4AJNgb54/97X0Y xe+G85Aewmzmk26Lw7npmqwDhl8NDdtdy/UuTWf9Q7+3SVtwuHrMX3RWCD8ep3sdTJ tP6TX/5sv9Aow== X-Nifty-SrcIP: [209.85.217.49] Received: by mail-vs1-f49.google.com with SMTP id s11so2826120vsm.3 for ; Thu, 07 May 2020 01:13:39 -0700 (PDT) X-Gm-Message-State: AGi0PuazvZ5o0+z+M/SAc4U6bKX9gGbPpg5BIeImQw38mROEJ3JH997F aTp5PNFx3gAcb4mtK18nwNlEKhGupVAXtherKzo= X-Received: by 2002:a67:6e07:: with SMTP id j7mr11040549vsc.181.1588839218008; Thu, 07 May 2020 01:13:38 -0700 (PDT) MIME-Version: 1.0 References: <1588250972-8507-1-git-send-email-maninder1.s@samsung.com> <1588250972-8507-2-git-send-email-maninder1.s@samsung.com> In-Reply-To: <1588250972-8507-2-git-send-email-maninder1.s@samsung.com> From: Masahiro Yamada Date: Thu, 7 May 2020 17:13:02 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 2/4] scripts/checkstack.pl: Add argument to print stacks greather than value. To: Maninder Singh Cc: "George G. Davis" , Linux Kernel Mailing List , a.sahrawat@samsung.com, Vaneet Narang Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Apr 30, 2020 at 9:50 PM Maninder Singh wrote: > > Add arguments support to print stacks which are greater than > argument value only. > > Signed-off-by: Vaneet Narang > Signed-off-by: Maninder Singh > --- > scripts/checkstack.pl | 12 ++++++++---- > 1 file changed, 8 insertions(+), 4 deletions(-) > > diff --git a/scripts/checkstack.pl b/scripts/checkstack.pl > index 412c459..8e5ef98 100755 > --- a/scripts/checkstack.pl > +++ b/scripts/checkstack.pl > @@ -35,7 +35,7 @@ use strict; > # $1 (first bracket) matches the dynamic amount of the stack growth > # > # use anything else and feel the pain ;) > -my (@stack, $re, $dre, $x, $xs, $funcre); > +my (@stack, $re, $dre, $x, $xs, $funcre, $min_stack); > { > my $arch = shift; > if ($arch eq "") { > @@ -43,6 +43,11 @@ my (@stack, $re, $dre, $x, $xs, $funcre); > chomp($arch); > } > > + $min_stack = shift; > + if ($min_stack eq "" || $min_stack !~ /^\d+$/) { > + $min_stack = 100; > + } > + > $x = "[0-9a-f]"; # hex character > $xs = "[0-9a-f ]"; # hex character or space > $funcre = qr/^$x* <(.*)>:$/; > @@ -113,7 +118,7 @@ my ($func, $file, $lastslash, $total_size, $addr, $intro); > > while (my $line = ) { > if ($line =~ m/$funcre/) { > - if ($total_size > 100) { > + if ($total_size > $min_stack) { > push @stack, "$intro$total_size\n"; > } > > @@ -150,7 +155,6 @@ while (my $line = ) { > $size += 0x80000000; > } > next if ($size > 0x10000000); > - This is a noise change. You can do this in 1/4 if you want to. > $total_size = $total_size + $size > } > elsif (defined $dre && $line =~ m/$dre/) { > @@ -160,7 +164,7 @@ while (my $line = ) { > $total_size = $total_size + $size > } > } > -if ($total_size > 100) { > +if ($total_size > $min_stack) { > push @stack, "$intro$total_size\n"; > } > > -- > 1.9.1 > -- Best Regards Masahiro Yamada