Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp3621092rwl; Sun, 9 Apr 2023 20:50:27 -0700 (PDT) X-Google-Smtp-Source: AKy350ZEq7R3wtC0BXT8KgU+fFsN+B+U00vQu0bF1GhKDhd0kcPSqTKqWRT3FW99KY2Wx+RH6r5/ X-Received: by 2002:a17:906:7f0f:b0:94a:7495:4087 with SMTP id d15-20020a1709067f0f00b0094a74954087mr2758052ejr.13.1681098627741; Sun, 09 Apr 2023 20:50:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681098627; cv=none; d=google.com; s=arc-20160816; b=SANfDSJI53oGOszauy06YY0Bqu41cwv1qeu7nteZJL/WG5pvYlJrswzHfHD+WdpyvQ 7isHYMA0r+5mfwpenrnQIDh4ZW48sD0zOE7XGJcuL+lgLGXIJFPqXzA8ZZ2t+kd0g7m9 gIm03WacWneNH+QZjlHB+VIjZpQ4xmQ8l5nBwjZTukpSQJi68tgJ9RGPk5GgNLrxr/ov Uydqb7XJyfVHF+clNf1f3YSfVxZMEf3dq0quHPbj1v3VrmibCU1k8HGIUKtVqfEgwU9U rWk7Ddab6ippi6EFJ6JYCXVrzPcy6BQ3BEo42bBlVZ9hd8MX1jaPGBGXOcpKUDMROAPL Dcmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:subject:user-agent:mime-version:date:message-id; bh=i65gQlMziYsLbD8txmbiZjQLT8IEy0eA76B1daQxUTQ=; b=jF6A4GGY45oyNhAuwTm5GYmE5gyFYQ0bX1vXMx7/GMVOdpZIBeq3TbnAh8TEGF7FHR 9YwjsVxirVKBdtqeu6x7uZHKBTaXXYHBIx5BGXny5SlQ2rY1uLSDkn1WCRsMdGBSuINn VszOT3hYmZneNX1s6FznJeTm9ze8PkA/O+OpQbze1qtq8XN3kUV4WL5/xpr5dOELGf9R VJljDLAe7Kd80bOBvj3UeF54SYsIuBe1GERr2IFf/iharLKf78lx5uF1MzXidxXhgP+C EtDMye7IRR1eM/dJlmyiJBLTcqNqKRfdc/cRKg0/skqsOUGroufgVFiE4/OtBJfHpRoF j+Ow== 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 he10-20020a1709073d8a00b008c1d4ed00d3si8824477ejc.792.2023.04.09.20.49.59; Sun, 09 Apr 2023 20:50: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; 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 S229566AbjDJDiO (ORCPT + 99 others); Sun, 9 Apr 2023 23:38:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37256 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229475AbjDJDiM (ORCPT ); Sun, 9 Apr 2023 23:38:12 -0400 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3F126269D; Sun, 9 Apr 2023 20:38:11 -0700 (PDT) Received: from kwepemm600006.china.huawei.com (unknown [172.30.72.53]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4Pvvj35wCYzSrPg; Mon, 10 Apr 2023 11:34:15 +0800 (CST) Received: from [10.174.177.30] (10.174.177.30) by kwepemm600006.china.huawei.com (7.193.23.105) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23; Mon, 10 Apr 2023 11:38:07 +0800 Message-ID: Date: Mon, 10 Apr 2023 11:38:07 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.9.0 Subject: Re: [PATCH v2] perf top: expand the range of multithreaded phase To: Hangliang Lai , CC: , , , , , , , , , , , , References: <20230410025808.2008-1-laihangliang1@huawei.com> From: "Wenyu Liu(D)" In-Reply-To: <20230410025808.2008-1-laihangliang1@huawei.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-Originating-IP: [10.174.177.30] X-ClientProxiedBy: dggems702-chm.china.huawei.com (10.3.19.179) To kwepemm600006.china.huawei.com (7.193.23.105) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-5.2 required=5.0 tests=NICE_REPLY_A, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 Hello,I think Namhyung means only make it multi-threaded unconditionally after the synthesize a patch like this: --- tools/perf/builtin-top.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c index d4b5b02bab73..60d00975b881 100644 --- a/tools/perf/builtin-top.c +++ b/tools/perf/builtin-top.c @@ -1273,8 +1273,7 @@ static int __cmd_top(struct perf_top *top) top->evlist->core.threads, true, false, top->nr_threads_synthesize); - if (top->nr_threads_synthesize > 1) - perf_set_singlethreaded(); + perf_set_multithreaded(); if (perf_hpp_list.socket) { ret = perf_env__read_cpu_topology_map(&perf_env); -- Right? Thanks, Wenyu 在 2023/4/10 10:58, Hangliang Lai 写道: > Thanks for your reply Kim , > > > > On 2023-04-07 21:21 you wrote: > > > >> Not always, the synthesis can run in a single thread. > > > > But I think in machine__synthesize_threads, there are thread_nr threads will be created to do synthesize_threads_worker(tools/perf/util/synthetic-events.c:970) > > > > It’s not a single thread part. So we're supposed to call perf_set_multithreaded() before synthesize? > > > > Thanks, > > Hangliang Lai > > >