Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp760270imu; Fri, 16 Nov 2018 09:44:56 -0800 (PST) X-Google-Smtp-Source: AJdET5ddVg3nf9aQaLnTZ+3t8NQXbDkJNV0sCOmhHYQfq17Ab/6l14Sn6sqtGl7NsmQGp0hOOtgu X-Received: by 2002:a63:5d14:: with SMTP id r20mr10932223pgb.329.1542390296294; Fri, 16 Nov 2018 09:44:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542390296; cv=none; d=google.com; s=arc-20160816; b=f0yRYW/sFvrm+q1yHcW656XWYy7l7NW5Sb/UpNMXN1qgxDtJxwaAYAUIQPBMbIL9U2 onmsppsCQz5mUeYCmrrYv2qtZMbUoGFJoY0vxh1MAEz53nLtKixb2sfa/Y6UPVMhLpkP wO80VHl1n8XvyjTs1tbuqfuSbrBMkM01Ug7485zRmFrBFHNLcdq9L3mMA/MZvrFh04q1 ZJpHqyUIvJl+hAjvNvLIehrBkRGZX/fbUkC3BnJPKlCxWJMksTKXKz0R5Dtwx6I4TPli d1aPdL8M/SEPWVfJT84PSK+zCw8AorsuIEabYZCLbquG/Y2BIQbrU5VtcXs9fk7T+gfI 6E8w== 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; bh=1d5YZpaaiU29VzqjlaqygfUagMt9MbEcWEj4MwojAa4=; b=N5EYvLXBdYMl6pyVbKLPcyMWIWJP31OjchEh9KpX33He/1Dp5JX3Al44NdSIDg66OQ jzGgltYYnX8HuipOrxh0LTPWtk/eD/DN+rLhXta4A1Co/gBO/6TKy1dLRz3GupJAyRYO 1Pby5zs6kELsE0w1mwknFQv6g8FAl5sQXRrwzMNzmspK6atyr7XUMFAyvqqgsw36Z7yt U1kXtdFaBY0jGAUQaAR8esNkOYlaVJAHfj1h7AJggdcspwkpZ/Q/C33LQn3Dpujqv0gf yNLrkrfWmXPsdblx2bO4dPMWihVGY+kNInmdA54e0dgqRlyMIuQR4tPMVHAkyFm8llzl zapg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="mMTx/d8G"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 204si17640696pfu.273.2018.11.16.09.44.40; Fri, 16 Nov 2018 09:44:56 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="mMTx/d8G"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729294AbeKQD5U (ORCPT + 99 others); Fri, 16 Nov 2018 22:57:20 -0500 Received: from mail-vk1-f194.google.com ([209.85.221.194]:45084 "EHLO mail-vk1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729140AbeKQD5U (ORCPT ); Fri, 16 Nov 2018 22:57:20 -0500 Received: by mail-vk1-f194.google.com with SMTP id n126so5424166vke.12 for ; Fri, 16 Nov 2018 09:44:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=1d5YZpaaiU29VzqjlaqygfUagMt9MbEcWEj4MwojAa4=; b=mMTx/d8GWJecC48aO1aaGvhtLb9jl2hTLkpvOzSd7jTiUZPTrEleYNETQiQcnavN/a aB1o3mOEkn2Uc1D1G1TDA1C+u5OxvxwLgdpFeEAneEOv4o7Z+CCeeEiGhm2zGq4ai19o frQsE8vW63s9ukNYVEYfqeYr/MnIawYrGZaX9sPVd9nMMIUmp535HbVy1zj9U6hxLDoN OhrvX2ufshqYZj7Py3w+pql+dCw3+5MkEz5UteaQBzHSA+C25YZBfXVLwngvPPYNpwSy WBZN+kLU/sYdT0jv6SyTmeDg1as3iVE+c93cAsiCf/Ne+ZQD1/yRj/brkGjxdBJbuJfH GjdA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=1d5YZpaaiU29VzqjlaqygfUagMt9MbEcWEj4MwojAa4=; b=KBN68Dqjo+/tvE/DwrlJ3nAyEODrMnzFw2muecI8XgCzvwaa5A565AGe0mK/cundhf 3b2LP5jUILy6ciBHgsv4ZaUrPZ5X6Rxr2Y919OujL+t/zuMAAW8odLsmfNOPG0Zaw02D Wmxeg/p3zvQ6aOywyojxAW36tbtZaka7SSwbyaF+Sf2CPWqsJrL9WcYdzYRr8jid0ihG koUMLNlUH10vYTi9cxsZHsfYrSLTzMmfaGqemGyCTi2OsrqGFhG95cJFkG/YYTdXbPsw S9VZVAGPOlxC6DvEEL52RyjSCekGXtSktNgPPtRPdxqYUf/KIWLr4dfgWd0NTHP7EKge 7Gaw== X-Gm-Message-State: AGRZ1gLtq/8QXQlEi5CzVjM/RphsLT6FhEwY9GFS0U9DT9tjPITZEMOH k68EIfKmFiGtGpgVn0rY4+98gUDfk9mJG6y3jHs= X-Received: by 2002:a1f:6184:: with SMTP id v126mr4849566vkb.69.1542390239546; Fri, 16 Nov 2018 09:43:59 -0800 (PST) MIME-Version: 1.0 References: <28496.1542300549@turing-police.cc.vt.edu> <49219.1542367988@turing-police.cc.vt.edu> <5997.1542386778@turing-police.cc.vt.edu> In-Reply-To: <5997.1542386778@turing-police.cc.vt.edu> From: Pintu Agarwal Date: Fri, 16 Nov 2018 23:13:48 +0530 Message-ID: Subject: Re: [ARM64] Printing IRQ stack usage information To: Valdis Kletnieks Cc: open list , linux-arm-kernel@lists.infradead.org, Russell King - ARM Linux , kernelnewbies@kernelnewbies.org, Jungseok Lee , catalin.marinas@arm.com, will.deacon@arm.com, Takahiro Akashi , mark.rutland@arm.com, Sungjinn Chung 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 Fri, Nov 16, 2018 at 10:16 PM wrote: > > On Fri, 16 Nov 2018 20:10:28 +0530, Pintu Agarwal said: > > > > Look at the code controlled by '#ifdef CONFIG_DEBUG_STACK_USAGE' > > > For example: is it possible to keep storing the irq_stack_usage (for > > each cpu in a variable) information from boot time, and then use this > > variable to dump the irq_stack information, after the system booted, > > may be from proc entry ? > > Congrats. You just re-invented DEBUG_STACK_USAGE, which just keeps a high-water mark > for stack usage. So, you mean to say, my implementation is good enough to get the irq_stack usage, from the interrupt handler ? But my concern is that if I dump it from irq handler, I will get information only for the current cpu. How do I store and get the information for all the cpu from the boot time ? From where do I call my dump_irq_stack_info() [some where during the entry/exit part of the irq handler], so that I could dump information for all the handler at boot time itself ? Like I would to capture these information: - What was the name of the handler ? - Which cpu was executing it ? - How much irq stack (max value, same like high water mark) were used at that time ? Where can I collect these information from the boot time ? Thanks, Pintu