[omniORB] omniORBpy and sys.settrace

Duncan Grisby dgrisby@uk.research.att.com
Mon, 24 Sep 2001 11:58:30 +0100


On Friday 14 September, "Fazal Majid" wrote:

> I am trying to perform coverage analysis of Corba servers implemented using
> omniORBpy. I am using for this purpose a modified verion of Neil
> Schemenauer's code_coverage.py from the Quixote package
> (http://www.mems-exchange.org/software/python/quixote/).
> 
> The code coverage tool works by setting a trace function using
> sys.settrace().
> 
> Unfortunately, it seems Corba method invocations from omniORB upcalls are
> not being traced properly, thus rendering the whole idea moot. This problem
> would also make the Python profiler and debugger inoperative.

I believe that sys.settrace() is a per-thread thing. omniORB creates
its own threads to do upcalls, so those threads are not traced. You
can hook the omniORBpy thread creation with the
omniORB.addWThreadHook() function. With any luck, that will solve the
problem.

Cheers,

Duncan.

-- 
 -- Duncan Grisby  \  Research Engineer  --
  -- AT&T Laboratories Cambridge          --
   -- http://www.uk.research.att.com/~dpg1 --