Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp4760882pxb; Tue, 31 Aug 2021 12:38:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzy6ek1tZRzNOHFZ2nXfLqHTyM6w3t/1eVJw0lgMjVAtwFiYvi36UYmz87QxQohq13FmDUq X-Received: by 2002:a17:906:2c5a:: with SMTP id f26mr17343173ejh.205.1630438724457; Tue, 31 Aug 2021 12:38:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630438724; cv=none; d=google.com; s=arc-20160816; b=vsIsddTlwkHrDFFBf91hhkfeyYg0uhjN7MGRKU6P8CiWEvshPEgxamR0wgj7OWnZAO wdmwYAoW7CBNpylSQCpoFic8hSLDACHcuf8ORPeMs8RhUTLxt3fNFMQPDGjGtLHZw73x 5gJV3FpgiEaqyWQlvOVfIV4xsnOXTJF2t+sy0PFjH+axPGMb4qxsEU8qyeAaSIiP2c4+ Cmg6IT9QBvOev45WAKJRZpYd1eENZ4J5k5+7z7aM+YIgYUK0RbDuwcA73WIZ/PCMJxyC gNzZnaNi8FeSYdJF5ZeDGc9bmT9bEZW8+vib68V5q0+4DZzirqk8n8i4Fdu/vIhiX/HW rJcw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=0z5hV/sVB4fC6dGPX1ndmTMWCCPSln2PlkkOhouRrLo=; b=HzfIirj4cd+1O45So380PPnHgLpQ+M0x/ceewqi/K8TKsbHOJlD+I1GYTGWuBFvs/S zON2zO9UxEdYOnfW5m8INRCxbRv54QTazfb9axmO82jdXvRlQYYySZ/jvXVrmtA8VJfr /lhxw4i1tOiSPI5cyZb/UC7S+AG+kf7EK+PDlp/cRpLJYPZp6ur62o7IgiN3ZvUFPofh ZZZ/2wCQwOIgX+N+5PuVxt4tbV98/2C+3uID6vRmq+1r6PqyDt23rubbNabourVIVAgA qo5fh0j1zMF+ojfoSAKCf6VIdgSCSydf0/6Yyt/Zau2bH3eQ3Edukud2C1KusvYahQIj 8xzA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=JUV2gWTY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c2si18753924eds.210.2021.08.31.12.38.21; Tue, 31 Aug 2021 12:38:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=JUV2gWTY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240923AbhHaThh (ORCPT + 99 others); Tue, 31 Aug 2021 15:37:37 -0400 Received: from mail.kernel.org ([198.145.29.99]:46740 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240907AbhHaThf (ORCPT ); Tue, 31 Aug 2021 15:37:35 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id D48E860FE8; Tue, 31 Aug 2021 19:36:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1630438600; bh=Bdd2AUfHZRkDnkxyysbUypVEneghpA+reSd88K+srqk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=JUV2gWTYfGktXIAjOfRBzWNrKiB4FZqdwoSeyCTguLsxhymvyj+cdiz77bHHKy7CS D1uMYw7CwNX9LUxk8E65djo1YhJzV86CYLClu9eYaMlA4yd//dhSMY36c52J7N/+cJ juxdIOS30IeIp/eTxC2OnmXIvsqXJFBzXWBoLoOJgCgvEtTXaeDFeuWqoEosMN+YSg bhvTHL3rVZSp4Q42/crpZU73Ar5/NJXr0Ylc+tibNj1S/S5TNoe6+0Vw2tnW9nD5FI XOIR4pthQJ77+bQYSX6CaC6QBHM/Bul8KjhdLtSwqFbJfAcmSFGW0qUEezDgVxMUzo gjOGprnWKAT8Q== Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id A0E8F4007E; Tue, 31 Aug 2021 16:36:37 -0300 (-03) Date: Tue, 31 Aug 2021 16:36:37 -0300 From: Arnaldo Carvalho de Melo To: Riccardo Mancini Cc: Ian Rogers , Namhyung Kim , Peter Zijlstra , Ingo Molnar , Mark Rutland , Jiri Olsa , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org Subject: Re: [RFC PATCH v1 18/37] perf evsel: add evsel__prepare_open function Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Url: http://acmel.wordpress.com Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Sat, Aug 21, 2021 at 11:19:24AM +0200, Riccardo Mancini escreveu: > This function will prepare the evsel and disable the missing features. > It will be used in one of the following patches. Applied, fixed up this: int evsel__prepare_open(struct evsel *evsel, struct perf_cpu_map *cpus, struct perf_thread_map *threads) I.e. the alignment of the second line with parms, please use this form in your next patches. - Arnaldo > Signed-off-by: Riccardo Mancini > --- > tools/perf/util/evsel.c | 14 ++++++++++++++ > tools/perf/util/evsel.h | 2 ++ > 2 files changed, 16 insertions(+) > > diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c > index f0bc89f743915800..4e9a3e62075305f1 100644 > --- a/tools/perf/util/evsel.c > +++ b/tools/perf/util/evsel.c > @@ -1827,6 +1827,20 @@ static void evsel__disable_missing_features(struct evsel *evsel) > evsel->core.attr.sample_id_all = 0; > } > > +int evsel__prepare_open(struct evsel *evsel, struct perf_cpu_map *cpus, > + struct perf_thread_map *threads) > +{ > + int err; > + > + err = __evsel__prepare_open(evsel, cpus, threads); > + if (err) > + return err; > + > + evsel__disable_missing_features(evsel); > + > + return err; > +} > + > static int evsel__open_cpu(struct evsel *evsel, struct perf_cpu_map *cpus, > struct perf_thread_map *threads, > int start_cpu, int end_cpu) > diff --git a/tools/perf/util/evsel.h b/tools/perf/util/evsel.h > index 1c0057e80d080f2f..58aa998e1814ac9e 100644 > --- a/tools/perf/util/evsel.h > +++ b/tools/perf/util/evsel.h > @@ -286,6 +286,8 @@ int evsel__open_per_thread(struct evsel *evsel, struct perf_thread_map *threads) > int evsel__open(struct evsel *evsel, struct perf_cpu_map *cpus, > struct perf_thread_map *threads); > void evsel__close(struct evsel *evsel); > +int evsel__prepare_open(struct evsel *evsel, struct perf_cpu_map *cpus, > + struct perf_thread_map *threads); > > struct perf_sample; > > -- > 2.31.1 -- - Arnaldo