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: problems with sched tapset on ubuntu precise 3.2.0


Hi David, sorry for the late response

- for the first check, I see an error:

stap -vv -l 'kernel.trace("sched_*")'
Systemtap translator/driver (version 1.6/0.152 non-git sources)
Copyright (C) 2005-2011 Red Hat, Inc. and others
This is free software; see the source for copying conditions.
enabled features: AVAHI LIBSQLITE3 NSS BOOST_SHARED_PTR TR1_UNORDERED_MAP NLS
Created temporary directory "/tmp/stapNw4kVW"
Session arch: x86_64 release: 3.2.0-23-generic
Searched: " /usr/share/systemtap/tapset/x86_64/*.stp ", found: 4, processed: 4
Searched: " /usr/share/systemtap/tapset/*.stp ", found: 73, processed: 73
Pass 1: parsed user script and 77 library script(s) using
84096virt/22508res/2556shr kb, in 60usr/0sys/70real ms.
semantic error: no match while resolving probe point kernel.trace("sched_*")
Pass 2: analyzed script: 0 probe(s), 0 function(s), 0 embed(s), 0
global(s) using 230984virt/23700res/2908shr kb, in
40usr/100sys/125real ms.
Running rm -rf /tmp/stapNw4kVW
Spawn waitpid result (0x0): 0

- whereas for the second one, it succeeds:

 stap -l 'kernel.function("context_switch")'
kernel.function("context_switch@/build/buildd/linux-3.2.0/kernel/sched.c:3287")

Regarding the CONFIG_TRACEPOINTS (I'm not sure I'm looking to the
right place) I have ...

$ cat /sys/kernel/debug/tracing/tracing_enabled
1

$ cat /sys/kernel/debug/tracing/available_tracers
blk function_graph mmiotrace wakeup_rt wakeup function nop

So, no sched_switch there, although ...

$ cat /sys/kernel/debug/tracing/events/sched/sched_switch/enable
1



On Tue, May 7, 2013 at 3:28 PM, David Smith <dsmith@redhat.com> wrote:
> On 05/07/2013 10:05 AM, Thiago Manel wrote:
>> Hi list,
>>
>> I'm facing the following error when trying to run  testsuite/systemtap.examples/
>> process/schedtimes.stp script
>>
>> stap schedtimes.stp -x 2064
>>
>> Warning: make exited with status: 2
>> Warning: make exited with status: 2
>> Warning: make exited with status: 2
>> Warning: make exited with status: 2
>> ^CWarning: make exited with status: 130
>> semantic error: no match while resolving probe point
>> kernel.trace("sched_switch")
>> Pass 2: analysis failed.  Try again with another '--vp 01' option.
>>
>> In fact, my installation does not know the "sched_switch" probe point ...
>>
>> stap -l 'kernel.function("sched_s*")'
>> kernel.function("sched_set_stop_task@/build/buildd/linux-3.2.0/kernel/sched.c:2205")
>> kernel.function("sched_setaffinity@/build/buildd/linux-3.2.0/kernel/sched.c:5543")
>> kernel.function("sched_setscheduler@/build/buildd/linux-3.2.0/kernel/sched.c:5407")
>> kernel.function("sched_setscheduler_nocheck@/build/buildd/linux-3.2.0/kernel/sched.c:5425")
>> kernel.function("sched_show@/build/buildd/linux-3.2.0/fs/proc/base.c:1359")
>> kernel.function("sched_show_task@/build/buildd/linux-3.2.0/kernel/sched.c:5998")
>> kernel.function("sched_slice@/build/buildd/linux-3.2.0/kernel/sched_fair.c:514")
>> kernel.function("sched_smt_power_savings_show@/build/buildd/linux-3.2.0/kernel/sched.c:7960")
>> kernel.function("sched_smt_power_savings_store@/build/buildd/linux-3.2.0/kernel/sched.c:7966")
>> kernel.function("sched_submit_work@/build/buildd/linux-3.2.0/kernel/sched.c:4473")
>
> You misread the error message a bit. Here's how the scheduler.cpu_off
> probe point is defined:
>
> ====
> probe scheduler.cpu_off =
>         kernel.trace("sched_switch") !,
>         kernel.function("context_switch")
> {
>     name = "cpu_off"
>     task_prev = $prev
>     task_next = $next
>     idle = __is_idle()
> }
> ====
>
> So, that probe point looks for the kernel tracepoint 'sched_switch' or
> the kernel function 'context_switch' (if it finds the tracepoint, it
> won't bother with the function).
>
> Since you got that error, that means systemtap thinks you don't have either.
>
> Let's test that theory. Try the following commands on your kernel and
> see what you get. Your 3.2 kernel should have both (assuming
> CONFIG_TRACEPOINTS is on).
>
> # stap -l 'kernel.trace("sched_*")'
> # stap -l 'kernel.function("context_switch")'
>
> Is CONFIG_TRACEPOINTS on in your kernel?
>
> --
> David Smith
> dsmith@redhat.com
> Red Hat
> http://www.redhat.com
> 256.217.0141 (direct)
> 256.837.0057 (fax)



-- 
Thiago Emmanuel Pereira da Cunha Silva
-----------------------------------------------
www.lsd.ufcg.edu.br/~thiagoepdc
-----------------------------------------------


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