From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_2 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 00F62C07E95 for ; Tue, 13 Jul 2021 15:59:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id CE8C5610A6 for ; Tue, 13 Jul 2021 15:59:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237189AbhGMQCq (ORCPT ); Tue, 13 Jul 2021 12:02:46 -0400 Received: from mail.kernel.org ([198.145.29.99]:46304 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237091AbhGMQCp (ORCPT ); Tue, 13 Jul 2021 12:02:45 -0400 Received: from oasis.local.home (cpe-66-24-58-225.stny.res.rr.com [66.24.58.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 33CBA610C7; Tue, 13 Jul 2021 15:59:54 +0000 (UTC) Date: Tue, 13 Jul 2021 11:59:47 -0400 From: Steven Rostedt To: Shirish S Cc: Ingo Molnar , Peter Zijlstra , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Ben Segall , "Mel Gorman" , Daniel Bristot de Oliveira , Subject: Re: [PATCH] sched/debug: print column titles of show_state_filter() Message-ID: <20210713115947.1c3bdbb8@oasis.local.home> In-Reply-To: <20210713110518.52243-1-shirish.s@amd.com> References: <20210713110518.52243-1-shirish.s@amd.com> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 13 Jul 2021 16:35:18 +0530 Shirish S wrote: > This addition in the debug output shall improve readablitly.. > Its not intuitive for users that the pid printed in last column > is of parent process. > > Signed-off-by: Shirish S > --- > kernel/sched/core.c | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/kernel/sched/core.c b/kernel/sched/core.c > index 2d9ff40f4661..d95d46a89e7e 100644 > --- a/kernel/sched/core.c > +++ b/kernel/sched/core.c > @@ -8194,6 +8194,11 @@ void show_state_filter(unsigned int state_filter) > { > struct task_struct *g, *p; > > +#if BITS_PER_LONG == 32 > + pr_info(" task PC stack pid father\n"); > +#else > + pr_info(" task PC stack pid father\n"); > +#endif Or remove the ugly #ifdef logic and just have: pr_info(" task%*s", BITS_PER_LONG == 32 ? 38 : 46, "PC stack pid father\n"); -- Steve > rcu_read_lock(); > for_each_process_thread(g, p) { > /*