Re: [eclipse-clp-users] Thread Handling and Performance Optimisation

From: Kish Shen <kisshen_at_...5...>
Date: Fri, 26 Mar 2010 23:35:49 +0000
Hi Christian,

Christian Wirth wrote:
> I've have two problems, that can hopefully be somehow solved:
> 
> 1) I need to limit the available CPU time for Eclipse CLP (called via 
> Java). A percentual limit would be best.
> 

This sort of thing is normally controlled by the OS, and not by 
individual programs. I think normally you set a priority for the process 
(at least on Unix like systems), rather than specifying the % of CPU 
time -- this give fairer control, as if no one else is using the 
machine, your low priority task will use up the CPU cycles that will 
otherwise be idle anyway. On the other hand, if the processor is busy 
with higher priority task, then your low priority task will not be 
taking up the CPU cycles at all....

> 2) Is it possible to determine which predicate is called how often/how 
> many CPU time it uses ? This way i could identify the bottlenecks of my 
> prolog code ...
> 

ECLiPSe provide various profilers for profiling your code, these are 
described in the User Manuals 'Development Support Tools' chapter:

http://eclipse-clp.org/doc/userman/umsroot083.html

There is the timing profiler, the port profiler, and the line coverage tool.

The timing profiler probably comes closest to your description, but note 
that this is not supported on Windows.

Cheers,

Kish

-- 
This e-mail may contain confidential and privileged material for the
sole use of the intended recipient. Any review, use, distribution or
disclosure by others is strictly prohibited. If you are not the intended
recipient (or authorized to receive for the recipient), please contact
the sender by reply e-mail and delete all copies of this message.
Cisco Systems Limited (Company Number: 02558939), is registered in
England and Wales with its registered office at 1 Callaghan Square,
Cardiff, South Glamorgan CF10 5BT.
Received on Fri Mar 26 2010 - 23:35:57 CET

This archive was generated by hypermail 2.3.0 : Wed Sep 25 2024 - 15:13:20 CEST