From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ananth N Mavinakayanahalli Subject: Re: linux-next: add utrace tree Date: Tue, 26 Jan 2010 19:51:54 +0530 Message-ID: <20100126142154.GA30571@in.ibm.com> References: <20100122182827.GA13185@redhat.com> <20100122200129.GG22003@redhat.com> <20100122221348.GA4263@redhat.com> Reply-To: ananth@in.ibm.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org To: Linus Torvalds Cc: Tom Tromey , Stephen Rothwell , Kyle Moffett , Peter Zijlstra , Peter Zijlstra , Fr??d??ric Weisbecker , Oleg Nesterov , Steven Rostedt , LKML , Arnaldo Carvalho de Melo , "Frank Ch. Eigler" , linux-next@vger.kernel.org, "H. Peter Anvin" , utrace-devel@redhat.com, Thomas Gleixner List-Id: linux-next.vger.kernel.org On Mon, Jan 25, 2010 at 01:41:57PM -0800, Linus Torvalds wrote: > > > On Mon, 25 Jan 2010, Tom Tromey wrote: ... > > * Support "displaced stepping" in the kernel; I think this would improve > > performance when debugging in non-stop mode. > > Don't we already do that at least on x86? Just doing a single-step should > work on an instruction even if it has a breakpoint on it, because we set > the TF bit. > > Or maybe I'm not understanding what displaced stepping means to you. If Tom is referring to supporting single-stepping out of line, ie., not putting back the original instruction at the bp location, yes, we already support it on various architectures for kernel breakpoints, through the kprobes infrastructure. For userspace, there are more complications to take care of. We are reworking a prototype based on community comments (see the long UBP/XOL thread on lkml from a few days ago). Hopefully the userspace breakpoint assistance layer will be generic enough for gdb to also take advantage of, though the interface details need to be hashed out. Ananth