Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755780AbcCWTON (ORCPT ); Wed, 23 Mar 2016 15:14:13 -0400 Received: from casper.infradead.org ([85.118.1.10]:58923 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753534AbcCWTOK (ORCPT ); Wed, 23 Mar 2016 15:14:10 -0400 Date: Wed, 23 Mar 2016 20:13:59 +0100 From: Peter Zijlstra To: Will Deacon Cc: Wang Nan , mingo@redhat.com, linux-kernel@vger.kernel.org, He Kuang , Alexei Starovoitov , Arnaldo Carvalho de Melo , Brendan Gregg , Jiri Olsa , Masami Hiramatsu , Namhyung Kim , Zefan Li , pi3orama@163.com Subject: Re: [PATCH 2/5] perf core: Set event's default overflow_handler Message-ID: <20160323191359.GL6356@twins.programming.kicks-ass.net> References: <1457949585-191064-1-git-send-email-wangnan0@huawei.com> <1457949585-191064-3-git-send-email-wangnan0@huawei.com> <20160323175021.GK6356@twins.programming.kicks-ass.net> <20160323181348.GA2149@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160323181348.GA2149@arm.com> User-Agent: Mutt/1.5.21 (2012-12-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 710 Lines: 17 On Wed, Mar 23, 2016 at 06:13:49PM +0000, Will Deacon wrote: > > Will, why does it matter what the overflow handler is for this stuff? > > Because ptrace registers an overflow handler for raising a SIGTRAP and > ptrace users (e.g. GDB) expect to handle the single-stepping themselves. > Perf, on the other hand, will livelock if the kernel doesn't do the > stepping. Ah makes sense. > FWIW, I hate this whole thing. The only users of the perf side just seem > to be people running whacky test cases and then pointing out the places > where we're not identical to x86 :( Yeah, its not my favourite part either. The whole breakpoint thing doesn't quite behave like a regular PMU so its all a bit 'special'.