Received: by 2002:a05:6358:700f:b0:131:369:b2a3 with SMTP id 15csp1966991rwo; Thu, 3 Aug 2023 02:42:28 -0700 (PDT) X-Google-Smtp-Source: APBJJlHf/vKPtiOV+TVA8zNUsb/ryaKd+1j0ITZQog602ScxqTpjvm4+5b8wUrPKZliZICbtkFkZ X-Received: by 2002:aa7:d1d1:0:b0:520:f5dd:3335 with SMTP id g17-20020aa7d1d1000000b00520f5dd3335mr6903051edp.41.1691055747796; Thu, 03 Aug 2023 02:42:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691055747; cv=none; d=google.com; s=arc-20160816; b=zGI1IqM+j9FhA16oJGJS6/jqYhjeUKIGYVRsUian2B6uyNQex4Q0NlPW3k2oilsUoR 9cN+KLeOrsUj6QEfj8Zt6I+N3iuvFAJoGCJirZneF0p5ePtM5uhEl+kXYiCusPs9EMD+ Ta8LRdYKhtccL5Qr+EXzW/QgIKc69trSR6nqW0ePwpvOVGzRQZ2p4WKpCfFIz3uSBwkq P4toMV1CzWjnK4w8jNeVzP31E88OFcy04hHc/+eLixy5q1z7dLQe+nubxA6RAmantgIk 0AbLmQZ8td4gu8JPnWM0NUJ8Fic1Yte7sFdv3Y72h8xRX6T9ElFkQ7BvfQG2BMlIIO0O obqw== 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:date:subject:cc:to:from :dkim-signature; bh=CzdBr4YE6+e2aCPihxyG1VP6AlkYIgUBNXtEC6jGkqA=; fh=TgT5K4Z1kLXalrYfkT8XvOWNi122otFfxWyimjdT30Y=; b=a0uHgUVwXj5kG7GLB4dQpPN3Vex5N1Dx37D16b8oBUViOzI4c6AOImrwf8zuJjR8hz ZSAkAlvXy/z//O7m+IrhK2nK7KP0XYfEsb6p/XqVcVFAOqBmDbh0GOhKivOqtTjDpUMd na3h1Ua09lilgmlUcgBe6p4nKBRXVJOpMPOI11l7r3BNQ1+vyA9e2tIRNPSJxekkBl7C SGEuqmO6Yi80lCJ+gZqXa14UxaPxvlnf0hKNEopIHyVSFKW0ZDzb1p9F7jwsVFr6WadF H286/NRUwXA5ZEzCbpKNM6oNQ9effcivLJzD1mH3Oyn10U7wlakYMu3MVL4fRs9j2E8f mo7Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b="Y/9r8JJK"; 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 w20-20020aa7dcd4000000b0052221a15156si11103814edu.490.2023.08.03.02.42.03; Thu, 03 Aug 2023 02:42:27 -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="Y/9r8JJK"; 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 S234363AbjHCIgh (ORCPT + 99 others); Thu, 3 Aug 2023 04:36:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55510 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234389AbjHCIgC (ORCPT ); Thu, 3 Aug 2023 04:36:02 -0400 Received: from mail-pf1-x42f.google.com (mail-pf1-x42f.google.com [IPv6:2607:f8b0:4864:20::42f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 248723C31; Thu, 3 Aug 2023 01:34:36 -0700 (PDT) Received: by mail-pf1-x42f.google.com with SMTP id d2e1a72fcca58-686b91c2744so481121b3a.0; Thu, 03 Aug 2023 01:34:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1691051675; x=1691656475; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=CzdBr4YE6+e2aCPihxyG1VP6AlkYIgUBNXtEC6jGkqA=; b=Y/9r8JJKfyClJG9K8FJm7KPjugSxpks8rCNhdwQOcJ/bv6c8+pq3lK1IGeChGXO2LC pi3sH0DN49vBEdT3Qsn6L3k7bSFjv45LF32+NLCeRjTucTTcel6FNw6g4Jf1HIPX/Byh CFPwads8yzANusFzRsqrcp27YQlhFSCVP5tt1F7ywMOWKqRZA3T1GHLOuCt/Vodga/mc +OGFmPsQHN+3DHmzldqn5nYkzEAv4BpH2ReuCijEBmP7XjPi3iEwm3SSh7uEDwWSvO3Z gMRmxZJVK+ePNtOwjYugvmX3+8FoHs7WFHenPW/eFPImn5eDtu4qcJN3QTr6B0nuxHvF bYzQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691051675; x=1691656475; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=CzdBr4YE6+e2aCPihxyG1VP6AlkYIgUBNXtEC6jGkqA=; b=QN+XxRPsEHEipReA3y+RX6zVTq2/ihrkm0k65yztcS5nZIdmijhdTjMTaQM6It9Lw1 E1W0UUe/pO3RfhoEbVCqdtxRqWWjVGy7mGDjChveeSHICtOdacRbwLHil5JBmbZtASdO NWR3tvL4W7cUthaYQ66uL2VckgTTNAaYEsbxnol2sm/D28nE8j/skJcmp6JXJ3pwIdDp u2C3RiuLe+BfcXGEznLgmDp+BcSPf0yXjNy4OtUjuf1SvF762MjGql+XbE6mCTDyAt/P ZEBKi7Ii+kxPy6v7Cu5Bs2ul4mYQUwExUQa9Xhg0qGHr+yiia9JGmfemYfawNuMiotzS kSAg== X-Gm-Message-State: ABy/qLZ81Il02Zfit6KrJC2RY7F9Q7duPWA2s2ixeVS/bp1P0Pm1Xs0l SI/lce4vYpJ+aHIR7GekimI= X-Received: by 2002:a05:6a00:15d6:b0:682:a62a:ec36 with SMTP id o22-20020a056a0015d600b00682a62aec36mr22266054pfu.15.1691051675648; Thu, 03 Aug 2023 01:34:35 -0700 (PDT) Received: from localhost.localdomain ([203.205.141.83]) by smtp.googlemail.com with ESMTPSA id r6-20020a63b106000000b00563feb7113dsm12541876pgf.91.2023.08.03.01.34.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Aug 2023 01:34:35 -0700 (PDT) From: Ze Gao X-Google-Original-From: Ze Gao To: Adrian Hunter , Alexander Shishkin , Arnaldo Carvalho de Melo , Ian Rogers , Ingo Molnar , Jiri Olsa , Mark Rutland , Masami Hiramatsu , Namhyung Kim , Peter Zijlstra , Steven Rostedt Cc: linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, linux-trace-kernel@vger.kernel.org, Ze Gao Subject: [RFC PATCH v6 1/5] perf sched: sync state char array with the kernel Date: Thu, 3 Aug 2023 04:33:48 -0400 Message-ID: <20230803083352.1585-2-zegao@tencent.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230803083352.1585-1-zegao@tencent.com> References: <20230803083352.1585-1-zegao@tencent.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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_BLOCKED,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 Update state char array and then remove unused and stale macros, which are kernel internal representations and not encouraged to use anymore. Signed-off-by: Ze Gao --- tools/perf/builtin-sched.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/tools/perf/builtin-sched.c b/tools/perf/builtin-sched.c index 9ab300b6f131..8dc8f071721c 100644 --- a/tools/perf/builtin-sched.c +++ b/tools/perf/builtin-sched.c @@ -92,23 +92,12 @@ struct sched_atom { struct task_desc *wakee; }; -#define TASK_STATE_TO_CHAR_STR "RSDTtZXxKWP" +#define TASK_STATE_TO_CHAR_STR "RSDTtXZPI" /* task state bitmask, copied from include/linux/sched.h */ #define TASK_RUNNING 0 #define TASK_INTERRUPTIBLE 1 #define TASK_UNINTERRUPTIBLE 2 -#define __TASK_STOPPED 4 -#define __TASK_TRACED 8 -/* in tsk->exit_state */ -#define EXIT_DEAD 16 -#define EXIT_ZOMBIE 32 -#define EXIT_TRACE (EXIT_ZOMBIE | EXIT_DEAD) -/* in tsk->state again */ -#define TASK_DEAD 64 -#define TASK_WAKEKILL 128 -#define TASK_WAKING 256 -#define TASK_PARKED 512 enum thread_state { THREAD_SLEEPING = 0, -- 2.41.0