Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp162751rwb; Tue, 25 Jul 2023 13:42:09 -0700 (PDT) X-Google-Smtp-Source: APBJJlEUSfhF0cYsMVYosvLqJvSajK5G74NBXIZIPgi6hfgPo8mOYWaI4tfUC0F3DbPYNrn6fAcx X-Received: by 2002:a05:6e02:1a03:b0:346:169a:bb4b with SMTP id s3-20020a056e021a0300b00346169abb4bmr159664ild.4.1690317729354; Tue, 25 Jul 2023 13:42:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690317729; cv=none; d=google.com; s=arc-20160816; b=VieZa/oTzdzhnoUNGWYv0UPt47wcxmWVA8HwmexQmXnjWDlUL+VrdCbphLxv5Ue8jV og+RR6MvnyhxXpI76paG9MyTnO5yyupC/T8/Ge7wGCj6VNLpAX6m/hdkhDDI9PbtzGSX VeUl+qYX4S6umisWouehI5VU0vIHoxDiz0Hq+/2uzItVFkoxsaVTBab4z5TH+Z04drl7 P7uR97LeMPARpwF19YebQvXPip/G3y95mNkcieK8/LoKVS7B9jWGTpS/nKAab2TazA/H TcSRY43354kGlWGjs2MynkF+2TagDIuLGfzx7VJhzh8UPa2ymgeCXoGIkBbBuOEOzKB+ GudA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=KgbnKQVKozyRRVh5Hy+ZdlwSXnYvtcdueZ7WwcU9Xdw=; fh=grUh1e/f0ilggy80pFgSXD8mNElA1jiYuJQF6M8Xc9s=; b=KrG49XTc+VeMf+t0dXmZFqRlsCvNPbjYQZrtHmG1/YWuq7B5xrz8bKwcAKMKx9f3UP d5j+vn8eX3mVcpvDEWD4mqHRlXi+21u4pUJlz17kJr2y4MOcwUmHfcP+iMxzslPHOSw7 EwDDCFnhy3e2AZD1Z4oY0j/CPKHyZB1lZm+aQb9l1HOqwkJUYznzO7gGSh/71T7TP65s sNvPdRWjlEHkeR8GmNbNNi0ig0lbPWbHM78jWyha1jm01a17bo8QLN33jHZ5niygdPPp cisraL6EWNa02o1I8Vlv44rrmZCNlE4bJ9aTHdsH3vahPrpu13HJffeRAy5+s9FsyNKi obsg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=r9TPHFyS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id kk2-20020a17090b4a0200b00262f0035181si30558pjb.26.2023.07.25.13.41.56; Tue, 25 Jul 2023 13:42:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=r9TPHFyS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229980AbjGYURK (ORCPT + 99 others); Tue, 25 Jul 2023 16:17:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53810 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229437AbjGYURI (ORCPT ); Tue, 25 Jul 2023 16:17:08 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5ADAF2118; Tue, 25 Jul 2023 13:17:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=KgbnKQVKozyRRVh5Hy+ZdlwSXnYvtcdueZ7WwcU9Xdw=; b=r9TPHFyS3h8bLc5zSBRg+fO5xh H7DPDph8cfJg3Tvu5W/fqGfid8VvholxPTXWMCqbFAs0pOqPWSzoK+SXHfd0x2XUhCTviSrIwRjw7 C5GWEUf3Jk0n++0DzORPa1P35LcK7U5RXElpJxV5Ti2fYOGA3j/Dwx+fY6JmQU36oxLh678czKQOw mjlX8vGTi4TZ9cw9sviWatC2TryJ4ABPYmfZgX71lfE9eEI5bbyjOffLuO29S8BVSs7H3nwesBBJk GDcTGMHYLtj7KjUBU8Cg23+VqmPJ7yahLAJaiJ26fu8ojU+wHC9IkiAv8phD/9/GOLyNdAUeJyG7t gP/naydw==; Received: from j130084.upc-j.chello.nl ([24.132.130.84] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1qOORx-005qN5-Qs; Tue, 25 Jul 2023 20:16:06 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 772F830049D; Tue, 25 Jul 2023 22:16:03 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 359002B5A0648; Tue, 25 Jul 2023 22:16:03 +0200 (CEST) Date: Tue, 25 Jul 2023 22:16:03 +0200 From: Peter Zijlstra To: Steven Rostedt Cc: Ze Gao , Ingo Molnar , Namhyung Kim , Ian Rogers , Arnaldo Carvalho de Melo , Jiri Olsa , Mark Rutland , Masami Hiramatsu , Adrian Hunter , Alexander Shishkin , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, linux-trace-kernel@vger.kernel.org, Ze Gao Subject: Re: [RFC PATCH 1/3] sched, tracing: report task state in symbolic chars instead Message-ID: <20230725201603.GB3784071@hirez.programming.kicks-ass.net> References: <20230725072254.32045-1-zegao@tencent.com> <20230725072254.32045-2-zegao@tencent.com> <20230725135938.1e056a02@rorschach.local.home> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230725135938.1e056a02@rorschach.local.home> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jul 25, 2023 at 01:59:38PM -0400, Steven Rostedt wrote: > > @@ -232,7 +235,7 @@ TRACE_EVENT(sched_switch, > > __array( char, prev_comm, TASK_COMM_LEN ) > > __field( pid_t, prev_pid ) > > __field( int, prev_prio ) > > - __field( long, prev_state ) > > + __field( char, prev_state ) > > __array( char, next_comm, TASK_COMM_LEN ) > > __field( pid_t, next_pid ) > > __field( int, next_prio ) > > This will break userspace. Just because you update libtraceevent > doesn't mean that it will get to all the users of it. There's still > tools that have the old method hard coded and doesn't use the library. > > Now, because the old tools still do the parsing of this format, we can > add a new field called prev_state_char that will give you this. Now to > save space, we should change prev_state to int (can't make it short as > there's that test for "+" which does sometimes happen). I believe we > can make prev_prio and next prio into shorts (and possibly chars!). Or just leave the thing alone?