This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Function probe return


Hi 

I'm trying to run this script:

probe process("/opt/xxx/bin/swim").function("CREATE_LOGBOOK").call{
        time_call[probefunc()] = gettimeofday_us()                    
        printf("%-s call: %-d\n", probefunc(), time_call[probefunc()])
}                                                                     
                                                                        
probe process("/opt/xxx/bin/swim").function("CREATE_LOGBOOK").return{
        time = gettimeofday_us() - time_call[probefunc()]               
        printf("%-s: %-d us\n", probefunc(), time)                      
}                                 

stap fails with the following error:
 root@p4080ds:/tmp#  stap -v timestamp_logbook_calls.stp 
Pass 1: parsed user script and 90 library script(s) using
20688virt/14028res/1560shr/13196data kb, in 440usr/0sys/437real ms.
semantic error: while resolving probe point: identifier 'process' at
timestamp_logbook_calls.stp:25:7
        source: probe
process("/opt/xxx/bin/swim").function("CREATE_LOGBOOK").return{
                      ^

semantic error: process return probes not available [man
error::inode-uprobes]
Pass 2: analyzed script: 8 probe(s), 147 function(s), 4 embed(s), 2
global(s) using 121640virt/16584res/2968shr/14212data kb, in
40usr/150sys/200real ms.
Pass 2: analysis failed.  [man error::pass2]

If the probe process("/opt/xxx/bin/swim").function("CREATE_LOGBOOK").return
is commented, it works fine.

Why does the "call" work and not the "return"?

stap version 2.1/0.148
system: Linux 3.8.13-rt9 (powerpc)

Philippe



--
View this message in context: http://sourceware-org.1504.n7.nabble.com/Function-probe-return-tp243938.html
Sent from the Sourceware - systemtap mailing list archive at Nabble.com.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]