[Openmcl-devel] CPU usage of individual threads

Gary Byers gb at clozure.com
Wed Jan 18 17:46:17 PST 2012


There's nothing in CCL that does this (if there was, it'd just have to use
whatever OS-dependent thing an OS might provide.)

<http://msdn.microsoft.com/en-us/library/windows/desktop/ms683237%28v=vs.85%29.aspx>

shows how to access per-thread timing info on Windows (expressed as
almost-useless FILETIME structures ...).  If P is a CCL PROCESS
object, you can (currently) get a handle to the underlying Windows
thread via:

(%int-to-ptr (ccl::lisp-thread-native-thread (ccl::process-thread P)))

"Currently" in this context means "there are no plans to change that, but
if internal things like this changed in the future, don't be shocked.")


On Wed, 18 Jan 2012, Michael Minerva wrote:

> I was having some issue with massive slowdowns and high CPU usage from my CCL based application and I was trying to get an idea of which thread this slow down is coming from.  Is there any CCL way of inspecting how much CPU a particular thread is using or would I have to look at some Win32 function to try and figure this out (I am trying to diagnose this on Windows).
>
> --Mike
> _______________________________________________
> Openmcl-devel mailing list
> Openmcl-devel at clozure.com
> http://clozure.com/mailman/listinfo/openmcl-devel
>
>



More information about the Openmcl-devel mailing list