Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp1803412ybz; Thu, 30 Apr 2020 05:54:10 -0700 (PDT) X-Google-Smtp-Source: APiQypLk0tlzBHQyg6Xi3Hz5svZKF8BuuLpwiW4enWz+hvOJMhiRLJEJ2imz/nh4Gw90DFDZ2AfL X-Received: by 2002:a17:906:a3ca:: with SMTP id ca10mr2587441ejb.298.1588251250600; Thu, 30 Apr 2020 05:54:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588251250; cv=none; d=google.com; s=arc-20160816; b=TwEPFZ1d4/VN5glCFPJv9vx5GDpp+yp6c0hEgKLlAS6aOfNi+14pPPEiXpkWHzWy61 vzUHtrrYJaBo9ONuvkVDLvdaQaODGaTfITFjNOAxmnBe/m/B4mObU1SYtMljcCXfzv26 eUYno7rY55Xe8swWnhgqKgeVjN+53Qj+HmIo0NeXd4k+3i1PzyeoeHyI4PX2kTdjTe0Q 8CKklETXo/8oqMnZgbnJl/pXXhSyN3MyauEMFUfIeQPPavkPojnavHQq2cJmJ6+n/AI8 LUQzavWQKa/dKheMRPLog6UH6HC0kuCKDn6lAzH2+0RznVl7eHNuAbao6fz8RxJ4YGwY Ti+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:cms-type:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature:dkim-filter; bh=jUPo0kpEwyRVUkoKBs06zck5gMd7jBCryiz6PHCIdqo=; b=yBasB05WR83L+wFWRxCvNYo/razzLGKxP3BFSWIzTdslnqaZvAC+s4+mLW0IW0rZhX qWUVPoKHVAamHyeLyFloIjltWfLg9nQhdtuGHiwlNB7Sn3s2/zL468qmYyu8Ar3+86U8 w2NHzDL5s1MvoMSLLRFrj/xjkNEUQDeJE/t8/14na+eH1QSyU+30ll3rA+rswFf4MI/b 5DWp3HdB5XyknTx6O6Dv1EPIAT9ZFvQ3/VgNTqdkmnsy3tgkzcFMNDXzAom/lvX76kjm JwAftxvCTRsxI+czEQmDn0184z/4tIEqWP0QTM3FLxKJAGQuyPvEaLLiXy6T3H3EaMMV sZDg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=rua34oGb; 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=samsung.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t5si5091528edq.384.2020.04.30.05.53.47; Thu, 30 Apr 2020 05:54:10 -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=@samsung.com header.s=mail20170921 header.b=rua34oGb; 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=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726832AbgD3MuQ (ORCPT + 99 others); Thu, 30 Apr 2020 08:50:16 -0400 Received: from mailout4.samsung.com ([203.254.224.34]:46620 "EHLO mailout4.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726127AbgD3MuQ (ORCPT ); Thu, 30 Apr 2020 08:50:16 -0400 Received: from epcas5p4.samsung.com (unknown [182.195.41.42]) by mailout4.samsung.com (KnoxPortal) with ESMTP id 20200430125012epoutp04fea4b4876d6e3b523d8600cfd89e6dd3~KmeGaEqw91933619336epoutp04k for ; Thu, 30 Apr 2020 12:50:12 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout4.samsung.com 20200430125012epoutp04fea4b4876d6e3b523d8600cfd89e6dd3~KmeGaEqw91933619336epoutp04k DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1588251012; bh=jUPo0kpEwyRVUkoKBs06zck5gMd7jBCryiz6PHCIdqo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rua34oGbSvnWJvoWM5CaB4DQ6pA9xnCJp+kaFszPmycwTylboUEHvWmwqtXj1LUD9 MtQrZuAHwWdPslVBCw7n1W2Gcsc/5zbSO/sTHvsiTfmLIwcN2ncmrWR0Mj3d6WDg98 Qy2NeTgWPKq3jVbc2PD9MMQUKfC1Z8QBHD+2ePNM= Received: from epsmges5p3new.samsung.com (unknown [182.195.42.75]) by epcas5p4.samsung.com (KnoxPortal) with ESMTP id 20200430125012epcas5p4d517585790291d1ceedbdbcfb39bd3a3~KmeGJZv-D0408004080epcas5p4f; Thu, 30 Apr 2020 12:50:12 +0000 (GMT) Received: from epcas5p1.samsung.com ( [182.195.41.39]) by epsmges5p3new.samsung.com (Symantec Messaging Gateway) with SMTP id A7.4B.04736.489CAAE5; Thu, 30 Apr 2020 21:50:12 +0900 (KST) Received: from epsmtrp1.samsung.com (unknown [182.195.40.13]) by epcas5p4.samsung.com (KnoxPortal) with ESMTPA id 20200430124955epcas5p4b5c1dd7393a7b798d80206d071264df3~Kmd2ltiOA2023020230epcas5p4J; Thu, 30 Apr 2020 12:49:55 +0000 (GMT) Received: from epsmgms1p2.samsung.com (unknown [182.195.42.42]) by epsmtrp1.samsung.com (KnoxPortal) with ESMTP id 20200430124955epsmtrp1381920dd28dbf06769db52ebbfdd63b5~Kmd2lFJxs3007130071epsmtrp1V; Thu, 30 Apr 2020 12:49:55 +0000 (GMT) X-AuditID: b6c32a4b-ae3ff70000001280-85-5eaac984f704 Received: from epsmtip2.samsung.com ( [182.195.34.31]) by epsmgms1p2.samsung.com (Symantec Messaging Gateway) with SMTP id 36.11.25866.379CAAE5; Thu, 30 Apr 2020 21:49:55 +0900 (KST) Received: from localhost.localdomain (unknown [107.109.224.135]) by epsmtip2.samsung.com (KnoxPortal) with ESMTPA id 20200430124954epsmtip25e6b2adad45102d6574970c854d48d69~Kmd1YJeQn1751917519epsmtip2g; Thu, 30 Apr 2020 12:49:54 +0000 (GMT) From: Maninder Singh To: yamada.masahiro@socionext.com, george_davis@mentor.com Cc: linux-kernel@vger.kernel.org, a.sahrawat@samsung.com, Maninder Singh , Vaneet Narang Subject: [PATCH 2/4] scripts/checkstack.pl: Add argument to print stacks greather than value. Date: Thu, 30 Apr 2020 18:19:30 +0530 Message-Id: <1588250972-8507-2-git-send-email-maninder1.s@samsung.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1588250972-8507-1-git-send-email-maninder1.s@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrJIsWRmVeSWpSXmKPExsWy7bCmum7LyVVxBh9vSltc3J1q8eT/d1aL y7vmsFkcnt/GYnHo5FxGi733PjM6sHns/trE6NG3ZRWjx4np31k8Pm+SC2CJ4rJJSc3JLEst 0rdL4MrYePMmU8ER3orlc2awNjDu4+pi5OSQEDCROPRtJTOILSSwm1Hi2nMgmwvI/sQosaRt IhuE85lRYun0t6wwHQfedrNCJHYxSmx8+gbK+coosWP6bxaQKjYBPYlVu/aA2SICVhLPtnWA jWIW6GKUWL1nO9hCYYF4iRk3H7GD2CwCqhIbHy0Bi/MKuEncefCECWKdnMTNc51gcU4Bd4nn C86DDZIQ2MUusXDrfhaIIheJu3cPMELYwhKvjm9hh7ClJF72t7FDNDQzSnzat5YRwpkC9NHF j1Af2Uu8bm4AWscBdJ+mxPpd+hBhWYmpp9aBXcEswCfR+xvmIl6JHfNgbFWJlpsboMZIS3z+ +BHqIA+Jhq7bbJBgncUosXJxxgRGuVkIGxYwMq5ilEwtKM5NTy02LTDOSy3XK07MLS7NS9dL zs/dxAhOAFreOxg3nfM5xCjAwajEw8uxaVWcEGtiWXFl7iFGCQ5mJRHeh7FAId6UxMqq1KL8 +KLSnNTiQ4zSHCxK4rxajCvjhATSE0tSs1NTC1KL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m8g07zrEUVcU94V77yl6e xUmJpTgj0VCLuag4EQBXXjPhoAIAAA== X-CMS-MailID: 20200430124955epcas5p4b5c1dd7393a7b798d80206d071264df3 X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-Sendblock-Type: REQ_APPROVE CMS-TYPE: 105P X-CMS-RootMailID: 20200430124955epcas5p4b5c1dd7393a7b798d80206d071264df3 References: <1588250972-8507-1-git-send-email-maninder1.s@samsung.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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); - $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