From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1761076AbcIWR0S (ORCPT ); Fri, 23 Sep 2016 13:26:18 -0400 Received: from mga04.intel.com ([192.55.52.120]:57094 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751847AbcIWR0R (ORCPT ); Fri, 23 Sep 2016 13:26:17 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.30,382,1470726000"; d="scan'208";a="12664473" Date: Fri, 23 Sep 2016 10:26:15 -0700 From: Andi Kleen To: Peter Zijlstra Cc: Alexander Shishkin , Ingo Molnar , linux-kernel@vger.kernel.org, vince@deater.net, eranian@google.com, Arnaldo Carvalho de Melo , tglx@linutronix.de Subject: Re: [RFC PATCH 1/6] perf: Move mlock accounting to ring buffer allocation Message-ID: <20160923172615.GU3078@tassilo.jf.intel.com> References: <20160923112726.5890-1-alexander.shishkin@linux.intel.com> <20160923112726.5890-2-alexander.shishkin@linux.intel.com> <20160923121403.GC5012@twins.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160923121403.GC5012@twins.programming.kicks-ass.net> User-Agent: Mutt/1.6.1 (2016-04-27) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > Afaict there's no actual need to hide the AUX buffer for this sampling > stuff; the user knows about all this and can simply mmap() the AUX part. > The sample could either point to locations in the AUX buffer, or (as I > think this code does) memcpy bits out. This would work for perf, but not for the core dump case below. > Ideally we'd pass the AUX-event into the syscall, that way you avoid all > the find_aux_event crud. I'm not sure we want to overload the group_fd > thing more (its already very hard to create counter groups in a cgroup > for example) .. > > Coredump was mentioned somewhere, but I'm not sure I've seen > code/interfaces for that. How was that envisioned to work? The idea was to have a rlimit that enables PT running as a ring buffer in the background. If something crashes the ring buffer is dumped as part of the core dump, and then gdb can tell you how you crashed. This extends what gdb already does explicitly today using perf API calls. -Andi