Messages in this thread | | | Date | Thu, 13 Dec 2007 14:08:14 +0100 | From | Ingo Molnar <> | Subject | Re: 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
| |