From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753678AbbD2PYM (ORCPT ); Wed, 29 Apr 2015 11:24:12 -0400 Received: from mx1.redhat.com ([209.132.183.28]:52275 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753570AbbD2PYI (ORCPT ); Wed, 29 Apr 2015 11:24:08 -0400 Date: Wed, 29 Apr 2015 17:23:14 +0200 From: Jiri Olsa To: Adrian Hunter Cc: Arnaldo Carvalho de Melo , Peter Zijlstra , linux-kernel@vger.kernel.org, David Ahern , Frederic Weisbecker , Namhyung Kim , Stephane Eranian Subject: Re: [PATCH V3 11/25] perf record: Add AUX area tracing Snapshot Mode support Message-ID: <20150429152314.GD7822@krava.redhat.com> References: <1429903807-20559-1-git-send-email-adrian.hunter@intel.com> <1429903807-20559-12-git-send-email-adrian.hunter@intel.com> <20150428132446.GA3563@krava.redhat.com> <5540D93D.5010700@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5540D93D.5010700@intel.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Apr 29, 2015 at 04:14:37PM +0300, Adrian Hunter wrote: > On 28/04/15 16:24, Jiri Olsa wrote: > > On Fri, Apr 24, 2015 at 10:29:53PM +0300, Adrian Hunter wrote: > > > > SNIP > > > >> char msg[512]; > >> @@ -238,7 +302,8 @@ try_again: > >> } > >> > >> if (perf_evlist__mmap_ex(evlist, opts->mmap_pages, false, > >> - opts->auxtrace_mmap_pages, false) < 0) { > >> + opts->auxtrace_mmap_pages, > >> + opts->auxtrace_snapshot_mode) < 0) { > >> if (errno == EPERM) { > >> pr_err("Permission error mapping pages.\n" > >> "Consider increasing " > >> @@ -349,7 +414,7 @@ static int record__mmap_read_all(struct record *rec) > >> } > >> } > >> > >> - if (mm->base && > >> + if (mm->base && !rec->opts.auxtrace_snapshot_mode && > >> record__auxtrace_mmap_read(rec, mm) != 0) { > >> rc = -1; > >> goto out; > >> @@ -404,6 +469,8 @@ static void workload_exec_failed_signal(int signo __maybe_unused, > >> child_finished = 1; > >> } > >> > >> +static void snapshot_sig_handler(int sig); > > > > seems there's no need for forward declaration, > > you can define the function right here, no? > > snapshot_sig_handler is dependent on "record" so the forward > declaration does seem to be needed. missed the record bit, ok jirka