lkml.org 
[lkml]   [2007]   [Dec]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: x86, ptrace: support for branch trace store(BTS)

* Metzger, Markus T <markus.t.metzger@intel.com> wrote:

> The ptrace API would allow the user to:
> - define (and query) the overflow mechanism
> (wrap-around or event)
> - define (and query) the size of the buffer within certain limits
> (we could either give an error or cut off)
> - define (and query) events to be monitored
> (last branch trace, scheduling timestamps)
> - get a single BTS record
> - query the number of BTS records
> (to find out how big your drain buffer needs to be; it may be bigger
> than you requested)
> - drain all BTS records (copy, then clear)
> - clear all BTS records
>
> Draining would require the user to allocate a buffer to hold the data,
> which might not be feasible when he is near his memory limit. He could
> fall back to looping over the single-entry get. It is questionable,
> how useful the drain ptrace command would actually be; we might want
> to replace it with a get range command.
>
> Are you OK with this?

this sounds a lot more flexible to me. Please, once it looks good to all
of us also extend LTP's ptrace bits with unit tests for these API
additions. (Cc: such LTP bits to subrata@linux.vnet.ibm.com)

Ingo


\
 
 \ /
  Last update: 2007-12-13 14:11    [W:0.046 / U:0.076 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site