[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20071213130814.GC28340@elte.hu>
Date: Thu, 13 Dec 2007 14:08:14 +0100
From: Ingo Molnar <mingo@...e.hu>
To: "Metzger, Markus T" <markus.t.metzger@...el.com>
Cc: ak@...e.de, hpa@...or.com, linux-kernel@...r.kernel.org,
tglx@...utronix.de, markus.t.metzger@...il.com,
"Siddha, Suresh B" <suresh.b.siddha@...el.com>, roland@...hat.com,
akpm@...ux-foundation.org, mtk.manpages@...il.com,
Alan Stern <stern@...land.harvard.edu>
Subject: Re: x86, ptrace: support for branch trace store(BTS)
* Metzger, Markus T <markus.t.metzger@...el.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@...ux.vnet.ibm.com)
Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists