[omniORB] omniORBpy and sys.settrace

Fazal Majid fmajid@kefta.com
Tue, 25 Sep 2001 19:33:37 -0700


This works fine.
I have added a HOWTO on the omniORB tips Wiki.

Yours,

-- 
Fazal Majid                          Chief Technology Officer
fmajid@kefta.com                     Kefta
Voice: +1 415 391 6881 ext 8014      153 Kearny St. Suite 209
Fax: +1 415 391 7097                 San Francisco, CA 94108, USA


> -----Original Message-----
> From: owner-omniorb-list@uk.research.att.com
> [mailto:owner-omniorb-list@uk.research.att.com]On Behalf Of Duncan
> Grisby
> Sent: Monday, September 24, 2001 3:59 AM
> To: Fazal Majid
> Cc: omniorb-list@uk.research.att.com
> Subject: Re: [omniORB] omniORBpy and sys.settrace 
> 
> 
> 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 --
> 
>