python + gcov

labrach at gmail.com labrach at gmail.com
Thu Aug 30 07:19:03 EDT 2007


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, labr... at gmail.com 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





More information about the Python-list mailing list