lkml.org 
[lkml]   [2010]   [Jul]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    SubjectRe: [PATCHv10 2.6.35-rc6-tip 11/14] perf: perf interface for uprobes
    Hi Srikar,

    Srikar Dronamraju wrote:
    > Enhances perf probe to accept pid and user vaddr.
    > Provides very basic support for uprobes.
    [...]
    > @@ -162,6 +190,14 @@ static int try_to_find_probe_trace_events(struct perf_probe_event *pev,
    > bool need_dwarf = perf_probe_event_need_dwarf(pev);
    > int fd, ntevs;
    >
    > + if (pev->upid) {
    > + if (need_dwarf) {
    > + pr_warning("Debuginfo-analysis is not supported.\n");

    This should be "Debuginfo-analysis is not supported with -p/--pid option.\n"

    > + return -ENOSYS;
    > + }
    > + return convert_name_to_addr(pev);
    > + }
    > +



    And I found a small bug.

    # ./perf probe -vf -p 3199 "setenv %ax"
    probe-definition(0): setenv %ax
    symbol:setenv file:(null) line:0 offset:0 return:0 lazy:(null)
    parsing arg: %ax into %ax
    1 arguments
    Opening /debug/tracing/uprobe_events write=1
    Add new event:
    Writing event: p:probe_3199/setenv 3199:0x47e680
    %ax
    Failed to write event: Invalid argument
    Error: Failed to add events. (-1)

    # ./perf probe -l
    probe_3199:setenv (on 3199:0x000000000047e680)

    When writing an event, there is a "\n" right after probe point (3199:0x47e680\n)

    > @@ -1066,10 +1213,22 @@ char *synthesize_probe_trace_command(struct probe_trace_event *tev)
    > if (buf == NULL)
    > return NULL;
    >
    > - len = e_snprintf(buf, MAX_CMDLEN, "%c:%s/%s %s+%lu",
    > - tp->retprobe ? 'r' : 'p',
    > - tev->group, tev->event,
    > - tp->symbol, tp->offset);
    > + if (tev->upid)
    > + len = e_snprintf(buf, MAX_CMDLEN, "%c:%s/%s %d:%s\n",

    Here is a "\n".


    Thank you,

    --
    Masami HIRAMATSU
    2nd Research Dept.
    Hitachi, Ltd., Systems Development Laboratory
    E-mail: masami.hiramatsu.pt@hitachi.com


    \
     
     \ /
      Last update: 2010-07-29 14:05    [W:0.030 / U:28.780 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site