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]

[Bug tapsets/22327] New: the loadavg tapset no longer works on recent kernels


https://sourceware.org/bugzilla/show_bug.cgi?id=22327

            Bug ID: 22327
           Summary: the loadavg tapset no longer works on recent kernels
           Product: systemtap
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: tapsets
          Assignee: systemtap at sourceware dot org
          Reporter: dsmith at redhat dot com
  Target Milestone: ---

The loadavg.stp tapset file causes compile errors when used on newer kernels
(4.14.0-0.rc4.git4.1.fc28.x86_64):

===
# stap -e 'probe begin { printf("%d\n", get_loadavg_index(0)) }'
/tmp/stap1Qjd3Z/stap_6b78fa1883092e0faa7bc608dd2ee82f_1402_src.c: In function
‘function___global_get_loadavg_index__overload_0’:
/tmp/stap1Qjd3Z/stap_6b78fa1883092e0faa7bc608dd2ee82f_1402_src.c:223:10: error:
‘avenrun’ undeclared (first use in this function)
  value = avenrun[STAP_ARG_indx] + (FIXED_1/200);
          ^~~~~~~
/tmp/stap1Qjd3Z/stap_6b78fa1883092e0faa7bc608dd2ee82f_1402_src.c:223:10: note:
each undeclared identifier is reported only once for each function it appears
in
/tmp/stap1Qjd3Z/stap_6b78fa1883092e0faa7bc608dd2ee82f_1402_src.c:223:36: error:
‘FIXED_1’ undeclared (first use in this function)
  value = avenrun[STAP_ARG_indx] + (FIXED_1/200);
                                    ^~~~~~~
/tmp/stap1Qjd3Z/stap_6b78fa1883092e0faa7bc608dd2ee82f_1402_src.c:35:29: error:
‘FSHIFT’ undeclared (first use in this function); did you mean ‘FS_XFS’?
 #define LOAD_INT(x) ((x) >> FSHIFT)
                             ^
/tmp/stap1Qjd3Z/stap_6b78fa1883092e0faa7bc608dd2ee82f_1402_src.c:225:18: note:
in expansion of macro ‘LOAD_INT’
  STAP_RETVALUE = LOAD_INT(value);
                  ^~~~~~~~
make[1]: *** [scripts/Makefile.build:313:
/tmp/stap1Qjd3Z/stap_6b78fa1883092e0faa7bc608dd2ee82f_1402_src.o] Error 1
make: *** [Makefile:1502: _module_/tmp/stap1Qjd3Z] Error 2
WARNING: kbuild exited with status: 2
Pass 4: compilation failed.  [man error::pass4]
====

This happens because the following kernel commit moved the loadavg related
definitions:

====
commit dea38c74cb9205341f52b8d8ae18f61247a43ea8
Author: Ingo Molnar <mingo@kernel.org>
Date:   Wed Feb 1 18:25:37 2017 +0100

    sched/headers: Move loadavg related definitions from <linux/sched.h> to
<linux/sched/loadavg.h>

    Move these bits to <linux/sched/loadavg.h>, to reduce the size and
    complexity of <linux/sched.h>.
====

The tapset will need to adapt.

-- 
You are receiving this mail because:
You are the assignee for the bug.

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