Re: ubuntu 11.10, systemtap and building my own kernel
On Tue, 10 Apr 2012, Frank Ch. Eigler wrote:
rpjday wrote:
[...] $ stap -e 'probe kernel.function("sys_open") {log("hello world") exit()}' and got: ===== start ===== [...] cc1: all warnings being treated as errors make[1]: *** [/tmp/stapadEYdA/stap_59bddd394f89d5f186da7e250db36434_876.o] Error 1 make: *** [_module_/tmp/stapadEYdA] Error 2 Pass 4: compilation failed. Try again with another '--vp 0001' option.
Please try systemtap 1.7, or build one out of <git://sourceware.org/git/systemtap.git>. Newer kernels sometimes break systemtap assumptions; these are fixed pretty quickly in the source tree, and get rolled into later releases.
Please report any further problems at <systemtap@sourceware.org>, including /usr/bin/stap-report output, if able.
just FYI, this is the current problem: ===== begin ===== $ git show 615399c84d1b8d8d8752629e5e5ab4e5044d6918 commit 615399c84d1b8d8d8752629e5e5ab4e5044d6918 Author: Rusty Russell <rusty@rustcorp.com.au> Date: Thu Mar 29 15:38:31 2012 +1030 cpumask: remove old cpu_*_map. These are obsolete: cpu_*_mask provides (const) pointers. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> diff --git a/include/linux/cpumask.h b/include/linux/cpumask.h index 1ffdb98..a2c819d 100644 --- a/include/linux/cpumask.h +++ b/include/linux/cpumask.h @@ -764,12 +764,6 @@ static inline const struct cpumask *get_cpu_mask(unsigned int cpu) * */ #ifndef CONFIG_DISABLE_OBSOLETE_CPUMASK_FUNCTIONS -/* These strip const, as traditionally they weren't const. */ -#define cpu_possible_map (*(cpumask_t *)cpu_possible_mask) -#define cpu_online_map (*(cpumask_t *)cpu_online_mask) -#define cpu_present_map (*(cpumask_t *)cpu_present_mask) -#define cpu_active_map (*(cpumask_t *)cpu_active_mask) - #define cpumask_of_cpu(cpu) (*get_cpu_mask(cpu)) #define CPU_MASK_LAST_WORD BITMAP_LAST_WORD_MASK(NR_CPUS) ===== end ===== in current systemtap, runtime.h: #define stp_for_each_cpu(cpu) for_each_cpu_mask((cpu), cpu_possible_map) so that's definitely going to fail. rday -- ======================================================================== Robert P. J. Day Ottawa, Ontario, CANADA http://crashcourse.ca Twitter: http://twitter.com/rpjday LinkedIn: http://ca.linkedin.com/in/rpjday ========================================================================
Hi - On Tue, Apr 10, 2012 at 04:17:25PM -0400, Robert P. J. Day wrote:
[...] just FYI, this is the current problem: [...]
Yup, found it. For now, you could adjust your copy of the runtime.h header file s/map/mask/ and have at it. We'll plop presently a polished patch into proper place. - FChE
On Tue, 10 Apr 2012, Frank Ch. Eigler wrote:
Hi -
On Tue, Apr 10, 2012 at 04:17:25PM -0400, Robert P. J. Day wrote:
[...] just FYI, this is the current problem: [...]
Yup, found it. For now, you could adjust your copy of the runtime.h header file s/map/mask/ and have at it. We'll plop presently a polished patch into proper place.
actually, would it be possible to simplify the code? i see that systemtap's stat.c defines its own CPU iteration macro: #define stp_for_each_cpu(cpu) for_each_cpu_mask((cpu), cpu_possible_map) is there no way to directly use the kernel's <linux/cpumask.h> file, and something like "for_each_possible_cpu"? in any event, i "git clone"d systemtap so i can just pull the fix when it's committed. rday -- ======================================================================== Robert P. J. Day Ottawa, Ontario, CANADA http://crashcourse.ca Twitter: http://twitter.com/rpjday LinkedIn: http://ca.linkedin.com/in/rpjday ========================================================================
Hi - On Tue, Apr 10, 2012 at 05:08:04PM -0400, Robert P. J. Day wrote:
actually, would it be possible to simplify the code? [...]
Yes, will do. (Some of this complexity came about from the desire to support very old kernels.) - FChE
participants (2)
-
Frank Ch. Eigler -
Robert P. J. Day