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]

Re: Script throws an error in Pass 5


>Could you post the script

This is the script:

global prio
global flags
global name
global p_id
global t_id
global count
global temp
global prev_prio
global new_prio
global res
global oncpu

probe timer.ms(250)
{
        for(; temp < count; temp++)
        {
               
printf("%s(%d)(%d)\t%s\t\%d\t%d\t%d\n",name[temp],p_id[temp],t_id[temp],res[temp],prev_prio[temp],new_prio[temp],oncpu[temp]);
                delete name[temp]
                delete oncpu[temp]
                delete p_id[temp]
                delete t_id[temp]
                delete res[temp]
                delete prev_prio[temp]
                delete new_prio[temp]
        }
}

probe timer.s(5)
{
        exit();
}

probe kernel.function("__rt_mutex_adjust_prio") {
        proc_pid = $task->tgid
        proc_tid = $task->pid
        flags[proc_pid,proc_tid] = 1
        prio[proc_pid,proc_tid] = $task->prio
}

probe kernel.function("rt_mutex_getprio").return {

        proc_pid = pid()
        proc_tid = tid()
        if (flags[proc_pid,proc_tid] == 1) {
                if( $return < prio[proc_pid,proc_tid] ) {
                        name[count] = execname()
                        p_id[count] = proc_pid
                        t_id[count] = proc_tid
                        prev_prio[count] = prio[proc_pid,proc_tid]
                        new_prio[count] = $return
                        res[count] = "Boost"
                        oncpu[count] = cpu()
                        count++
                        //printf("Prio boosting in %s(%d) \n", execname(),
pid());
                }
                if( $return > prio[proc_pid,proc_tid] ) {
                        name[count] = execname()
                        p_id[count] = proc_pid
                        t_id[count] = proc_tid
                        prev_prio[count] = prio[proc_pid,proc_tid]
                        new_prio[count] = $return
                        res[count] = "Boost"
                        oncpu[count] = cpu()
                        count++
                        //printf("Prio de-boosting in %s(%d) \n",
execname(), pid());
                }
        }
        flags[proc_pid,proc_tid] = 0
        prio[proc_pid,proc_tid] = 0
}

probe begin
{
        count = 1
        temp = 1
        printf("\n\n");
}

probe end
{
        printf("\n\n");
        delete prio
        delete flags
        delete oncpu
        delete name
        delete p_id
        delete t_id
        delete count
        delete temp
        delete prev_prio
        delete new_prio
        delete res
}


>  and the full stap -vv output when you run it?

This is the stap -vv output.

root@nitin-desktop:/media/disk/kernel/Desktop/SystemTapProject/scripts/projectscripts#
stap -vv prio_inherit.stp 
SystemTap translator/driver (version 0.9/0.131 non-git sources)
Copyright (C) 2005-2009 Red Hat, Inc. and others
This is free software; see the source for copying conditions.
Session arch: i686 release: 2.6.29-rc6-rt3
Created temporary directory "/tmp/stap5qOIqa"
Searched '/usr/local/share/systemtap/tapset/i686/*.stp', found 2
Searched '/usr/local/share/systemtap/tapset/*.stp', found 45
Pass 1: parsed user script and 47 library script(s) in 360usr/20sys/550real
ms.
probe __rt_mutex_adjust_prio@kernel/rtmutex.c:145 kernel reloc=.dynamic
section=.text pc=0xc013ffd3
probe rt_mutex_getprio@kernel/rtmutex.c:131 kernel reloc=.dynamic
section=.text pc=0xc013fe3b
Pass 2: analyzed script: 6 probe(s), 9 function(s), 0 embed(s), 11 global(s)
in 380usr/110sys/8302real ms.
Pass 3: using cached
/root/.systemtap/cache/29/stapconf_297666a7ea51531673cf30696f0e715a_117.h
Pass 3: using cached
/root/.systemtap/cache/99/stap_99315f6cea8f8dfe7dc6828192ab2576_4241.c
Pass 4: using cached
/root/.systemtap/cache/99/stap_99315f6cea8f8dfe7dc6828192ab2576_4241.ko
Pass 5: starting run.
Running /usr/local/bin/staprun -v
/tmp/stap5qOIqa/stap_99315f6cea8f8dfe7dc6828192ab2576_4241.ko
ERROR: stap_99315f6cea8f8dfe7dc6828192ab2576_4241: inconsistent kernel
build-id byte #0 (0xff [actual] vs. 0x1c [debuginfo])
stapio:cleanup_and_exit:336 detach=0
stapio:cleanup_and_exit:353 closing control channel
Pass 5: run completed in 0usr/20sys/380real ms.
Running rm -rf /tmp/stap5qOIqa


Thanks.

-- 
View this message in context: http://www.nabble.com/Script-throws-an-error-in-Pass-5-tp22385526p22388114.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]