Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp5482377ybp; Mon, 14 Oct 2019 23:39:08 -0700 (PDT) X-Google-Smtp-Source: APXvYqyPl72ToX8Zb62vEyDCUUYv7w/16cp538GNCeu59tPbRAPKT6xukw14BB686StxAIhn3tJe X-Received: by 2002:a17:906:3ec8:: with SMTP id d8mr32674565ejj.57.1571121548718; Mon, 14 Oct 2019 23:39:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571121548; cv=none; d=google.com; s=arc-20160816; b=n+RJhGs3yNGmyY/61+RGAYHDSJ7ebdhs+el3ldVQFATJqz37iE6sJJ6ukNDa+cpeWy 5OSz7rNkkOujZ70/HWLub4yYU13TY0M8tYOt0CL4BRBqPpzFwvvd7WQdvh50EwFijb5N tMwW7/ql1vkCo8imlemIVJcpIKnYhEhxTu4dI6fNofsYKs/WY+jIDYzvuiAf0QZZzC29 KRDSEkHc6ScZRAtJ6kvH1atYXF8qrsaCtDAXwFYGzcXaHLaVtQmN/z4PVaHTnwOFyI2/ 0bX0z0NDuCZlka93Ww9IEd1zqcwosGOvS2HtnycdfMvZ6dWfKZjAu9kj4GO5YFGAxMO9 hl4A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :robot-unsubscribe:robot-id:message-id:mime-version:references :in-reply-to:cc:subject:to:reply-to:from:date; bh=idL1LJeQTm0Vd5fbyvyc8sk8yzenWDg/HC35me+tPX4=; b=MC1Ew4BpEhJlBiZHzemmfDUFUuq/uBpN9y91PjhBOt77Y84s0VvKRI0BXY7J8RUBi2 yqZXelzidlsdqzPdI1RUIZ3iLP9VKiu2Jvtpc0uQcIUBT7ocfnrNuQFhAse2La8tR4/D IagRPwTxOjbmZ3GES8FBmpaR/88eDJ5X5uKMeJyom8KJ7WqEEpv8IDMACWNXiJmjS92/ VDjzJwDJ/1nGeQLtmScQxrNb0T6d/KZi8KKjUkxooj89QgzO2P+hqw6a0eORC0oMCq7/ 9IYbq/5kOKskH+LF3dEZr0O5Hesmn75GuilteidVxVvQ0xGlaJP7dfVfZkhvSg0rqW8y 2RIw== ARC-Authentication-Results: i=1; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id qo6si12727707ejb.386.2019.10.14.23.38.44; Mon, 14 Oct 2019 23:39:08 -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 S1729406AbfJOFgJ (ORCPT + 99 others); Tue, 15 Oct 2019 01:36:09 -0400 Received: from Galois.linutronix.de ([193.142.43.55]:41976 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728431AbfJOFb5 (ORCPT ); Tue, 15 Oct 2019 01:31:57 -0400 Received: from [5.158.153.53] (helo=tip-bot2.lab.linutronix.de) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1iKFQu-000085-Uj; Tue, 15 Oct 2019 07:31:45 +0200 Received: from [127.0.1.1] (localhost [IPv6:::1]) by tip-bot2.lab.linutronix.de (Postfix) with ESMTP id 551911C0493; Tue, 15 Oct 2019 07:31:40 +0200 (CEST) Date: Tue, 15 Oct 2019 05:31:40 -0000 From: "tip-bot2 for Jiri Olsa" Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: perf/core] perf tools: Use perf_mmap way to detect aux mmap Cc: Jiri Olsa , Alexander Shishkin , Michael Petlan , Namhyung Kim , Peter Zijlstra , Arnaldo Carvalho de Melo , Ingo Molnar , Borislav Petkov , linux-kernel@vger.kernel.org In-Reply-To: <20191007125344.14268-9-jolsa@kernel.org> References: <20191007125344.14268-9-jolsa@kernel.org> MIME-Version: 1.0 Message-ID: <157111750023.12254.15935532577728517772.tip-bot2@tip-bot2> X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following commit has been merged into the perf/core branch of tip: Commit-ID: 1d40ae4e1784bfa1646fd153ca022db21511284f Gitweb: https://git.kernel.org/tip/1d40ae4e1784bfa1646fd153ca022db21511284f Author: Jiri Olsa AuthorDate: Mon, 07 Oct 2019 14:53:16 +02:00 Committer: Arnaldo Carvalho de Melo CommitterDate: Thu, 10 Oct 2019 10:11:54 -03:00 perf tools: Use perf_mmap way to detect aux mmap We will move this code to libperf shortly, so we need to free it of 'struct auxtrace_mmap' usage, because it won't be available in libperf (for now). The perf_event_mmap_page::aux_size is set when the aux mmap is mapped, so the check is equivalent. Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: Michael Petlan Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/20191007125344.14268-9-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/util/mmap.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/perf/util/mmap.c b/tools/perf/util/mmap.c index 9f150d5..f246dd4 100644 --- a/tools/perf/util/mmap.c +++ b/tools/perf/util/mmap.c @@ -107,7 +107,9 @@ union perf_event *perf_mmap__read_event(struct mmap *map) static bool perf_mmap__empty(struct mmap *map) { - return perf_mmap__read_head(map) == map->core.prev && !map->auxtrace_mmap.base; + struct perf_event_mmap_page *pc = map->core.base; + + return perf_mmap__read_head(map) == map->core.prev && !pc->aux_size; } void perf_mmap__consume(struct mmap *map)