From: Kuan-Ying Lee <Kuan-Ying.Lee@mediatek.com> To: Jan Kiszka <jan.kiszka@siemens.com>, Kieran Bingham <kbingham@kernel.org>, Matthias Brugger <matthias.bgg@gmail.com>, AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Cc: <casper.li@mediatek.com>, <chinwen.chang@mediatek.com>, <qun-wei.lin@mediatek.com>, <linux-mm@kvack.org>, <akpm@linux-foundation.org>, Kuan-Ying Lee <Kuan-Ying.Lee@mediatek.com>, Andrey Konovalov <andreyknvl@google.com>, <linux-kernel@vger.kernel.org>, <linux-arm-kernel@lists.infradead.org>, <linux-mediatek@lists.infradead.org> Subject: [PATCH v2 2/3] scripts/gdb/stackdepot: Rename pool_index to pools_num Date: Wed, 29 Nov 2023 14:51:39 +0800 [thread overview] Message-ID: <20231129065142.13375-3-Kuan-Ying.Lee@mediatek.com> (raw) In-Reply-To: <20231129065142.13375-1-Kuan-Ying.Lee@mediatek.com> After stackdepot evicting support patchset[1], we rename pool_index to pools_num. To avoid from the below issue, we rename consistently in gdb scripts. Python Exception <class 'gdb.error'>: No symbol "pool_index" in current context. Error occurred in Python: No symbol "pool_index" in current context. [1] https://lore.kernel.org/linux-mm/cover.1700502145.git.andreyknvl@google.com/ Cc: Andrey Konovalov <andreyknvl@google.com> Signed-off-by: Kuan-Ying Lee <Kuan-Ying.Lee@mediatek.com> --- scripts/gdb/linux/stackdepot.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/gdb/linux/stackdepot.py b/scripts/gdb/linux/stackdepot.py index 047d329a6a12..0281d9de4b7c 100644 --- a/scripts/gdb/linux/stackdepot.py +++ b/scripts/gdb/linux/stackdepot.py @@ -25,10 +25,10 @@ def stack_depot_fetch(handle): handle_parts_t = gdb.lookup_type("union handle_parts") parts = handle.cast(handle_parts_t) offset = parts['offset'] << DEPOT_STACK_ALIGN - pool_index_cached = gdb.parse_and_eval('pool_index') + pools_num = gdb.parse_and_eval('pools_num') - if parts['pool_index'] > pool_index_cached: - gdb.write("pool index %d out of bounds (%d) for stack id 0x%08x\n" % (parts['pool_index'], pool_index_cached, handle)) + if parts['pool_index'] > pools_num: + gdb.write("pool index %d out of bounds (%d) for stack id 0x%08x\n" % (parts['pool_index'], pools_num, handle)) return gdb.Value(0), 0 stack_pools = gdb.parse_and_eval('stack_pools') -- 2.18.0
WARNING: multiple messages have this Message-ID (diff)
From: Kuan-Ying Lee <Kuan-Ying.Lee@mediatek.com> To: Jan Kiszka <jan.kiszka@siemens.com>, Kieran Bingham <kbingham@kernel.org>, Matthias Brugger <matthias.bgg@gmail.com>, AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Cc: <casper.li@mediatek.com>, <chinwen.chang@mediatek.com>, <qun-wei.lin@mediatek.com>, <linux-mm@kvack.org>, <akpm@linux-foundation.org>, Kuan-Ying Lee <Kuan-Ying.Lee@mediatek.com>, Andrey Konovalov <andreyknvl@google.com>, <linux-kernel@vger.kernel.org>, <linux-arm-kernel@lists.infradead.org>, <linux-mediatek@lists.infradead.org> Subject: [PATCH v2 2/3] scripts/gdb/stackdepot: Rename pool_index to pools_num Date: Wed, 29 Nov 2023 14:51:39 +0800 [thread overview] Message-ID: <20231129065142.13375-3-Kuan-Ying.Lee@mediatek.com> (raw) In-Reply-To: <20231129065142.13375-1-Kuan-Ying.Lee@mediatek.com> After stackdepot evicting support patchset[1], we rename pool_index to pools_num. To avoid from the below issue, we rename consistently in gdb scripts. Python Exception <class 'gdb.error'>: No symbol "pool_index" in current context. Error occurred in Python: No symbol "pool_index" in current context. [1] https://lore.kernel.org/linux-mm/cover.1700502145.git.andreyknvl@google.com/ Cc: Andrey Konovalov <andreyknvl@google.com> Signed-off-by: Kuan-Ying Lee <Kuan-Ying.Lee@mediatek.com> --- scripts/gdb/linux/stackdepot.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/gdb/linux/stackdepot.py b/scripts/gdb/linux/stackdepot.py index 047d329a6a12..0281d9de4b7c 100644 --- a/scripts/gdb/linux/stackdepot.py +++ b/scripts/gdb/linux/stackdepot.py @@ -25,10 +25,10 @@ def stack_depot_fetch(handle): handle_parts_t = gdb.lookup_type("union handle_parts") parts = handle.cast(handle_parts_t) offset = parts['offset'] << DEPOT_STACK_ALIGN - pool_index_cached = gdb.parse_and_eval('pool_index') + pools_num = gdb.parse_and_eval('pools_num') - if parts['pool_index'] > pool_index_cached: - gdb.write("pool index %d out of bounds (%d) for stack id 0x%08x\n" % (parts['pool_index'], pool_index_cached, handle)) + if parts['pool_index'] > pools_num: + gdb.write("pool index %d out of bounds (%d) for stack id 0x%08x\n" % (parts['pool_index'], pools_num, handle)) return gdb.Value(0), 0 stack_pools = gdb.parse_and_eval('stack_pools') -- 2.18.0 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2023-11-29 6:52 UTC|newest] Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-11-29 6:51 [PATCH v2 0/3] Fix GDB commands error Kuan-Ying Lee 2023-11-29 6:51 ` Kuan-Ying Lee 2023-11-29 6:51 ` [PATCH v2 1/3] scripts/gdb/tasks: Fix lx-ps command error Kuan-Ying Lee 2023-11-29 6:51 ` Kuan-Ying Lee 2023-11-29 8:10 ` Oleg Nesterov 2023-11-29 8:10 ` Oleg Nesterov 2023-11-29 22:15 ` Andrew Morton 2023-11-29 22:15 ` Andrew Morton 2023-11-29 22:33 ` Florian Fainelli 2023-11-29 22:33 ` Florian Fainelli 2023-11-29 6:51 ` Kuan-Ying Lee [this message] 2023-11-29 6:51 ` [PATCH v2 2/3] scripts/gdb/stackdepot: Rename pool_index to pools_num Kuan-Ying Lee 2023-11-29 22:33 ` Florian Fainelli 2023-11-29 22:33 ` Florian Fainelli 2023-11-29 6:51 ` [PATCH v2 3/3] scripts/gdb: Remove exception handling and refine print format Kuan-Ying Lee 2023-11-29 6:51 ` Kuan-Ying Lee
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20231129065142.13375-3-Kuan-Ying.Lee@mediatek.com \ --to=kuan-ying.lee@mediatek.com \ --cc=akpm@linux-foundation.org \ --cc=andreyknvl@google.com \ --cc=angelogioacchino.delregno@collabora.com \ --cc=casper.li@mediatek.com \ --cc=chinwen.chang@mediatek.com \ --cc=jan.kiszka@siemens.com \ --cc=kbingham@kernel.org \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-mediatek@lists.infradead.org \ --cc=linux-mm@kvack.org \ --cc=matthias.bgg@gmail.com \ --cc=qun-wei.lin@mediatek.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.