Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp117485ybx; Wed, 30 Oct 2019 12:14:01 -0700 (PDT) X-Google-Smtp-Source: APXvYqzjTMCgx/+6bpjoptTh4jdr1rQZmCKKHMmpJTJPezs7HHsT5+BqIgUznMoIMj63UKpWA6LB X-Received: by 2002:a17:906:c82e:: with SMTP id dd14mr1208243ejb.310.1572462841480; Wed, 30 Oct 2019 12:14:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572462841; cv=none; d=google.com; s=arc-20160816; b=STvEe7ubHoGeCkTgBkKId90Z5v65vRPUrMZGtzglbpq9nHoErEZf2qGQ73+Unuw6A5 3Q3BqPUz+xWcRUf2bbcJ/3NIXDdW7axiuCUrGnLIOxyOgJHPOcg/LCSRBVXwvP9kWO5X unwPaiaWvlsIWz+diczPedhoA6F5C1oStw8UeSRhxIF8McZpql/XeCZb3jshAU1IFLhI jjKtqiKE3jFTSZmUOiLO8U+LJwiDQ81v+0O2l86WV4epHEcDLjjxBiRfhkdl/SwKJoiv s/1njyAtRfqEIxme7nnSg3P0jeXu7Qj5tj/h7niaYQYaLcjsCdjX6s4dcorx4viKHprX bERA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=61sV24rPpLffJ9JnPImwgK57hxW4z4H0K0t5d32gqxQ=; b=emmZo8VnxqQzdE1GGlY4b+QETsbu+QrV0GcMBq6VLGGYULWzxJuILS/FEA7N7LaSgN IuZfU6VkVC0DmREfQYTn5zBdapiLtSzVsqQ0/nmrQ4Xw0xm0l3Z0x5JLHgCItFMY4d9a 2ms82pEyzOMDPyhPjaZ1szsWcDcEt3susTDPkpITX3s75my6n4VuPV34qfdq5Nrrhcwk CP4TcuXa2RbNVXeCRFRdJnvc6W9FV0w7LMY38U2/kYrTnISeR8n1NlQoVL1x8pkKo3tI jaQW3RfMsLJS12EEds0aFI2MM/jxKORyz1nTb1+M+HlHja+EsFRrxIRhhAUDu9V/GFNi B5RA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@firstfloor.org header.s=mail header.b=vLJPm3DV; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d7si2243664eda.429.2019.10.30.12.13.37; Wed, 30 Oct 2019 12:14:01 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@firstfloor.org header.s=mail header.b=vLJPm3DV; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726675AbfJ3TDb (ORCPT + 99 others); Wed, 30 Oct 2019 15:03:31 -0400 Received: from one.firstfloor.org ([193.170.194.197]:35448 "EHLO one.firstfloor.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726261AbfJ3TDb (ORCPT ); Wed, 30 Oct 2019 15:03:31 -0400 Received: by one.firstfloor.org (Postfix, from userid 503) id ECFE98675A; Wed, 30 Oct 2019 20:03:28 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=firstfloor.org; s=mail; t=1572462208; bh=mYGzCanGJbm0EEw0nfPmJ1uAjjZgWBai/S1s0YfyrI8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=vLJPm3DVd6ULcfZOpqisGNldgvSmKHIATLy09mAQgF8J9YTva0JSoCfaHyhg+yyni F2DMWum494N3b3syeNqBcWjh9vahpBJfEXSEkiR/WdOyaxchezg/atkNHadsMSYrkw mkex/WXnUQGGvTm5iDKsGNuA034fkVepl8PWze+o= Date: Wed, 30 Oct 2019 12:03:28 -0700 From: Andi Kleen To: Jiri Olsa Cc: Andi Kleen , acme@kernel.org, jolsa@kernel.org, eranian@google.com, linux-kernel@vger.kernel.org, Andi Kleen Subject: Re: [PATCH v3 3/7] perf evsel: Add iterator to iterate over events ordered by CPU Message-ID: <20191030190328.fhsv7e2fqqvfpsit@two.firstfloor.org> References: <20191025181417.10670-1-andi@firstfloor.org> <20191025181417.10670-4-andi@firstfloor.org> <20191030100606.GG20826@krava> <20191030155108.taqo2kbuaro3idhe@two.firstfloor.org> <20191030181552.GM20826@krava> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191030181552.GM20826@krava> User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > > > The exists evlist->cpus cannot be used (I tried that) > > I also don't think we have an existing function to merge > > two maps, so that would need to be added to create it. > > Just using ->cpu_index is a much simpler change. > > I dont think that would be lot of code > and it would simplify this one AFAIK they're not guaranteed to be sorted, which makes merging complicated. I'm not sure it's safe to just sort existing maps because someone might have a index. So you'll need to create temporary maps, sort them and then merge. Won't be simple. -Andi