Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp6371rwn; Wed, 7 Sep 2022 18:45:56 -0700 (PDT) X-Google-Smtp-Source: AA6agR7JE8JpodwomAiRYZwymaqyjk+HZ5b/xEeU4vxvQuOeZ9q6F3y5XdC3WHqD8a/reD+wxOf/ X-Received: by 2002:a17:902:d50e:b0:176:e777:59c4 with SMTP id b14-20020a170902d50e00b00176e77759c4mr6221196plg.82.1662601556268; Wed, 07 Sep 2022 18:45:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662601556; cv=none; d=google.com; s=arc-20160816; b=rI1InPayJqjws2icnLu2Kxa3pXN23fNnXZbOYG69C2C6Z3I4Zgxww3Mwo2Tqt6/P4q UHFP8DCpCVWYdcVnqoJyj8BprYRHcGED6I+DccP+dWhOT8q+6I0Kt0jbDsa5HNBci54+ 5MAomVWZDJPvxEDlTnuTyRBVkkxID9k+X9Ie5/tHph34q6hF6Wox/Cf5InTY93hGhgao TkCwlBw5hS75X9+iD6qzBKUNwVlC+4q/hnnO9geWOHVNGKKfFe/qlRS5dpwoa6YYhpIy Gg66Z7CWhT05TP58ryEDtU4Ch260r2tTXuEYcIx4gsq9GYBZeDQrdXb/xSm3toUTw6tY oJWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from; bh=aFritTNvRR4P1RC7Bc/8FCizHH/aakvs8cfbsayrhNA=; b=QLNjNgGAwPhW97a7/svpPduEhX6DOuRQUTL9sNhQzFIoCaX25TuKhZMxfN7nN/o9m1 t3RatrKeoNhJkVbwXfIWZ9p3QDIsmVMi5+VYIT73Z83fL+afQt06Mmv40IZ2NU20Vnns xzUaak5khrLBVWIU1bG7UBv9tD4tdm9Ruyxk+xG+YphS/zWL3i9h2WwC/UIr2aHAb7Iq cTs7PjR6x3CH0AC0VgFWx/q07jKt0j/ntO27ItqmKyuFlTPbcZq/oyTjejDKysjuJ0FF 5xitEpX5+oZyKY3Y7l2ZpZv4L/35vneQALv+awkN89xwpqdtdkVwNMknU/9IuLfjB5mk XdcA== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b4-20020a630c04000000b0043541f025a7si1351968pgl.595.2022.09.07.18.45.45; Wed, 07 Sep 2022 18:45:56 -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; 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=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229771AbiIHBhG (ORCPT + 99 others); Wed, 7 Sep 2022 21:37:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37810 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229508AbiIHBhE (ORCPT ); Wed, 7 Sep 2022 21:37:04 -0400 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AC3B4C6CF5; Wed, 7 Sep 2022 18:37:02 -0700 (PDT) Received: from dggemv704-chm.china.huawei.com (unknown [172.30.72.53]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4MNM870B20zkWvl; Thu, 8 Sep 2022 09:33:11 +0800 (CST) Received: from kwepemm600008.china.huawei.com (7.193.23.88) by dggemv704-chm.china.huawei.com (10.3.19.47) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Thu, 8 Sep 2022 09:37:00 +0800 Received: from huawei.com (10.175.100.227) by kwepemm600008.china.huawei.com (7.193.23.88) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Thu, 8 Sep 2022 09:36:59 +0800 From: Shang XiaoJing To: , , , , , , , , CC: Subject: [PATCH 0/4] perf: Clean up by adding helpers Date: Thu, 8 Sep 2022 10:11:37 +0800 Message-ID: <20220908021141.27134-1-shangxiaojing@huawei.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.175.100.227] X-ClientProxiedBy: dggems703-chm.china.huawei.com (10.3.19.180) To kwepemm600008.china.huawei.com (7.193.23.88) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, 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 Some clean up in builtin-lock.c, builtin-timechart.c, and builtin-trace.c. Shang XiaoJing (4): perf trace: Use zalloc to save initialization of syscall_stats perf lock: Add get_key_by_aggr_mode helper perf timechart: Add create_pidcomm helper perf timechart: Add p_state_end helper tools/perf/builtin-lock.c | 129 ++++++++++++++------------------- tools/perf/builtin-timechart.c | 65 +++++++++-------- tools/perf/builtin-trace.c | 5 +- 3 files changed, 88 insertions(+), 111 deletions(-) -- 2.17.1