Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp4995284ybi; Tue, 30 Jul 2019 11:50:15 -0700 (PDT) X-Google-Smtp-Source: APXvYqxIm737VQ3G6MacRKWrWGnzhaRayuBAzu2B6W0ovTmT0CqIm3p2zVtVzmCv8zac5154rkkE X-Received: by 2002:a17:90a:cb01:: with SMTP id z1mr3524458pjt.93.1564512615859; Tue, 30 Jul 2019 11:50:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564512615; cv=none; d=google.com; s=arc-20160816; b=hmEJAImOTLDfoYcPFm1oIKG0M+VilqLRhjltFWby6DaqLXMFJ0ETzE23XUfxRdLj9T iVInSrFYaDxM+NJ+2//sXYH9isnb742jod3QzsxoHv7R383xEnIEWZfia0wkbHxz4yRl CK3xJ5FBRdC9gvjA+OPZY/6Yifg7fvcFDLDzeCBt88JWmrHR4NhKkm3YHr5r+gaZc1oi h1pCBvSkHr7VQ/YQs/g8FUnW20ZpXwFjcxKAbkluR08VAdMxXPF9ntWH/meKbzObRIpQ RG/uVs5uP5ArvuZ/PM2Vwlfe3vKNHkHGVsLBVvwcuMyfYD+H26GS9aJWRQWFsN/5stLC d8qA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-disposition :content-transfer-encoding:mime-version:robot-unsubscribe:robot-id :git-commit-id:subject:to:references:in-reply-to:reply-to:cc :message-id:from:date:dkim-signature:dkim-filter; bh=bCdFtbl9rLVZRmw/ALUKM6Lv8KXBqJ0jF+YzBICirOE=; b=NwgZvL5pGWjhpXvlV7nkHhCbWigZSmhnrjayuxsIGUbIpopnGtfqwDCf7jA1aYBJzc 3hL5WGYf1pUG9Rsj76+KVSMTJHH6cBgwNm9Z3f3JieFneghXd76c6wnGBxxIOq98BTMc pJ/ltYJLZlNpW2sw1idusozDdpCZMQpavIQMr2nQsrAneEy46c7te7jY1WOJMLW4f7jd MUfYOjZZYlTlClRYOL3JmGrA4TOlAVBv7quxl84Uxq35iy1jlQNBDOvNSoZgpJuOwPs+ 3EDo6c6LPhbYqe8TxEYLqbchzIKROQj3c/lUkAjdpA1JPtQ6t38QjORNyCVUB77YokEq hsVA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@zytor.com header.s=2019071901 header.b=WTWAeZb9; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zytor.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c1si26997435plr.405.2019.07.30.11.50.00; Tue, 30 Jul 2019 11:50:15 -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=@zytor.com header.s=2019071901 header.b=WTWAeZb9; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zytor.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388379AbfG3SsK (ORCPT + 99 others); Tue, 30 Jul 2019 14:48:10 -0400 Received: from terminus.zytor.com ([198.137.202.136]:51325 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388028AbfG3SsJ (ORCPT ); Tue, 30 Jul 2019 14:48:09 -0400 Received: from terminus.zytor.com (localhost [127.0.0.1]) by terminus.zytor.com (8.15.2/8.15.2) with ESMTPS id x6UIkufc3334995 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Tue, 30 Jul 2019 11:46:56 -0700 DKIM-Filter: OpenDKIM Filter v2.11.0 terminus.zytor.com x6UIkufc3334995 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zytor.com; s=2019071901; t=1564512417; bh=bCdFtbl9rLVZRmw/ALUKM6Lv8KXBqJ0jF+YzBICirOE=; h=Date:From:Cc:Reply-To:In-Reply-To:References:To:Subject:From; b=WTWAeZb9TLRl1NtOW2h/MMv9fcApizsDe7yem6VdvKRzxi+6Uf/gkUVTyFoZhvbuI mgoD4Qt73j8OmE8vt0zWPCQwIFsOq8ibeTXaK1RRXLghdjbOoFt8xkJAfutkQgG9jv kem5Cqn637URLsfKGr/zBdZ5Hhjsdj/H7MLSqtYBUpGEZ2te+UGdNw2AWcv9MMH3Oc jAH2KpvKvJRuKBIsiECxtuTcptXx2WMeAz8YZrjeoYh/6J7MxP18o7y0bPiqfQyexx 4RUIIGI/VEvFdQSLPL4Hl7iBfq2VNlj8evJpnXAb4dWa0m/5oZXTvqYco6P61ev0Uw NwwkI/wf3mk6A== Received: (from tipbot@localhost) by terminus.zytor.com (8.15.2/8.15.2/Submit) id x6UIkuAP3334992; Tue, 30 Jul 2019 11:46:56 -0700 Date: Tue, 30 Jul 2019 11:46:56 -0700 X-Authentication-Warning: terminus.zytor.com: tipbot set sender to tipbot@zytor.com using -f From: tip-bot for Jiri Olsa Message-ID: Cc: jolsa@kernel.org, hpa@zytor.com, mpetlan@redhat.com, namhyung@kernel.org, linux-kernel@vger.kernel.org, mingo@kernel.org, alexey.budankov@linux.intel.com, peterz@infradead.org, alexander.shishkin@linux.intel.com, tglx@linutronix.de, ak@linux.intel.com, acme@redhat.com Reply-To: alexey.budankov@linux.intel.com, alexander.shishkin@linux.intel.com, peterz@infradead.org, ak@linux.intel.com, acme@redhat.com, tglx@linutronix.de, mingo@kernel.org, linux-kernel@vger.kernel.org, mpetlan@redhat.com, namhyung@kernel.org, jolsa@kernel.org, hpa@zytor.com In-Reply-To: <20190721112506.12306-54-jolsa@kernel.org> References: <20190721112506.12306-54-jolsa@kernel.org> To: linux-tip-commits@vger.kernel.org Subject: [tip:perf/core] libperf: Add has_user_cpus to struct perf_evlist Git-Commit-ID: ec903f264f0184a0aba62b42d7717c61f1893450 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline X-Spam-Status: No, score=-0.2 required=5.0 tests=ALL_TRUSTED,BAYES_00, DATE_IN_FUTURE_96_Q,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on terminus.zytor.com Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: ec903f264f0184a0aba62b42d7717c61f1893450 Gitweb: https://git.kernel.org/tip/ec903f264f0184a0aba62b42d7717c61f1893450 Author: Jiri Olsa AuthorDate: Sun, 21 Jul 2019 13:24:40 +0200 Committer: Arnaldo Carvalho de Melo CommitDate: Mon, 29 Jul 2019 18:34:45 -0300 libperf: Add has_user_cpus to struct perf_evlist Move has_user_cpus from tools/perf's evlist to libbperf's perf_evlist struct. Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: Alexey Budankov Cc: Andi Kleen Cc: Michael Petlan Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20190721112506.12306-54-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/lib/include/internal/evlist.h | 1 + tools/perf/util/evlist.c | 4 ++-- tools/perf/util/evlist.h | 1 - 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/perf/lib/include/internal/evlist.h b/tools/perf/lib/include/internal/evlist.h index a12c712a9197..9964e4a9456e 100644 --- a/tools/perf/lib/include/internal/evlist.h +++ b/tools/perf/lib/include/internal/evlist.h @@ -5,6 +5,7 @@ struct perf_evlist { struct list_head entries; int nr_entries; + bool has_user_cpus; }; #endif /* __LIBPERF_INTERNAL_EVLIST_H */ diff --git a/tools/perf/util/evlist.c b/tools/perf/util/evlist.c index 5ce8fc730453..23a8ead4512f 100644 --- a/tools/perf/util/evlist.c +++ b/tools/perf/util/evlist.c @@ -159,7 +159,7 @@ static void __perf_evlist__propagate_maps(struct evlist *evlist, * We already have cpus for evsel (via PMU sysfs) so * keep it, if there's no target cpu list defined. */ - if (!evsel->core.own_cpus || evlist->has_user_cpus) { + if (!evsel->core.own_cpus || evlist->core.has_user_cpus) { perf_cpu_map__put(evsel->core.cpus); evsel->core.cpus = perf_cpu_map__get(evlist->cpus); } else if (evsel->core.cpus != evsel->core.own_cpus) { @@ -1095,7 +1095,7 @@ int perf_evlist__create_maps(struct evlist *evlist, struct target *target) if (!cpus) goto out_delete_threads; - evlist->has_user_cpus = !!target->cpu_list; + evlist->core.has_user_cpus = !!target->cpu_list; perf_evlist__set_maps(evlist, cpus, threads); diff --git a/tools/perf/util/evlist.h b/tools/perf/util/evlist.h index 17dd83021a79..35cca0242631 100644 --- a/tools/perf/util/evlist.h +++ b/tools/perf/util/evlist.h @@ -31,7 +31,6 @@ struct evlist { int nr_groups; int nr_mmaps; bool enabled; - bool has_user_cpus; size_t mmap_len; int id_pos; int is_pos;