Discussion:
[omniORB] Timing stats
Olivier Chedru
2006-07-04 15:21:07 UTC
Permalink
Hi all,



In my server application, I would like to gather timing stats (basically
user and kernel thread times) for all omniORB threads.



I can use the createThread interceptor to add a new thread to the list
of worker threads being monitored but, unless I missed something, there
is no available interceptor for thread stop.



Any idea?



Thanks,

Olivier.



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.omniorb-support.com/pipermail/omniorb-list/attachments/20060704/6232f4b1/attachment.htm
Duncan Grisby
2006-07-04 21:14:41 UTC
Permalink
Post by Olivier Chedru
In my server application, I would like to gather timing stats (basically
user and kernel thread times) for all omniORB threads.
I can use the createThread interceptor to add a new thread to the list
of worker threads being monitored but, unless I missed something, there
is no available interceptor for thread stop.
You can allocate a per-thread storage key, and register an per-thread
object in your interceptor. When the thread exits, its per-thread
storage objects are deleted, so you can do whatever cleanup you need in
your object's destructor.

Cheers,

Duncan.
--
-- Duncan Grisby --
-- ***@grisby.org --
-- http://www.grisby.org --
Olivier Chedru
2006-07-04 21:43:00 UTC
Permalink
Hi Duncan,

You are right; omni_thread::allocate_key () and the related functions
will do the job.

Thanks a lot!
Olivier.

-----Original Message-----
From: Duncan Grisby [mailto:***@grisby.org]
Sent: Tuesday, July 04, 2006 5:15 PM
To: Olivier Chedru
Cc: omniorb-***@omniorb-support.com
Subject: Re: [omniORB] Timing stats
Post by Olivier Chedru
In my server application, I would like to gather timing stats
(basically
Post by Olivier Chedru
user and kernel thread times) for all omniORB threads.
I can use the createThread interceptor to add a new thread to the list
of worker threads being monitored but, unless I missed something,
there
Post by Olivier Chedru
is no available interceptor for thread stop.
You can allocate a per-thread storage key, and register an per-thread
object in your interceptor. When the thread exits, its per-thread
storage objects are deleted, so you can do whatever cleanup you need in
your object's destructor.

Cheers,

Duncan.
--
-- Duncan Grisby --
-- ***@grisby.org --
-- http://www.grisby.org --
Luke Deller
2006-07-05 06:08:46 UTC
Permalink
Hi Olivier,
I can use the createThread interceptor to add a new thread to the list of
worker threads being monitored but, unless I missed something, there is
no available interceptor for thread stop.
?
Actually you can the same interceptor for both. Your createThread interceptor function is required to call the run() method of the passed info_T instance; so you do your initialisation work before calling run(), and your cleanup work afterwards.

In case you didn't see the docs, they're here:
http://omniorb.sourceforge.net/omni40/omniORB/omniORB010.html#toc49

Regards,
Luke.

**********************************************************************************************

Important Note
This email (including any attachments) contains information which is
confidential and may be subject to legal privilege. If you are not
the intended recipient you must not use, distribute or copy this
email. If you have received this email in error please notify the
sender immediately and delete this email. Any views expressed in this
email are not necessarily the views of XPlan Technology.

It is the duty of the recipient to virus scan and otherwise test the
information provided before loading onto any computer system.
Xplan Technology does not warrant that the
information is free of a virus or any other defect or error.
**********************************************************************************************
Loading...