lkml.org 
[lkml]   [2008]   [Nov]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: debugctl msr
    Markus,


    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)
    return -EOPNOTSUPP;

    /* 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)
    return -EOPNOTSUPP;


    spin_lock(&ds_lock);

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

    You need to spin_unlock() before returning here!


    \
     
     \ /
      Last update: 2008-11-14 22:13    [W:0.021 / U:184.980 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site