[Bug runtime/29832] probe python.function.entry does not get hits (while .return does)
mcermak at redhat dot com
sourceware-bugzilla@sourceware.org
Tue Dec 13 09:28:40 GMT 2022
https://sourceware.org/bugzilla/show_bug.cgi?id=29832
--- Comment #3 from Martin Cermak <mcermak at redhat dot com> ---
I've verified that the testcase/scenario *does* work with both GDB and
systemtap with *python2*, and that the testcase *does not* work with both GDB
and systemtap with *python3*:
# cat test.py
import random, time
print(random.random())
# print(random.randrange(1,100))
time.sleep(3)
#
# cat cmds
# run program so that all .SO's load and so do the static markers
r
# list avail static markers
info probes stap python
# the following conditional breakpoint doesn't work, for some
# reason it fires always, regardless the condition
# b -probe-stap function__return if strstr(filename, "random")
# so instead of the conditional breakpoint, set up a set of
# commands to run on each breakpoint hit
b -probe-stap function__entry
commands 1
p (char*)$_probe_arg0
c
end
r
#
# gdb --command=cmds --batch --args python2 ./test.py | grep -F random
$706 = 0x7ffff79c3b94 "/usr/lib64/python2.7/random.py"
$723 = 0x7ffff79c3284 "/usr/lib64/python2.7/random.py"
$724 = 0x7ffff79c35f4 "/usr/lib64/python2.7/random.py"
$725 = 0x7ffff79c39b4 "/usr/lib64/python2.7/random.py"
$726 = 0x7ffff79bb324 "/usr/lib64/python2.7/random.py"
$727 = 0x7ffff79bb3c4 "/usr/lib64/python2.7/random.py"
#
# gdb --command=cmds --batch --args python3 ./test.py | grep -F random
#
# stap --poison-cache -we 'probe
process("/usr/lib*/libpython*.so*").mark("function__entry") {filename =
user_string($arg1); if (filename =~ "random") {println(filename)}}' -c
'python2 ./test.py'
/usr/lib64/python2.7/random.py
0.366413745444
/usr/lib64/python2.7/random.py
/usr/lib64/python2.7/random.py
/usr/lib64/python2.7/random.py
/usr/lib64/python2.7/random.py
/usr/lib64/python2.7/random.py
#
# stap --poison-cache -we 'probe
process("/usr/lib*/libpython*.so*").mark("function__entry") {filename =
user_string($arg1); if (filename =~ "random") {println(filename)}}' -c
'python3 ./test.py'
0.6176074507358171
#
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the Systemtap
mailing list