Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp4022167pxv; Tue, 13 Jul 2021 09:01:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxAKluMeYraokpTMWnynNNryCZjxHeChT0n3Khhpd0IrTKSFhelddvZgPVo9jQFfDB8VBH4 X-Received: by 2002:a1c:7201:: with SMTP id n1mr122881wmc.4.1626192082527; Tue, 13 Jul 2021 09:01:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626192082; cv=none; d=google.com; s=arc-20160816; b=Z++NwtYkwRJN6I1veAOK4HmD17c8PwtAV5vP4T4x8hhWkferf37ZhXebHDxIBnIuLH DII+iW3rRZhWg1w8tr8tfzwEXf3rRLF5M+6FAXlMmbja0o0kRgl1IlsLPHq9LZr4NZxZ 3Gr32oPoz30FuPCjerv/WznBOq4LGsbfu63xi6+6c5Wjzp26saPau29Ilu5h5mv40tnw b+aZXAdRhCKLdiDeZJaHDcgkp69mN5jOU3uVR5+kZEhfbUOXdQvhg78ppyFt+oFw+vy0 OI8JQrf3ytfnz42Cp9XWlik/PrcD8B2UwO7F83vKhLTbVy0gROYXGUc9sUw4JGu4olEr JSQg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=GQ078U9XUeFHJX3mltMcpbFcebx21PSVWJTbnDfPfaU=; b=ucZnv4OPaFLKPur9+XqEtTHf3MuNQXGlGt4/VcnDxFZJ6CzkDQmEvvR5GBAgN3+c7j gasvGrWrNHGiWSnd8vBjBtwgej+CZtzrjRB/7PmKXdzYx4WGUQYGKkBR6/mERZNCHU0Z 3PssyAp8keMOgCL5K5p7si8Rhbs+qp4TXm+kmcRUGabZbtenWjlhMOgTniEgszEdEwEv dMlTnl7sQ5CdifpudhSdpPhhV9quWKEO2lhxX0pjvoXXU7ul20EkQjRlLg0dqtc0G5Ga RZa3RUZ79JDyCdVZtQfem3MaJv4MM67O8PR4xhY91ht4kQeVuPj2oKuU4hAL1ejqO0LM UtJQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p13si10082491eds.308.2021.07.13.09.00.50; Tue, 13 Jul 2021 09:01:22 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237181AbhGMQCq (ORCPT + 99 others); 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) { > /*