From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758501AbbDXTcf (ORCPT ); Fri, 24 Apr 2015 15:32:35 -0400 Received: from mga03.intel.com ([134.134.136.65]:30890 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756389AbbDXTcb (ORCPT ); Fri, 24 Apr 2015 15:32:31 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.11,642,1422950400"; d="scan'208";a="685230405" From: Adrian Hunter To: Arnaldo Carvalho de Melo Cc: Peter Zijlstra , linux-kernel@vger.kernel.org, David Ahern , Frederic Weisbecker , Jiri Olsa , Namhyung Kim , Stephane Eranian Subject: [PATCH V3 01/25] perf tools: Amend mmap ref counting for the AUX area mmap Date: Fri, 24 Apr 2015 22:29:43 +0300 Message-Id: <1429903807-20559-2-git-send-email-adrian.hunter@intel.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1429903807-20559-1-git-send-email-adrian.hunter@intel.com> References: <1429903807-20559-1-git-send-email-adrian.hunter@intel.com> Organization: Intel Finland Oy, Registered Address: PL 281, 00181 Helsinki, Business Identity Code: 0357606 - 4, Domiciled in Helsinki Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Reference counting of the mmap buffer does not work correctly when there is an AUX area mmap also. In snapshot mode it is not easy to know if the AUX area mmap buffer contains usefull information. Equally the evlist does not know if the recording is in sanpshot mode anyway. Consequently, for now just assume the AUX area mmap always has data, which will just cause the mmap buffer to remain mmapped for the duration of the recording. Signed-off-by: Adrian Hunter --- tools/perf/util/evlist.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/perf/util/evlist.c b/tools/perf/util/evlist.c index 0ec8c3b..7ec1bf9 100644 --- a/tools/perf/util/evlist.c +++ b/tools/perf/util/evlist.c @@ -695,7 +695,7 @@ union perf_event *perf_evlist__mmap_read(struct perf_evlist *evlist, int idx) static bool perf_mmap__empty(struct perf_mmap *md) { - return perf_mmap__read_head(md) == md->prev; + return perf_mmap__read_head(md) == md->prev && !md->auxtrace_mmap.base; } static void perf_evlist__mmap_get(struct perf_evlist *evlist, int idx) -- 1.9.1