Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp5696619rwb; Tue, 1 Aug 2023 06:46:48 -0700 (PDT) X-Google-Smtp-Source: APBJJlH0iN/SYeeufI67YaR1vejZWKIcRrBrKlThNBYu6XQLuBzpM8MT0mMF+hWJy/yWp/jmmwx0 X-Received: by 2002:a05:6808:144d:b0:3a4:7b6:e0b6 with SMTP id x13-20020a056808144d00b003a407b6e0b6mr16379244oiv.59.1690897608637; Tue, 01 Aug 2023 06:46:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690897608; cv=none; d=google.com; s=arc-20160816; b=aspcT+4z+040TZbmPBIt1Xcw89Y05gehtdu0gye6np8GVlOVKTeuX9HBjZZbouEgrg q2u6QS+EQllNRzTOQUTb4LfNB8+QRZk+kgO1F2oKAwS9dSWEru9nqvRW0KK80CBLnjWE TWA9cOpvNy57NqwU0uFbxK6//pZkbrsme6LR4yq2PihoQFzqaq6ysJx0t0aM5HlbAMWW r0JGCwdLr+iL0z+4R9mOFvMCUar5zeYYVrc54OJL5YxqUlBIPgKVT+PDIG0/m0ED4Ttt CjbN+A7y1HkS+eZBnNZVybhJE/xD3Q58v9ZmiS4eCTMfNgV/FSvUL35NejX3JULJo/Sa Xlaw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=mSYDgSBr6VIvVqvgbXgY8DPNQYD4uXETQ2T5A74Rvsc=; fh=TlS1M3eG/DSmde693FQvukU3rZXZo1yakG+rYieM2g8=; b=kbQ/U4fmfvyb0FctIAiWIb2udpceTxo9L39lsJKqiKnYjIhNK95MQ8QiBtTTR6yvC+ gbEBQJBqZVjlJbZnD44cldLHLuuDXPSA7695hBLFsD5PxDRqoUlZguWkLQMlIGOPFjbZ 1jVX2GqHH+rbIM9yAHJkQrOWseeQwUG0Q5DbVsxiipZGonR+Mn1mFhLhpAAAQfgL/gxA OmUwZ1UNuoabMe6Lwe5wc9AT+fsMnWkmtfSZDVv+dEZyFD8UXmCa9iAim3dyIYMjiluK /OgIo0vO9sBNEtrgs/+5QWcO7SAe+I4UuPkxC2niu979BPtIvMzGitivAhxXc3foqFcI Kw2g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=F6nEL7Ho; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w6-20020a631606000000b0055adfd70273si8288107pgl.538.2023.08.01.06.46.13; Tue, 01 Aug 2023 06:46:48 -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=@gmail.com header.s=20221208 header.b=F6nEL7Ho; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233343AbjHANJK (ORCPT + 99 others); Tue, 1 Aug 2023 09:09:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58992 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231811AbjHANJJ (ORCPT ); Tue, 1 Aug 2023 09:09:09 -0400 Received: from mail-lf1-x12a.google.com (mail-lf1-x12a.google.com [IPv6:2a00:1450:4864:20::12a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CA5741AA; Tue, 1 Aug 2023 06:09:07 -0700 (PDT) Received: by mail-lf1-x12a.google.com with SMTP id 2adb3069b0e04-4fe0d5f719dso9327917e87.2; Tue, 01 Aug 2023 06:09:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1690895346; x=1691500146; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=mSYDgSBr6VIvVqvgbXgY8DPNQYD4uXETQ2T5A74Rvsc=; b=F6nEL7Ho556Dfk2exHEr29Vo4qtyJkXFQPcNlQNpma4SmTaGFLvLCXPC305sLsnfBQ j9KENhvnNsi8lsOX1YhfASfk4tcChhBOxzA/4mK6+BfQR/5n0sNQ9It1S1XTQWfYeCC2 GQGW317tfBsKC57mj+Igu5MT9BK3S4CRxtrDuSK7YjT8xiWiJrwbCGHGOPvIsJOYoUwZ DpeNqh6LiFHQx4p9b6TkynfMeZ8+v+9Iayty8s07vF5tRzmJ66piCInNWIipHM+VhohQ osIVp+zKPleVbLNbRewe2JfP9IuVpsCyIeoe5oU8mPlTy3EyMsAj11Q4ZZGrFzW00Ej8 WApw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690895346; x=1691500146; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=mSYDgSBr6VIvVqvgbXgY8DPNQYD4uXETQ2T5A74Rvsc=; b=Awrw1LI17ZVnsIrK5jIkWZpd78lCOtKf5Um1TRlvoMmgoGEN/1pIof0pQ3Y8rTPWYP UiIUyPvwnBSsVAy8dPDUuJdSlkxCs2VUHmcIiHESFDuxSNVfRL5BPpbpZNGX2PH7mmYh Ypux0BD8HZ86qgnUg5CBZ7j8fCVURabPFCyxXmcd4NDGKMs1Pzz010Y6lwiL9wLsJwjv KiaxaXHc3N+jJJZJPShWHNhYBqQTABeoxueiFddo3jKbxE0GXBVezrgFOG+iz9GDMk5I SsuMai0oWCHcjLa2YZSyyrgqqe91U8oaf2XwmAxJ2WQrUHW9gF1ijP86WbDifSmuJFp4 BioA== X-Gm-Message-State: ABy/qLbJkYK48r1XMk4wwW/glG2HT1ZhcZq0Fi3QcDNh18adjINIvsv0 EaFR3nZBzvigr3r/qF4Y8x0DD3NZHn/ZIJsy6SQ= X-Received: by 2002:a05:6512:612:b0:4fb:89cd:9616 with SMTP id b18-20020a056512061200b004fb89cd9616mr2140636lfe.0.1690895345745; Tue, 01 Aug 2023 06:09:05 -0700 (PDT) MIME-Version: 1.0 References: <20230801090124.8050-1-zegao@tencent.com> <20230801090124.8050-4-zegao@tencent.com> <20230801114545.GD79828@hirez.programming.kicks-ass.net> In-Reply-To: <20230801114545.GD79828@hirez.programming.kicks-ass.net> From: Ze Gao Date: Tue, 1 Aug 2023 21:08:54 +0800 Message-ID: Subject: Re: [RFC PATCH v3 3/6] sched, tracing: add to report task state in symbolic chars To: Peter Zijlstra Cc: Adrian Hunter , Alexander Shishkin , Arnaldo Carvalho de Melo , Ian Rogers , Ingo Molnar , Jiri Olsa , Mark Rutland , Masami Hiramatsu , Namhyung Kim , Steven Rostedt , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, linux-trace-kernel@vger.kernel.org, linux-trace-devel@vger.kernel.org, Ze Gao Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE 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 Sorry that I don't get this one, did you mean kernel subsystems like bpf or third party modules? Honestly I don't know how it works here for userspace to consume the raw tracepoint without looking at tracefs. Regards, Ze On Tue, Aug 1, 2023 at 7:46=E2=80=AFPM Peter Zijlstra wrote: > > On Tue, Aug 01, 2023 at 05:01:21PM +0800, Ze Gao wrote: > > @@ -233,6 +255,7 @@ TRACE_EVENT(sched_switch, > > __field( pid_t, prev_pid ) > > __field( int, prev_prio ) > > __field( long, prev_state ) > > + __field( char, prev_state_char ) > > __array( char, next_comm, TASK_COMM_LEN ) > > __field( pid_t, next_pid ) > > __field( int, next_prio ) > > And this again will wreck everybody that consumes the raw tracepoint > without looking at tracefs.