[lkml]   [2009]   [Nov]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH 4/6] hw-breakpoints: Rewrite the hw-breakpoints layer on top of perf events
On Thu, Nov 05, 2009 at 10:59:44AM +1100, Paul Mackerras wrote:
> Frederic Weisbecker writes:
> > This patch rebase the implementation of the breakpoints API on top of
> > perf events instances.
> >
> > Each breakpoints are now perf events that handle the
> > register scheduling, thread/cpu attachment, etc..
> What I haven't managed to understand yet is how you provide reliable
> breakpoints for debugging purposes. If I'm debugging a program and I
> have set a breakpoint, I'll be very unhappy if the breakpoint should
> trigger but doesn't because the perf_event infrastructure has decided
> it can't schedule that breakpoint in. If the breakpoint isn't going
> to work then I want to know that at the time that I set it.

The hw-breakpoint layer avoids such issues by not over-committing debug
registers i.e. 'n' number of debug registers are reserved for user-space
where n = max(no. of breakpoints requested by any given process/thread).
And book-keeping certainly helps here too.


 \ /
  Last update: 2009-11-05 07:03    [W:0.286 / U:3.132 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site