python + gcov

2007-08-29 Thread labrach
Hi
I want to profile (and analyse coverage) some  c++ code imported as a
python module
I've compiled python (2.4.2) with gcc 3.4.3 and flags=-Wall -fprofile-
arcs -ftest-coverage in order to use gcov. However, the python binary
does not generate any coverage file (such than *.gcno, gcda) during
execution.
any tips ?
or may be another method to profile c++ wrapped modules within
python ?

thanks

laurent

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: python + gcov

2007-08-30 Thread labrach
Some precisions :
I've forced the configuration options with the followings flags in the
Makefile.pre :
  OPT='-Wall -fprofile-arcs -ftest-coverage -pg'
  BASECFLAGS='-Wall -fprofile-arcs -ftest-coverage -pg'
  LDFLAGS='-Wall -fprofile-arcs -ftest-coverage -pg'
  XLINKER='-Wall -fprofile-arcs -ftest-coverage -pg'

But, the coverage files are not produced by a simple : python -c
'print "Hello"'
while the gmon.out is produced

Another questions is:
the wrapped c++ module is also compile with -pg flags (and -fprofile-
arcs -ftest-coverage  as well) but the profile information does not
appear in the gmon.out
Do I need to make a static extension of my imported module to profile
it ?

thanks anyone ...

laurent


On 29 août, 18:22, [EMAIL PROTECTED] wrote:
> Hi
> I want to profile (and analyse coverage) some  c++ code imported as 
> apythonmodule
> I've compiledpython(2.4.2) with gcc 3.4.3 and flags=-Wall -fprofile-
> arcs -ftest-coverage in order to usegcov. However, thepythonbinary
> does not generate any coverage file (such than *.gcno, gcda) during
> execution.
> any tips ?
> or may be another method to profile c++ wrapped modules withinpython?
>
> thanks
>
> laurent


-- 
http://mail.python.org/mailman/listinfo/python-list

Re: python + gcov

2007-08-31 Thread labrach

> I always bit the bullet and finally just did that.

and here the steps to follow ...
http://plexity.blogspot.com/2006/02/profiling-python-extensions.html

laurent


-- 
http://mail.python.org/mailman/listinfo/python-list