Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756544Ab0ANIor (ORCPT ); Thu, 14 Jan 2010 03:44:47 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1756519Ab0ANIoq (ORCPT ); Thu, 14 Jan 2010 03:44:46 -0500 Received: from bombadil.infradead.org ([18.85.46.34]:34620 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756473Ab0ANIop (ORCPT ); Thu, 14 Jan 2010 03:44:45 -0500 Subject: Re: HW breakpoints perf_events request From: Peter Zijlstra To: Joshua Pincus Cc: Frederic Weisbecker , "K.Prasad" , paulus@samba.org, acme@redhat.com, linux-kernel@vger.kernel.org In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Date: Thu, 14 Jan 2010 09:44:25 +0100 Message-ID: <1263458665.4244.256.camel@laptop> Mime-Version: 1.0 X-Mailer: Evolution 2.28.1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1655 Lines: 37 On Wed, 2010-01-13 at 17:45 -0800, Joshua Pincus wrote: > However, there's nothing yet in place to allow a > signal to be sent to the thread when a breakpoint > has been hit. Put another way, there's nothing here > which affects execution flow of the user-app when the CPU > traps due to a HW breakpoint. > > Currently, the perf events infrastructure allows me > to mmap() a block of memory and to poll() on it, waiting > and watching for events to be described in that mmap'd > buffer. That will not be sufficient for what we need > to do. We need to have the ability to specify that > execution of the thread should be interrupted, just as it > would under ptrace(), and have a signal be delivered. > Delivery of the signal must be received and processed > by the application before the thread will be allowed to > proceed to the nPC after the PC which caused the > HW breakpoint event. > > Is this possible? Can we architect this feature into > the perf_events infrastructure? We have fnctl() managing signal support, but that will only interrupt the observing thread, not the threads being observed (unless they are one and the same -- but using inheritance precludes that from being true). I'm not sure I'm willing to go in this direction with perf, the idea is to have a minimum impact on the observed threads, explicitly sending them signals and disturbing their execution goes against this. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/