public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: "Metzger, Markus T" <markus.t.metzger@intel.com>
Cc: ak@suse.de, hpa@zytor.com, linux-kernel@vger.kernel.org,
	tglx@linutronix.de, markus.t.metzger@gmail.com, "Siddha,
	Suresh B" <suresh.b.siddha@intel.com>,
	roland@redhat.com, akpm@linux-foundation.org,
	mtk.manpages@gmail.com, Alan Stern <stern@rowland.harvard.edu>
Subject: Re: x86, ptrace: support for branch trace store(BTS)
Date: Thu, 13 Dec 2007 14:08:14 +0100	[thread overview]
Message-ID: <20071213130814.GC28340@elte.hu> (raw)
In-Reply-To: <029E5BE7F699594398CA44E3DDF5544401186D54@swsmsx413.ger.corp.intel.com>


* 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

  reply	other threads:[~2007-12-13 13:08 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-10 11:38 [patch 1/4] x86: remove bad comment Markus Metzger
2007-12-10 20:20 ` x86, ptrace: support for branch trace store(BTS) Ingo Molnar
2007-12-11 10:34   ` Metzger, Markus T
2007-12-11 14:53     ` Ingo Molnar
2007-12-12  9:18       ` Metzger, Markus T
2007-12-12 11:03         ` Ingo Molnar
2007-12-12 12:23           ` Metzger, Markus T
2007-12-13 10:29             ` Ingo Molnar
2007-12-13 12:51               ` Metzger, Markus T
2007-12-13 13:08                 ` Ingo Molnar [this message]
2007-12-13 16:06                   ` Metzger, Markus T

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20071213130814.GC28340@elte.hu \
    --to=mingo@elte.hu \
    --cc=ak@suse.de \
    --cc=akpm@linux-foundation.org \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=markus.t.metzger@gmail.com \
    --cc=markus.t.metzger@intel.com \
    --cc=mtk.manpages@gmail.com \
    --cc=roland@redhat.com \
    --cc=stern@rowland.harvard.edu \
    --cc=suresh.b.siddha@intel.com \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox