From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 67C073871FB1; Tue, 13 Dec 2022 09:28:42 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 67C073871FB1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1670923722; bh=SemJ08sHDu6gfjZfjR7OXifl3lHnSdozlJ5v8mOXuAw=; h=From:To:Subject:Date:In-Reply-To:References:From; b=lcaMHg9lv8wRYtDkORBE5ZwiApmy9jz1eqlwJHcMv4RD9SHyTJ+8EKgWNJhDBfmQ7 fgbOrJXcMzwMp2ArBZLcPDvXy67VH4ogVLlMzr2wI+j37LdIriTBAHBuKeBkTPqUzF X6tvgd1+B5mn/6ccwf2C9QFpNjmwQFAC5SYkVxG8= From: "mcermak at redhat dot com" To: systemtap@sourceware.org Subject: [Bug runtime/29832] probe python.function.entry does not get hits (while .return does) Date: Tue, 13 Dec 2022 09:28:40 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: systemtap X-Bugzilla-Component: runtime X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: mcermak at redhat dot com X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: systemtap at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D29832 --- Comment #3 from Martin Cermak --- 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 G= DB and systemtap with *python3*: # cat test.py=20 import random, time print(random.random()) # print(random.randrange(1,100)) time.sleep(3) #=20 # cat cmds=20 # 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=3Dcmds --batch --args python2 ./test.py | grep -F random $706 =3D 0x7ffff79c3b94 "/usr/lib64/python2.7/random.py" $723 =3D 0x7ffff79c3284 "/usr/lib64/python2.7/random.py" $724 =3D 0x7ffff79c35f4 "/usr/lib64/python2.7/random.py" $725 =3D 0x7ffff79c39b4 "/usr/lib64/python2.7/random.py" $726 =3D 0x7ffff79bb324 "/usr/lib64/python2.7/random.py" $727 =3D 0x7ffff79bb3c4 "/usr/lib64/python2.7/random.py" #=20 # gdb --command=3Dcmds --batch --args python3 ./test.py | grep -F random #=20 # stap --poison-cache -we 'probe process("/usr/lib*/libpython*.so*").mark("function__entry") {filename =3D user_string($arg1); if (filename =3D~ "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 #=20 # stap --poison-cache -we 'probe process("/usr/lib*/libpython*.so*").mark("function__entry") {filename =3D user_string($arg1); if (filename =3D~ "random") {println(filename)}}' -c 'python3 ./test.py' 0.6176074507358171 # --=20 You are receiving this mail because: You are the assignee for the bug.=