-
Notifications
You must be signed in to change notification settings - Fork 218
Description
Hey,
when trying to run your script like this
stap -v histogram-kernel.stp 'kernel.function("net_rx_action")'
I've got a metric ton of errors. Do I need to change it for my kernel version? Can it be made version independent?
Pass 1: parsed user script and 95 library script(s) using 86584virt/30540res/5116shr/26196data kb, in 70usr/70sys/156real ms.
Pass 2: analyzed script: 4 probe(s), 3 function(s), 3 embed(s), 3 global(s) using 538896virt/80340res/7000shr/73864data kb, in 1260usr/1700sys/4879real ms.
Pass 3: translated to C into "/tmp/stap8EwY4x/stap_e9940a8a3353a2d196e72ff059fa60c3_3482_src.c" using 536376virt/84028res/10820shr/73864data kb, in 0usr/0sys/14real ms.
In file included from /usr/share/systemtap/runtime/linux/runtime.h:192:0,
from /usr/share/systemtap/runtime/runtime.h:24,
from /tmp/stap8EwY4x/stap_e9940a8a3353a2d196e72ff059fa60c3_3482_src.c:24:
/usr/share/systemtap/runtime/linux/alloc.c: In function '_stp_kmalloc':
/usr/share/systemtap/runtime/linux/alloc.c:19:8: error: '__GFP_WAIT' undeclared (first use in this function)
& ~__GFP_WAIT)
^
/usr/share/systemtap/runtime/linux/alloc.c:275:32: note: in expansion of macro 'STP_ALLOC_FLAGS'
return _stp_kmalloc_gfp(size, STP_ALLOC_FLAGS);
^
/usr/share/systemtap/runtime/linux/alloc.c:19:8: note: each undeclared identifier is reported only once for each function it appears in
& ~__GFP_WAIT)
^
/usr/share/systemtap/runtime/linux/alloc.c:275:32: note: in expansion of macro 'STP_ALLOC_FLAGS'
return _stp_kmalloc_gfp(size, STP_ALLOC_FLAGS);
^
/usr/share/systemtap/runtime/linux/alloc.c: In function '_stp_kzalloc':
/usr/share/systemtap/runtime/linux/alloc.c:19:8: error: '__GFP_WAIT' undeclared (first use in this function)
& ~__GFP_WAIT)
^
/usr/share/systemtap/runtime/linux/alloc.c:331:33: note: in expansion of macro 'STP_ALLOC_FLAGS'
return _stp_kzalloc_gfp(size, STP_ALLOC_FLAGS);
^
/usr/share/systemtap/runtime/linux/alloc.c: In function '_stp_kmalloc_node':
/usr/share/systemtap/runtime/linux/alloc.c:19:8: error: '__GFP_WAIT' undeclared (first use in this function)
& ~__GFP_WAIT)
^
/usr/share/systemtap/runtime/linux/alloc.c:428:43: note: in expansion of macro 'STP_ALLOC_FLAGS'
return _stp_kmalloc_node_gfp(size, node, STP_ALLOC_FLAGS);
^
/usr/share/systemtap/runtime/linux/alloc.c: In function '_stp_kzalloc_node':
/usr/share/systemtap/runtime/linux/alloc.c:19:8: error: '__GFP_WAIT' undeclared (first use in this function)
& ~__GFP_WAIT)
^
/usr/share/systemtap/runtime/linux/alloc.c:432:43: note: in expansion of macro 'STP_ALLOC_FLAGS'
return _stp_kzalloc_node_gfp(size, node, STP_ALLOC_FLAGS);
^
In file included from /usr/share/systemtap/runtime/linux/task_finder2.c:4:0,
from /usr/share/systemtap/runtime/linux/task_finder.c:17,
from /usr/share/systemtap/runtime/linux/runtime.h:202,
from /usr/share/systemtap/runtime/runtime.h:24,
from /tmp/stap8EwY4x/stap_e9940a8a3353a2d196e72ff059fa60c3_3482_src.c:24:
/usr/share/systemtap/runtime/stp_utrace.c: In function 'utrace_task_alloc':
/usr/share/systemtap/runtime/stp_utrace.c:409:59: error: 'GFP_IOFS' undeclared (first use in this function)
struct utrace _utrace = kmem_cache_zalloc(utrace_cachep, GFP_IOFS);
^
/usr/share/systemtap/runtime/stp_utrace.c: In function 'utrace_attach_task':
/usr/share/systemtap/runtime/stp_utrace.c:668:50: error: 'GFP_IOFS' undeclared (first use in this function)
engine = kmem_cache_alloc(utrace_engine_cachep, GFP_IOFS);
^
In file included from /usr/share/systemtap/runtime/linux/runtime.h:192:0,
from /usr/share/systemtap/runtime/runtime.h:24,
from /tmp/stap8EwY4x/stap_e9940a8a3353a2d196e72ff059fa60c3_3482_src.c:24:
/usr/share/systemtap/runtime/task_finder_vma.c: In function '__stp_tf_vma_new_entry':
/usr/share/systemtap/runtime/linux/alloc.c:19:8: error: '__GFP_WAIT' undeclared (first use in this function)
& ~__GFP_WAIT)
^
/usr/share/systemtap/runtime/task_finder_vma.c:58:64: note: in expansion of macro 'STP_ALLOC_FLAGS'
STP_ALLOC_FLAGS);
^
In file included from /usr/share/systemtap/runtime/print.c:17:0,
from /usr/share/systemtap/runtime/runtime_context.h:22,
from /tmp/stap8EwY4x/stap_e9940a8a3353a2d196e72ff059fa60c3_3482_src.c:174:
/usr/share/systemtap/runtime/linux/print.c: In function '_stp_print_kernel_info':
/usr/share/systemtap/runtime/linux/print.c:242:20: error: 'struct module' has no member named 'module_core'
THIS_MODULE->module_core,
^
/usr/share/systemtap/runtime/linux/print.c:243:37: error: 'struct module' has no member named 'core_size'
(unsigned long) (THIS_MODULE->core_size - THIS_MODULE->core_text_size)/1024,
^
/usr/share/systemtap/runtime/linux/print.c:243:62: error: 'struct module' has no member named 'core_text_size'
(unsigned long) (THIS_MODULE->core_size - THIS_MODULE->core_text_size)/1024,
^
/usr/share/systemtap/runtime/linux/print.c:244:44: error: 'struct module' has no member named 'core_text_size'
(unsigned long) (THIS_MODULE->core_text_size)/1024,
^
In file included from /tmp/stap8EwY4x/stap_e9940a8a3353a2d196e72ff059fa60c3_3482_src.c:311:0:
/usr/share/systemtap/runtime/time.c: In function '__stp_time_cpufreq_callback':
/usr/share/systemtap/runtime/time.c:178:14: error: 'CPUFREQ_RESUMECHANGE' undeclared (first use in this function)
case CPUFREQ_RESUMECHANGE:
^
In file included from /usr/share/systemtap/runtime/timer.c:17:0,
from /tmp/stap8EwY4x/stap_e9940a8a3353a2d196e72ff059fa60c3_3482_src.c:1292:
/usr/share/systemtap/runtime/linux/timer.c: In function '_stp_hrtimer_init':
/usr/share/systemtap/runtime/linux/timer.c:49:2: error: implicit declaration of function 'hrtimer_get_res' [-Werror=implicit-function-declaration]
hrtimer_get_res (CLOCK_MONOTONIC, &res);
^
In file included from /usr/share/systemtap/runtime/linux/runtime.h:192:0,
from /usr/share/systemtap/runtime/runtime.h:24,
from /tmp/stap8EwY4x/stap_e9940a8a3353a2d196e72ff059fa60c3_3482_src.c:24:
/usr/share/systemtap/runtime/linux/alloc.c: In function 'stp_kmalloc':
/usr/share/systemtap/runtime/linux/alloc.c:276:1: error: control reaches end of non-void function [-Werror=return-type]
}
^
cc1: all warnings being treated as errors
make[1]: ** [/tmp/stap8EwY4x/stap_e9940a8a3353a2d196e72ff059fa60c3_3482_src.o] Error 1
make: *** [module/tmp/stap8EwY4x] Error 2
WARNING: kbuild exited with status: 2
Pass 4: compiled C into "stap_e9940a8a3353a2d196e72ff059fa60c3_3482.ko" in 5010usr/4410sys/11814real ms.
Pass 4: compilation failed. [man error::pass4]
Tip: /usr/share/doc/systemtap/README.Debian should help you get started.