Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp4778581pxb; Tue, 31 Aug 2021 13:08:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxwaXZDuo3X/RVUB9hCF90HGoglWx2/tQsOCQvKavXWsg8VDqczVetivrWpMGDDRSM5e4XF X-Received: by 2002:a17:906:eb0e:: with SMTP id mb14mr33609538ejb.481.1630440495750; Tue, 31 Aug 2021 13:08:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630440495; cv=none; d=google.com; s=arc-20160816; b=bwB6Jww0TSJVAwo13FHS7ip/sDaARlYCpki8Mds4zdwdhgSerplZ4HnLIqFNtMiSDp 5iG3j+w6+hlNulmGUmPmZr03FM7n3+4dxT9RVdnMO5lWg8qfXDQaKcJm2RJkdUr+WcPK x45eGaPGw4Pias8fmVzS4CSBieEjVYGbceK9HFQnzN6NW9Dw8CjYq8QGo6+sGUqo5yhr qHlCMun7S46s23o0y7wgNIK6bXX4oVaQyCbNuVzQAmbJ1vZ7k/2PV6mCHYcHFOvSMIbr mddxtti25ckEISIwkL+3Us6ivpGguU+fBxXP8iDWIJQJlFD/cX2IMF46dpiYNoCKCIVm QXkw== 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=2a0+5gzimHGGkFiiSYxvuWpP9V1HOW+VkOPMVm3jrFE=; b=VMD8SSktdDWNu7UlZefpJlHECwB5siBm33w7AchfKit4N1nuBFmMOjqi1Z76aMMwoy vmEKqGzU9CQI8o62erDkP/FfZ9svswY90rf1/Kl8kNimBdhF/+NaJSnCkIXxjeuYtQxy UKnKFgXEuJtmi3RnM3M+keX2hCcrFTSrBeqPQgOGm5wfsQw2L26SdzHL/RY59g//+WsZ 7KAQZGNR3rPxEiNcR1NNnT/TUQm4DxEJwiLZKPS+z1HPDQNjgpBKKqVIcSgImMtjjoFg QG4q4l5HLhi7qNuAHy2Z189nk9DH6Omkn+sMZdZarw7D46HzaSjOB9rbccvcqzA1cfgp hvLQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=FQcjRDld; 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 e17si1651973ejl.723.2021.08.31.13.07.52; Tue, 31 Aug 2021 13:08:15 -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=FQcjRDld; 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 S232434AbhHaUHJ (ORCPT + 99 others); Tue, 31 Aug 2021 16:07:09 -0400 Received: from mail.kernel.org ([198.145.29.99]:40008 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229476AbhHaUHI (ORCPT ); Tue, 31 Aug 2021 16:07:08 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 256316108B; Tue, 31 Aug 2021 20:06:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1630440373; bh=xrvKiHXhYI03XkknWcnBRe0wu5iG2lTHButTzM1ZtwE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=FQcjRDlduBYIPHCwtbtquYUWQAwyz1mnXHv1m813KLjFpOv3EAYfIEB01ZMzWLPAA vnga06UIcMK7xldwTnWdGSVXwFDXBmy21Nmo2CJsAKCegkmOIFh22CwWwLea4JL5X0 1RhgjEWQRcOtRU7mL2Jv8gK0+Q1zbzu0o7GAMpw93RY2z2gaTzOsQDHLcnmd6wi2uP ltm4EgHsDc8WUY7QsmjuLeF7dJYUIAgESL4lRJ2D0VFGO7J+D5q/snaWuIYUwVb+vJ ia/TV/6Spg/6/flpaZIqCxG5sMrQVkqX83uzQ9mU3L0DeNQlug9rNz08j0jHSTwWDy WQYf2r2h1Hovg== Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id 03F884007E; Tue, 31 Aug 2021 17:06:09 -0300 (-03) Date: Tue, 31 Aug 2021 17:06:09 -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 27/37] perf evlist: add evlist__for_each_entry_from macro Message-ID: References: <2386505f8b598adf0dbcd04ec21804c6bcf00826.1629490974.git.rickyman7@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2386505f8b598adf0dbcd04ec21804c6bcf00826.1629490974.git.rickyman7@gmail.com> 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:33AM +0200, Riccardo Mancini escreveu: > This patch adds a new iteration macro for evlist that resumes iteration > from a given evsel in the evlist. > > This macro will be used in the next patch Thanks, applied. - Arnaldo > Signed-off-by: Riccardo Mancini > --- > tools/perf/util/evlist.h | 16 ++++++++++++++++ > 1 file changed, 16 insertions(+) > > diff --git a/tools/perf/util/evlist.h b/tools/perf/util/evlist.h > index 5f24a45d4e3cf30a..b0c2da0f9755b2d1 100644 > --- a/tools/perf/util/evlist.h > +++ b/tools/perf/util/evlist.h > @@ -275,6 +275,22 @@ void evlist__to_front(struct evlist *evlist, struct evsel *move_evsel); > #define evlist__for_each_entry_continue(evlist, evsel) \ > __evlist__for_each_entry_continue(&(evlist)->core.entries, evsel) > > +/** > + * __evlist__for_each_entry_from - continue iteration from @evsel (included) > + * @list: list_head instance to iterate > + * @evsel: struct evsel iterator > + */ > +#define __evlist__for_each_entry_from(list, evsel) \ > + list_for_each_entry_from(evsel, list, core.node) > + > +/** > + * evlist__for_each_entry_from - continue iteration from @evsel (included) > + * @evlist: evlist instance to iterate > + * @evsel: struct evsel iterator > + */ > +#define evlist__for_each_entry_from(evlist, evsel) \ > + __evlist__for_each_entry_from(&(evlist)->core.entries, evsel) > + > /** > * __evlist__for_each_entry_reverse - iterate thru all the evsels in reverse order > * @list: list_head instance to iterate > -- > 2.31.1 -- - Arnaldo