Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp809590imu; Tue, 27 Nov 2018 06:38:03 -0800 (PST) X-Google-Smtp-Source: AFSGD/W11wcdUEqtAzwlia+7DgLuWLHZ/u/KR2lnVtq/ZFBLrh5kQSHswzzvG54LvxwlWp0rBtcX X-Received: by 2002:a17:902:4827:: with SMTP id s36mr31557867pld.168.1543329483229; Tue, 27 Nov 2018 06:38:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543329483; cv=none; d=google.com; s=arc-20160816; b=KKwHSBZdrQMBPb6hHn0FOmjnPrLbhCn3s5wwAoAvV7zBjPt2DVkbqz96S9CRBgf0rJ imU1HIa9dbgNQSUg1bEaWAzi+Itr6LMMe6k7M1znngI8pURWQ2yT+uTfsyk/x6UziVNM eCOO6INuOOTcA4QXAZ0rTckDxuSeX4WH1l/rb2eveE4vQMIhe6sILn54UD+KKy2H1N8K WZGX+dgWidXRY7sZi5uScbpQxT75tMK4KzEqYKXXgQB5nScmAj5X0ddGHZWfwiwCvVG4 if2qhUfmX+P6Xer8moJ/yETiv8mcuplFk0cXXEdkapfvw+TmUUbfRp4CEMEO17Sf5LFW e/wg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=sgxgHjFbwEgjb1w8gUiiV/L4ClFtv7KbgFcDUP6HjPE=; b=g8oGEX4+fE46FDxnIiSdwAem3Zd8fYLoaMmYzxzsN+ekslcgc7jQ+T4ibEtuzLRdjS 8sGwNxqAswQqRMH+yy1jH0ErHMXRgmrEDnNbzyoJkn2hVu2Ck3cKc3wl+XghofDfen6U stNJj49PU6ux3/XsKZxhEiAxQ5HMChCylL0N5+0xOM8jYPQdC/noFRA7JqkR2DfIOSJN rx6QatOfPW35bRKWDQKecM3m7mkzLkkV4o2c1Wycw40VQTiuAQR+XdaTVXE7eFTDAZlu ce32fjwM9WnnBmnLGrHXk0/Hr9HaAlP18Y13K5xoraHQ6VAuE+HcFGOF1RxT9EfW3QSz l1pg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o10si3937790pgs.531.2018.11.27.06.37.17; Tue, 27 Nov 2018 06:38:03 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728503AbeK1B1d (ORCPT + 99 others); Tue, 27 Nov 2018 20:27:33 -0500 Received: from mail.kernel.org ([198.145.29.99]:57966 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726346AbeK1B1d (ORCPT ); Tue, 27 Nov 2018 20:27:33 -0500 Received: from gandalf.local.home (cpe-66-24-56-78.stny.res.rr.com [66.24.56.78]) (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 29BD2208E4; Tue, 27 Nov 2018 14:29:27 +0000 (UTC) Date: Tue, 27 Nov 2018 09:29:25 -0500 From: Steven Rostedt To: Pavan Kondeti Cc: Thomas Gleixner , Peter Zijlstra , Ingo Molnar , LKML Subject: Re: [PATCH] sched, trace: Fix prev_state output in sched_switch tracepoint Message-ID: <20181127092925.46c77ae7@gandalf.local.home> In-Reply-To: References: <1540882473-1103-1-git-send-email-pkondeti@codeaurora.org> X-Mailer: Claws Mail 3.16.0 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 27 Nov 2018 15:04:25 +0530 Pavan Kondeti wrote: > Hi Peter/Thomas, > > On Tue, Oct 30, 2018 at 12:25 PM Pavankumar Kondeti > wrote: > > > > commit 3f5fe9fef5b2 ("sched/debug: Fix task state recording/printout") > > tried to fix the problem introduced by a previous commit efb40f588b43 > > ("sched/tracing: Fix trace_sched_switch task-state printing"). However > > the prev_state output in sched_switch is still broken. > > > > task_state_index() uses fls() which considers the LSB as 1. Left > > shifting 1 by this value gives an incorrect mapping to the task state. > > Fix this by decrementing the value returned by __get_task_state() > > before shifting. > > > > Fixes: 3f5fe9fef5b2 ("sched/debug: Fix task state recording/printout") > > Signed-off-by: Pavankumar Kondeti > > --- > > include/trace/events/sched.h | 12 +++++++++++- > > 1 file changed, 11 insertions(+), 1 deletion(-) > > Can you please review this patch? > I've already tested this patch. I'm working on getting other patches upstream and this looks like it should be marked for stable. I'll take it. Thanks! -- Steve