[C++-sig] boost.python / bjam

2008-10-15 Thread Mark Williams


Hi, is it possible to build boost.python such that the python version 
gets embedded in the .so name along with the compiler name, version, 
multithread flags, etc? For example, 
"libboost_python25-gcc41-mt-1_35.so" instead of 
"libboost_python-gcc41-mt-1_35.so"


Alternatively, is it possible to build it without the embedded SONAME so 
that it can be renamed afterwards?


Thanks in advance,

Mark
___
Cplusplus-sig mailing list
Cplusplus-sig@python.org
http://mail.python.org/mailman/listinfo/cplusplus-sig


Re: [C++-sig] profiling C++ python extension

2008-11-21 Thread Mark Williams

Alex Mohr wrote:

I am aware that oprofile and  valgrind exist.

Has anyone of you ever done profiling
a C or C++ extension with gprof?


Not me, but I have to say that valgrind's callgrind tool with 
kcachegrind to view the results has been perhaps the best profiling 
experience I've had on Linux.  I've had good success using these tools 
to profile C++ python extensions.



I've had great results profiling Python extensions, too, but with 
Google's profiler: http://code.google.com/p/google-perftools/


Mark
___
Cplusplus-sig mailing list
Cplusplus-sig@python.org
http://mail.python.org/mailman/listinfo/cplusplus-sig


Re: [C++-sig] profiling C++ python extension

2008-11-21 Thread Mark Williams

stephan nies wrote:

Hi Mark,

just had a quick glance at the google-perftools documentation.

Could you provide a little more Detail in how you use it
with a python extension? Do you link against libprofiler.so
or do you use LD_PRELOAD ?

Do you do anything special other than that? Or do you
just start your python application?
  
What I ended up doing was writing a small module (linked against 
libprofiler.so) containing bindings for the ProfilerStart/ProfilerStop 
functions. Then I could just import that module in Python and call 
start/stop around the sections I wanted to profile. After that I just 
ran "pprof" over the resulting file to create a PDF showing the call 
graph and timings.


Cheers,
Mark
___
Cplusplus-sig mailing list
Cplusplus-sig@python.org
http://mail.python.org/mailman/listinfo/cplusplus-sig