Just for the sake of completeness, JIT compilation occurs the first time
a method is executed, subsequent calls execute the native code that was
previously generated in that particular execution.
The next time the assembly is loaded, the process start all over again,
or you can choose the other mode of compilation called install-time code
generation.

See more at:
http://msdn.microsoft.com/library/en-us/cpguide/html/cpconjitcompilation
.asp


-----Original Message-----
From: Ian Griffiths [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, August 14, 2002 9:36 AM
To: [EMAIL PROTECTED]
Subject: Re: [ADVANCED-DOTNET] Which methods have been Jit complied

First of all, be aware that JIT compilation happens every time you run.
The
CLR doesn't store the compiled results anywhere permanent - it just JIT
compiles into memory.

So if by "a set of assemblies" you mean a set of assemblies on disk
somewhere, the information you seek doesn't actually exist - all JIT
compiled code is just abandoned when the process exits.

If you mean a set of assemblies loaded in a particular process or
appdomain,
then in principal you could find this out - as someone else has already
pointed out, the profiling APIs let you do this.

This is not wholly trivial.  You can't attach a profiler to a process
that
is already running, you have to make sure that it gets loaded up front.
You
do this by setting a particular environment variable to contain the
CLSID of
your profiler - yes, .NET profilers must be implemented as classic
unmanaged
COM components.

So if you need to have this information available to you from within the
CLR, things are a little tricky - conceptually profilers run outside of
the
CLR.


--
Ian Griffiths
DevelopMentor

----- Original Message -----
From: "Stefan Finch" <[EMAIL PROTECTED]>


Is it possible to take a set of assemblies and see which methods/classes
have been Jit compiled, and which haven't yet (i.e. not executed)?

You can read messages from the Advanced DOTNET archive, unsubscribe from
Advanced DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

You can read messages from the Advanced DOTNET archive, unsubscribe from Advanced 
DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

Reply via email to