-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 03/12/11 20:39, Robert Harris wrote:
> Can you mail me a working and a non-working copy of your python?

Do this:

1. Clone my mercurial repository: <"hg clone
https://hg.jcea.es/cpython-2011/";>.

2. "hg up -r 2a7dedf6a65e".

3. Do "./configure --enable-shared --with-dtrace".

4. Do "make".

5. Do "LD_LIBRARY_PATH=current_PATH".

6. 'dtrace -l -n "python\$target:::" -c "./python -V"' works correctly.

7. Edit "Objects/unicodeobject.c". Go to line 49 and add the following
two lines:

"""
unsigned int dtrace_unicode_utf8_offset =
offsetof(PyCompactUnicodeObject, utf8);
unsigned int dtrace_unicode_utf8_length_offset =
offsetof(PyCompactUnicodeObject, utf8_length);
"""

8. Do "make".

9. 'dtrace -l -n "python\$target:::" -c "./python -V"' fails.

10. Edit "Objects/unicodeobject.c" again and comment those two lines
you just added.

11. Do "make".

12. 'dtrace -l -n "python\$target:::" -c "./python -V"' works.

13. Try to comment & uncomment those two lines and check several
times. When the lines are present, dtrace fails to locate the probes.
When the lines are commented, dtrace works.

I know that this doesn't make sense at all...

I am using GCC 4.6.2, with this conf:

"""
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/i386-pc-solaris2.10/4.6.2/lto-wrapper
Target: i386-pc-solaris2.10
Configured with: ../gcc-4.6.2/configure --with-gnu-as
- --with-ld=/usr/ccs/bin/ld --without-gnu-ld --enable-shared
- --enable-languages=c,c++,fortran,objc,obj-c++,go
Thread model: posix
gcc version 4.6.2 (GCC)
"""

The target is 32 bits.

If you are not able to reproduce the problem for any reason (maybe a
different GCC, no mercurial installed, whatever), I can send you the
two precompiled versions. ZIP compressed each version is around 2.5
MB, so 5MB in total (mime encoded for email would be 6.7MB).

Worse yet, if I merge the changes in python mainline to my branch, the
newly compiled python has the probes (I can list the probes in a
already running python process), but dtrace can't find them in 'dtrace
- -c "./python -V"' either. Messy and I can't explain it neither, of
course know how to solve it.

PS: I need to add those to global variables because
"PyCompactUnicodeObject" struct memory representation between GCC and
DTRACE are different. This is a bug to address in a future message. I
needed TWO days to diagnose this, but it is not the point now :-).

- -- 
Jesus Cea Avion                         _/_/      _/_/_/        _/_/_/
j...@jcea.es - http://www.jcea.es/     _/_/    _/_/  _/_/    _/_/  _/_/
jabber / xmpp:j...@jabber.org         _/_/    _/_/          _/_/_/_/_/
.                              _/_/  _/_/    _/_/          _/_/  _/_/
"Things are not so easy"      _/_/  _/_/    _/_/  _/_/    _/_/  _/_/
"My name is Dump, Core Dump"   _/_/_/        _/_/_/      _/_/  _/_/
"El amor es poner tu felicidad en la felicidad de otro" - Leibniz
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQCVAwUBTtrqoJlgi5GaxT1NAQIJegP+PtTxeDrUS/XPV4J9o/v0sd6yJ/QN2GOY
Sffr7AC3mEvwKYfaC6bOmvqKp7Qu/d3FH3tAONOqZs7X8IgUZ9QW5NocTgAZF1uk
UZDO2bb5solxtds8Ik92Lw/54gLyJgRsVeBaOIHifSF2yp/rKTa0pZEp7UtXw6J2
adJV6Eb1e3Y=
=ZKOC
-----END PGP SIGNATURE-----
_______________________________________________
dtrace-discuss mailing list
dtrace-discuss@opensolaris.org

Reply via email to