This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: python tracing
- From: David Smith <dsmith at redhat dot com>
- To: Cor-paul Bezemer - EWI <C dot Bezemer at tudelft dot nl>
- Cc: "systemtap at sourceware dot org" <systemtap at sourceware dot org>
- Date: Tue, 09 Apr 2013 10:16:01 -0500
- Subject: Re: python tracing
- References: <1365426684043-227721 dot post at n7 dot nabble dot com>,<5162D0AC dot 7050505 at redhat dot com> <46C9AEB13B3AC04C82D760CC81752171460461CE at SRV363 dot tudelft dot net>,<5162DB45 dot 20501 at redhat dot com> <46C9AEB13B3AC04C82D760CC817521714604636F at SRV363 dot tudelft dot net>,<51641687 dot 4030900 at redhat dot com> <46C9AEB13B3AC04C82D760CC81752171460464E6 at SRV363 dot tudelft dot net>
Let's try a couple of more things.
First, let's look for the special section that using markers create. Try
this, substituting PRIV_PYTHON_LIB as before:
# eu-readelf -S PRIV_PYTHON_LIB | grep stapsdt
On libc on my system, that reports:
# eu-readelf -S /usr/lib64/libc-2.17.so | fgrep stapsdt
[16] .stapsdt.base PROGBITS 00000030f5780be0 00180be0
00000001 0 A 0 0 1
[35] .note.stapsdt NOTE 0000000000000000 001ba8f0
00000294 0 0 0 4
You should see similar sections in your private python library. If you
see those sections, try the following, substituting PRIV_PYTHON_LIB as
before:
# stap -L 'process("PRIV_PYTHON_LIB").mark("*")'
On 04/09/2013 08:32 AM, Cor-paul Bezemer - EWI wrote:
> OK, I have tried this (eventually I updated my path). Still, the list returned by the command is empty :(
>
> --CP
> ________________________________________
> From: David Smith [dsmith@redhat.com]
> Sent: Tuesday, April 09, 2013 3:24 PM
> To: Cor-paul Bezemer - EWI
> Cc: systemtap@sourceware.org
> Subject: Re: python tracing
>
> On 04/09/2013 03:05 AM, Cor-paul Bezemer - EWI wrote:
>> I tried and noticed that the library path is incorrect (nonexistent). How can I found it which library python is using?
>>
>> Should I have a python process running when executing this command?
>> Or is it trying to hook to the 'default' python executable? (my patched Python is in a different directory
>
> Ah. The command I gave you (and the tapset itself) are trying to probe
> the system python, not your private python.
>
> You'll need to modify the tapset to point to your private version of
> python (instead of the system python). You don't have to have a python
> process running when executing the 'stap -L' command.
>
> So, modify that stap command to look something like the following, where
> 'PRIV_PYTHON' is the path to your private python executable (probably
> somewhere down in ~/Play/python2.7-2.7.4-rc1 if I'm reading your email
> correctly) and 'PRIV_PYTHON_LIB' is the path to the main python shared
> library.
>
> # stap -L 'process("PRIV_PYTHON").library("PRIV_PYTHON_LIB").mark("*")'
>
>
>>
>> --CP
>>
>>
>> ________________________________________
>> From: David Smith [dsmith@redhat.com]
>> Sent: Monday, April 08, 2013 4:59 PM
>> To: Cor-paul Bezemer - EWI
>> Cc: systemtap@sourceware.org
>> Subject: Re: python tracing
>>
>> On 04/08/2013 09:41 AM, Cor-paul Bezemer - EWI wrote:
>>> You are right, the tapset was missing.
>>> I used this one: http://packaging-farm.dachary.org/packaging-farm/fedora/x86_64/f14/root/usr/share/systemtap/tapset/libpython2.7-64.stp
>>>
>>> but am getting the error
>>> ./stap test_python.stp --runtime=dyninst -c'~/Play/python/python2.7-2.7.4~rc1/build-shared/python test.py'
>>> semantic error: while resolving probe point: identifier 'process' at /home/corpaul/stap/share/systemtap/tapset/python.stp:12:32
>>> source: probe python.function.return = process("python").library("/usr/lib64/libpython2.7.so.1.0").mark("function__return")
>>> ^
>>>
>>> semantic error: no match
>>> semantic error: while resolving probe point: identifier 'python' at test_python.stp:1:7
>>> source: probe python.function.return
>>> ^
>>>
>>> Pass 2: analysis failed. [man error::pass2]
>>
>> OK, we're getting a bit further now.
>>
>> Can you try the following command? This should show us what tracepoints
>> stap thinks are present in your python executable.
>>
>> # stap -L
>> 'process("python").library("/usr/lib64/libpython2.7.so.1.0").mark("*")'
>>
>> --
>> David Smith
>> dsmith@redhat.com
>> Red Hat
>> http://www.redhat.com
>> 256.217.0141 (direct)
>> 256.837.0057 (fax)
>>
>
>
> --
> David Smith
> dsmith@redhat.com
> Red Hat
> http://www.redhat.com
> 256.217.0141 (direct)
> 256.837.0057 (fax)
>
--
David Smith
dsmith@redhat.com
Red Hat
http://www.redhat.com
256.217.0141 (direct)
256.837.0057 (fax)