On Wed, 2010-02-10 at 17:42 +0800, Wenji Huang wrote:
Hi,
There will be warning if we run the following test on
RHEL5, Fedora kernel or utrace kernel.
$ stap -p4 testsuite/buildok/context_test.stp
WARNING: "uprobe_get_pc"
[/tmp/staphrGioI/stap_0aef4ead3fec39f2dee30c60b1b684d2_8042.ko] undefined!
/home/wjhuang/.systemtap/cache/0a/stap_0aef4ead3fec39f2dee30c60b1b684d2_8042.ko
There reason is from print_ubacktrace() in probe.
In fact, if we run stap -ve 'probe begin(print_ubacktrace()){}' on
utrace kernel without loaded uprobes module. We can see the error
Error inserting module
'/tmp/stap0t5pyH/stap_5bd1a1d6b83ff84cfa8e7c67a402fa40_1153.ko': Unknown
symbol in module
since no symbol uprobe_get_pc can be resolved.
And that is because the uprobes module isn't pulled in?
This seems to come from commit 4c5ce7 which introduced a call to
uprobe_get_pc() in __stp_stack_print().
How can we make sure that if that is used (through ubacktrace) the
uprobes module gets automagically loaded?