[lkml]   [2008]   [Nov]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: debugctl msr

I am trying another approach for connecting perfmon to ds.c. I have
added new callbacks
to perfmon to allow me to invoke ds_request_pebs, once I know the
target thread or CPU.
That seems to work, however I ran into a spinlock problem is ds_request():

static int ds_request(struct task_struct *task, void *base, size_t size,
ds_ovfl_callback_t ovfl, enum ds_qualifier qual)
struct ds_context *context;
unsigned long buffer, adj;
const unsigned long alignment = (1 << 3);
int error = 0;

if (!ds_cfg.sizeof_ds)

/* we require some space to do alignment adjustments below */
if (size < (alignment + ds_cfg.sizeof_rec[qual]))
return -EINVAL;

/* buffer overflow notification is not yet implemented */
if (ovfl)


>> if (!check_tracer(task))
>> return -EPERM;

You need to spin_unlock() before returning here!

 \ /
  Last update: 2008-11-14 22:13    [W:0.063 / U:2.324 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site