From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755842AbYAZEeY (ORCPT ); Fri, 25 Jan 2008 23:34:24 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755569AbYAZE2n (ORCPT ); Fri, 25 Jan 2008 23:28:43 -0500 Received: from ms-smtp-05.nyroc.rr.com ([24.24.2.59]:44191 "EHLO ms-smtp-05.nyroc.rr.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753410AbYAZE2X (ORCPT ); Fri, 25 Jan 2008 23:28:23 -0500 Message-Id: <20080126042803.201731146@goodmis.org> References: <20080126042152.526086719@goodmis.org> User-Agent: quilt/0.46-1 Date: Fri, 25 Jan 2008 23:22:05 -0500 From: Steven Rostedt To: LKML Cc: Ingo Molnar , Linus Torvalds , Andrew Morton , Peter Zijlstra , Christoph Hellwig , Mathieu Desnoyers , Gregory Haskins , Arnaldo Carvalho de Melo , Thomas Gleixner , Tim Bird , Sam Ravnborg , "Frank Ch. Eigler" , Jan Kiszka , John Stultz , Arjan van de Ven , Pavel Machek , Steven Rostedt Subject: [PATCH 13/23 -v6] Make the task State char-string visible to all Content-Disposition: inline; filename=parse-out-task-state-to-char-string.patch Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The tracer wants to be able to convert the state number into a user visible character. This patch pulls that conversion string out the scheduler into the header. This way if it were to ever change, other parts of the kernel will know. Signed-off-by: Steven Rostedt --- include/linux/sched.h | 2 ++ kernel/sched.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) Index: linux-mcount.git/include/linux/sched.h =================================================================== --- linux-mcount.git.orig/include/linux/sched.h 2008-01-25 21:46:55.000000000 -0500 +++ linux-mcount.git/include/linux/sched.h 2008-01-25 21:47:21.000000000 -0500 @@ -2055,6 +2055,8 @@ static inline void migration_init(void) } #endif +#define TASK_STATE_TO_CHAR_STR "RSDTtZX" + #endif /* __KERNEL__ */ #endif Index: linux-mcount.git/kernel/sched.c =================================================================== --- linux-mcount.git.orig/kernel/sched.c 2008-01-25 21:47:19.000000000 -0500 +++ linux-mcount.git/kernel/sched.c 2008-01-25 21:47:21.000000000 -0500 @@ -5149,7 +5149,7 @@ out_unlock: return retval; } -static const char stat_nam[] = "RSDTtZX"; +static const char stat_nam[] = TASK_STATE_TO_CHAR_STR; void sched_show_task(struct task_struct *p) { --