From patchwork Mon Oct 26 11:41:59 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wang Nan X-Patchwork-Id: 55532 Delivered-To: patch@linaro.org Received: by 10.112.59.35 with SMTP id w3csp1155302lbq; Mon, 26 Oct 2015 04:52:21 -0700 (PDT) X-Received: by 10.68.69.107 with SMTP id d11mr22078634pbu.24.1445860341097; Mon, 26 Oct 2015 04:52:21 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ud7si52705565pab.185.2015.10.26.04.52.20; Mon, 26 Oct 2015 04:52:21 -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; 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 S1753801AbbJZLwS (ORCPT + 28 others); Mon, 26 Oct 2015 07:52:18 -0400 Received: from szxga02-in.huawei.com ([119.145.14.65]:30429 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753485AbbJZLwR (ORCPT ); Mon, 26 Oct 2015 07:52:17 -0400 Received: from 172.24.1.48 (EHLO SZXEML423-HUB.china.huawei.com) ([172.24.1.48]) by szxrg02-dlp.huawei.com (MOS 4.3.7-GA FastPath queued) with ESMTP id CVB59619; Mon, 26 Oct 2015 19:42:21 +0800 (CST) Received: from linux-4hy3.site (10.107.193.248) by SZXEML423-HUB.china.huawei.com (10.82.67.154) with Microsoft SMTP Server id 14.3.235.1; Mon, 26 Oct 2015 19:42:11 +0800 From: Wang Nan To: , , CC: , , , Wang Nan , Arnaldo Carvalho de Melo , Peter Zijlstra Subject: [RFC PATCH v2 1/2] perf tools: Set evsel->system_wide field for global system wide recording Date: Mon, 26 Oct 2015 11:41:59 +0000 Message-ID: <1445859720-146146-2-git-send-email-wangnan0@huawei.com> X-Mailer: git-send-email 1.8.3.4 In-Reply-To: <1445859720-146146-1-git-send-email-wangnan0@huawei.com> References: <1445859720-146146-1-git-send-email-wangnan0@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.107.193.248] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org evsel->system_wide is introduced by commit bf8e8f4b832972c76d64ab2e2837 (perf evlist: Add 'system_wide' option), which is used for mixing evsels that aren't system-wide with ones that are [1]. However, for global system wide recording (perf record -a ...), evsel->system_wide is set to false, which is confusion. This patch set evsel->system_wide to true if the target.system_wide is set, which makes evsel->system_wide a reliable way to describe whether itself is system_wide or not. [1] http://lkml.kernel.org/r/562DF19B.2080608@intel.com Signed-off-by: Wang Nan Cc: Adrian Hunter Cc: Arnaldo Carvalho de Melo Cc: Alexei Starovoitov Cc: Peter Zijlstra Cc: Li Zefan Cc: pi3orama@163.com Link: http://lkml.kernel.org/n/ebpf-qm3gtwidc1o5ktjd9tgjex25@git.kernel.org --- tools/perf/util/evsel.c | 1 + 1 file changed, 1 insertion(+) -- 1.8.3.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c index 3ac4ee9c..36ecf0e 100644 --- a/tools/perf/util/evsel.c +++ b/tools/perf/util/evsel.c @@ -734,6 +734,7 @@ void perf_evsel__config(struct perf_evsel *evsel, struct record_opts *opts) int track = evsel->tracking; bool per_cpu = opts->target.default_per_cpu && !opts->target.per_thread; + evsel->system_wide = opts->target.system_wide; attr->sample_id_all = perf_missing_features.sample_id_all ? 0 : 1; attr->inherit = !opts->no_inherit;