Received: by 2002:a05:7412:b10a:b0:f3:1519:9f41 with SMTP id az10csp3033244rdb; Mon, 4 Dec 2023 14:55:59 -0800 (PST) X-Google-Smtp-Source: AGHT+IGYfp/nzAZQKwX7+ZQerLef2oDNqtCvKpycFyaMr3eTkH9DNkji8TpX/G85JDFKCpuwfnB/ X-Received: by 2002:a17:902:da8e:b0:1d0:b944:6344 with SMTP id j14-20020a170902da8e00b001d0b9446344mr1276166plx.28.1701730559025; Mon, 04 Dec 2023 14:55:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701730559; cv=none; d=google.com; s=arc-20160816; b=P3FW5pbcXEusYa+rbcGh5DUxvTcJWUug6OFHwFHXLhg/0cPmwDa2KTAU1R9N/MhGou mZlhxsDOJEdmzbmUYokD8ARqQqdUVc1ZWj8Kj5bTz6/ysD5hlyBcPCrYHb+DQkD5THuN umQl2yInErafGdiNhFleL7PH7Towciu89tujbO7KZ6v34LViD2iIU6uBSLt1De0FxSd3 Gqh6/NgIphyNet893ZOYfj8v+Dl5hvtFkUhXXVcRbe4SeAgldwFH9XJgS0xwwiE0Fv/Z oravu9HlWpRraemT85GFn0vFfj3gQOVNem2KImU3A6wshrwbif1vai5DA4UQY60mvL6H 514A== 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; bh=iRSj4yrjcVVcSI5VQfGUIqXj1PE3pmy4LzHEEAiZDs4=; fh=fxBVwwRPTfSSTIyhcQ8VriVGsEn4JpkDKM6Hpr9yTTI=; b=Qbv53cHqzrE5s4C8qM6ymiKc+5FCDnO3nTDC+cmYn2Wgksjp8F+FAb4cpgifZy4qPh m7zEUCF9+INYRzbnEQ/7690GIE2y6q3zDMLHgSfDsrDmRXv99Z5QtfKJavpWJ64L+Vyi rglxMi4teLh9i6wGBIgI2z/6TKFiqHFl74be+T/BATz9q6KCr+VpvtrgjzqU/+Efko5q QLJbmOnHWvYpusnWwndMNBYg7Ogkl23i+j5ZJt7tKL3lHqemr7A46C/HNMNOemR9wNF4 vCqFLkYGuLkNXVF+R3aRlVo0kJA58vF/MzGlp+dvYQRdzA5bqdEMdD0D0r7ljPDIDU8H 2Q/g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id z24-20020a1709028f9800b001d07603a4d8si3921963plo.653.2023.12.04.14.55.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Dec 2023 14:55:59 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id E6F4A80658D9; Mon, 4 Dec 2023 14:55:34 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234279AbjLDWzR convert rfc822-to-8bit (ORCPT + 99 others); Mon, 4 Dec 2023 17:55:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53788 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229668AbjLDWzQ (ORCPT ); Mon, 4 Dec 2023 17:55:16 -0500 Received: from mail-pg1-f177.google.com (mail-pg1-f177.google.com [209.85.215.177]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 42CBFAF; Mon, 4 Dec 2023 14:55:21 -0800 (PST) Received: by mail-pg1-f177.google.com with SMTP id 41be03b00d2f7-5c5fb06b131so1662585a12.0; Mon, 04 Dec 2023 14:55:21 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701730521; x=1702335321; 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=xVV07nHBbObR6oNHhv6jwsG37mtIP+qloEPUmn0BS1A=; b=pA8cavX8/zxZIFONo7Y3GRI/XSStKLtSvjZbynCjtDZKnfA3PZFn463cyFzBCgCux+ ybSUtmo+O0lPSKEhWSwUDUojv+5N1X+0War0OA0q4R3KdZ/7zKBC1BxyANjDuxhSZqui bOgu9CQST9ehwSID2xDDX+OiAIqMc2NfYiUGhenacWfUt3p5EEFIB3xv9dr4GdTiHGN/ guNkkNL+RdqB3GZCJrHV/Y3mCwvSKtJe2jHxotYZAqel8gzUO/g93bHX5o8rOibpR2Cy 8CwFS5hrBjZe6ZR347CDC5BVa8q6IMo7uRSPAKtPMbbJCC9O+cbqtSPmG+lMTMRJ+7BO 9glg== X-Gm-Message-State: AOJu0YxfT/3ZmLEK1dj6z4yAH1k4RYwKfDX03XCk1vj6C/tDcDfwghCO +PiHUvf7O75rkBqxj6jHXC7YF1xxBveuDDKxuKI= X-Received: by 2002:a05:6a20:7f98:b0:188:290d:17dc with SMTP id d24-20020a056a207f9800b00188290d17dcmr2592869pzj.60.1701730520632; Mon, 04 Dec 2023 14:55:20 -0800 (PST) MIME-Version: 1.0 References: <20231121000420.368075-1-irogers@google.com> In-Reply-To: From: Namhyung Kim Date: Mon, 4 Dec 2023 14:55:09 -0800 Message-ID: Subject: Re: [RFC PATCH v2] perf evsel: Fallback to task-clock when not system wide To: Ian Rogers Cc: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Adrian Hunter , Kan Liang , Yang Jihong , Leo Yan , Sandipan Das , Ravi Bangoria , linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org, Ajay Kaher , Alexey Makhalov Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Mon, 04 Dec 2023 14:55:35 -0800 (PST) On Mon, Dec 4, 2023 at 8:02 AM Ian Rogers wrote: > > On Mon, Nov 20, 2023 at 4:04 PM Ian Rogers wrote: > > > > When the cycles event isn't available evsel will fallback to the > > cpu-clock software event. task-clock is similar to cpu-clock but only > > runs when the process is running. Falling back to cpu-clock when not > > system wide leads to confusion, by falling back to task-clock it is > > hoped the confusion is less. > > > > Pass the target to determine if task-clock is more appropriate. Update > > a nearby comment and debug string for the change. > > > > --- > > v2. Use target__has_cpu as suggested by Namhyung. > > https://lpc.events/event/17/contributions/1556/ > > > > Signed-off-by: Ian Rogers Acked-by: Namhyung Kim Thanks, Namhyung