Re: debugctl msr

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Metzger, Markus T <markus.t.metzger@...>
Cc: Ingo Molnar <mingo@...>, Andi Kleen <andi@...>, Andrew Morton <akpm@...>, <linux-kernel@...>, Markus Metzger <markus.t.metzger@...>
Date: Thursday, November 13, 2008 - 10:50 am

Markus,

I looked at the ds.c source code some more. I think the problem when
trying to use it with perfmon is because you are assuming that by the
time you allocate the buffer you know the task it is going to be attached to.
With perfmon this assumption is always wrong. Perfmon decouples each
step:
    1- allocation of the memory for the buffer
    2- initialization of the buffer
    3- binding of the buffer to its target thread or CPU
    4- saving/restoring of PMU/DS/PEBS registers

The idea is that you can prepare your measurement/buffer and then
attach to a task.
Should you be following across fork/pthread_create, you could prepare in advance
a pool of ready-to-go perfmon sessions, all you'd have to do then is
attach + start.

In ds.c:ds_request_pebs(), you assume that if task == NULL, then this
is a per-cpu session.
If you could decouple that by passing a type parameter for instance
and if you were to add
a ds_attach_pebs() then I think I could use the interface.


On Wed, Nov 12, 2008 at 11:59 AM, Metzger, Markus T
<markus.t.metzger@intel.com> wrote:
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: debugctl msr, stephane eranian, (Wed Nov 12, 6:10 am)
RE: debugctl msr, Metzger, Markus T, (Wed Nov 12, 6:59 am)
Re: debugctl msr, stephane eranian, (Thu Nov 13, 10:50 am)
RE: debugctl msr, Metzger, Markus T, (Fri Nov 14, 10:41 am)
Re: debugctl msr, stephane eranian, (Fri Nov 14, 5:10 pm)
Re: debugctl msr, Markus Metzger, (Sat Nov 15, 6:01 am)
Re: debugctl msr, stephane eranian, (Tue Nov 18, 6:00 pm)
RE: debugctl msr, Metzger, Markus T, (Wed Nov 19, 8:14 am)
Re: debugctl msr, stephane eranian, (Wed Nov 19, 8:59 am)
RE: debugctl msr, Metzger, Markus T, (Wed Nov 19, 11:47 am)
Re: debugctl msr, stephane eranian, (Wed Nov 19, 1:13 pm)
Re: debugctl msr, Markus Metzger, (Wed Nov 19, 2:27 pm)
Re: debugctl msr, stephane eranian, (Wed Nov 19, 3:20 pm)
Re: debugctl msr, Markus Metzger, (Wed Nov 19, 6:26 pm)
Re: debugctl msr, stephane eranian, (Thu Nov 20, 5:19 pm)
RE: debugctl msr, Metzger, Markus T, (Fri Nov 21, 4:22 am)
Re: debugctl msr, stephane eranian, (Fri Nov 21, 9:38 am)
Re: debugctl msr, stephane eranian, (Fri Nov 21, 11:27 am)
RE: debugctl msr, Metzger, Markus T, (Fri Nov 21, 12:10 pm)
Re: debugctl msr, stephane eranian, (Fri Nov 21, 12:33 pm)
Re: debugctl msr, stephane eranian, (Fri Nov 21, 6:47 pm)
Re: debugctl msr, Markus Metzger, (Sat Nov 22, 5:51 am)
Re: debugctl msr, stephane eranian, (Sun Nov 23, 6:31 pm)
Re: debugctl msr, stephane eranian, (Fri Nov 21, 4:47 am)
RE: debugctl msr, Metzger, Markus T, (Fri Nov 21, 4:58 am)
Re: debugctl msr, stephane eranian, (Wed Nov 19, 4:53 pm)