Public bug reported:

I'm using Ubuntu 17.10, running kernel 4.13.0-38-generic and using
systemtap version 3.1-3. I'm trying to run the following systemtap
script from here:

#! /usr/bin/env stap                                                            

global slabs

probe vm.kmem_cache_alloc {
        slabs [execname(), bytes_req]<<<1

        dummy = "";
        foreach ([name, bytes] in slabs) {
                if (dummy != name)
                        printf("\nProcess:%s\n", name);
                printf("Slab_size:%d\tCount:%d\n", bytes, @count(slabs[name, 
                dummy = name;
        delete slabs

however, compilation fails due to `__GFP_REPEAT` being undefined:

# stap -v ./vm.tracepoints.stp                                                  
Pass 1: parsed user script and 465 library scripts using 
119732virt/48980res/6868shr/42544data kb, in 100usr/0sys/105real ms.            
Pass 2: analyzed script: 2 probes, 2 functions, 5 embeds, 1 global using 
123960virt/55004res/8300shr/46772data kb, in 120usr/230sys/345real ms.          
Pass 3: translated to C into 
"/tmp/stapjX0WQQ/stap_2b5505ba8af651817c2f6c55398c5877_6060_src.c" using 
123960virt/55004res/8300shr/46772data kb, in 0usr/0sys/0real ms.                
/tmp/stapjX0WQQ/stap_2b5505ba8af651817c2f6c55398c5877_6060_src.c: In function 
/tmp/stapjX0WQQ/stap_2b5505ba8af651817c2f6c55398c5877_6060_src.c:698:17: error: 
‘__GFP_REPEAT’ undeclared (first use in this function); did you mean 
/tmp/stapjX0WQQ/stap_2b5505ba8af651817c2f6c55398c5877_6060_src.c:659:45: note: 
in definition of macro ‘__GFP_BITMASKS’                                         
 #define __GFP_BITMASKS(FLAG)  if(gfp_flag & FLAG) { if(STAP_RETVALUE[0] != 
'\0') \                                                                         
/tmp/stapjX0WQQ/stap_2b5505ba8af651817c2f6c55398c5877_6060_src.c:698:17: note: 
each undeclared identifier is reported only once for each function it appears 
/tmp/stapjX0WQQ/stap_2b5505ba8af651817c2f6c55398c5877_6060_src.c:659:45: note: 
in definition of macro ‘__GFP_BITMASKS’                                         
 #define __GFP_BITMASKS(FLAG)  if(gfp_flag & FLAG) { if(STAP_RETVALUE[0] != 
'\0') \                                                                         
scripts/ recipe for target 
'/tmp/stapjX0WQQ/stap_2b5505ba8af651817c2f6c55398c5877_6060_src.o' failed       
make[1]: *** [/tmp/stapjX0WQQ/stap_2b5505ba8af651817c2f6c55398c5877_6060_src.o] 
Error 1
Makefile:1550: recipe for target '_module_/tmp/stapjX0WQQ' failed
make: *** [_module_/tmp/stapjX0WQQ] Error 2
WARNING: kbuild exited with status: 2
Pass 4: compiled C into "stap_2b5505ba8af651817c2f6c55398c5877_6060.ko" in 
7010usr/880sys/7511real ms.
Pass 4: compilation failed.  [man error::pass4]
Tip: /usr/share/doc/systemtap/README.Debian should help you get started.

** Affects: systemtap (Ubuntu)
     Importance: Medium
     Assignee: TJ (tj)
         Status: In Progress

You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

  systemtap module compilation fails due to `__GFP_REPEAT` undeclared

To manage notifications about this bug go to:

ubuntu-bugs mailing list

Reply via email to