Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp1221334ybl; Tue, 13 Aug 2019 09:10:21 -0700 (PDT) X-Google-Smtp-Source: APXvYqxJXW7IhjyHvlWJLkUzIZgqXILaFqJAaFYUkhZvfT1gmD8v5pfgSkxThhjoSgae1/NWF9LB X-Received: by 2002:a63:6904:: with SMTP id e4mr34780570pgc.321.1565712621681; Tue, 13 Aug 2019 09:10:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565712621; cv=none; d=google.com; s=arc-20160816; b=pzTtfQNrfspncGPbMIgYuIpV6L1r/I7o+iKCxFTT5Tyo2D224/aB9x17uUccpQMGhA 0L/JEXjLYFGR6qsAb+qz5FOdSHQ914ZZq1pn5d+bsbHNEcW757Hxqqy611dY12se4PpA MHX3TzSnklmdW0xmyKfaCvBM35p7MDmM8LjvIu0d6Pd8ZLplmrgphj12t92hgnLVnIm+ tcrCGpIlPOIzWsdQnTDR6CJoUSbIZd5QvOEZrTedBW62jKUdiq5FQ9rr5IZF8+7eoUE6 qNMZGedymay3fZ295AT2aSGiCqrUGYuRbET9GvhiJhIcHGSYF6aZvaF1JYC5BnSImk5Y tctw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=xNKTOkZM//EqRzgNK4EhY4syEBi9vfTiBbQPWgjDxy0=; b=PnghWGkZx+0z6DA68+6AJchvjEswYEi8UlGnb4eAaWF38LpR+4S//atZvJNW97xA6h njail7B7DMrGQfVUwLioZFyVdSrsYaVHSOY70gCKDN3yMtL6vOhnahHJregILKhZuYf2 eSEf67L8/7NWgmzblKK9TBegnJMZdwWdtebkyzOYzsg7sZUJ/DA9Dly4Orc3+qsgcStA REyBKFAkE5lxfqcioitTifgphL2edT9m0traYsyreYvjFGQS3FcRU7RREKNiLqJbet81 OcPL/wYvvooCvYSYMi/5ldxFHcoIZ1ynt8G7Sy5pOf2I+wCY5R4p0wVO+dfxxDqXXwMm q+dg== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p1si8054246pff.247.2019.08.13.09.10.05; Tue, 13 Aug 2019 09:10: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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729114AbfHMPde (ORCPT + 99 others); Tue, 13 Aug 2019 11:33:34 -0400 Received: from mx1.redhat.com ([209.132.183.28]:38416 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728226AbfHMPde (ORCPT ); Tue, 13 Aug 2019 11:33:34 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 2E3A730832DC; Tue, 13 Aug 2019 15:33:34 +0000 (UTC) Received: from sandy.ghostprotocols.net (ovpn-112-35.phx2.redhat.com [10.3.112.35]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A735F80FD6; Tue, 13 Aug 2019 15:33:33 +0000 (UTC) Received: by sandy.ghostprotocols.net (Postfix, from userid 1000) id CAE4411E7; Tue, 13 Aug 2019 12:33:30 -0300 (BRT) Date: Tue, 13 Aug 2019 12:33:30 -0300 From: Arnaldo Carvalho de Melo To: Alexander Shishkin Cc: Peter Zijlstra , Ingo Molnar , linux-kernel@vger.kernel.org, Adrian Hunter , acme@kernel.org Subject: Re: [PATCH v1] perf record: Add an option to take an AUX snapshot on exit Message-ID: <20190813153330.GF2142@redhat.com> References: <20190806144101.62892-1-alexander.shishkin@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190806144101.62892-1-alexander.shishkin@linux.intel.com> X-Url: http://acmel.wordpress.com User-Agent: Mutt/1.5.20 (2009-12-10) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.44]); Tue, 13 Aug 2019 15:33:34 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Tue, Aug 06, 2019 at 05:41:01PM +0300, Alexander Shishkin escreveu: > It is sometimes useful to generate a snapshot when perf record exits; > I've been using a wrapper script around the workload that would do a > killall -USR2 perf when the workload exits. > > @@ -654,7 +670,7 @@ int record__auxtrace_mmap_read(struct record *rec __maybe_unused, > } > > static inline > -void record__read_auxtrace_snapshot(struct record *rec __maybe_unused) > +void record__read_auxtrace_snapshot(struct record *rec __maybe_unused, bool on_exit) You forgot to add the __maybe_unused for the on_exit and later for the 'rec' in record__auxtrace_snapshot_exit, which causes the build to fail when auxtrace isn't being built, I've fixed those. - Arnaldo > { > } > > @@ -664,6 +680,12 @@ int auxtrace_record__snapshot_start(struct auxtrace_record *itr __maybe_unused) > return 0; > } > > +static inline > +int record__auxtrace_snapshot_exit(struct record *rec) > +{ > + return 0; > +} > + > static int record__auxtrace_init(struct record *rec __maybe_unused) > { > return 0; > @@ -1536,7 +1558,7 @@ static int __cmd_record(struct record *rec, int argc, const char **argv)