Hi.
My profiler needs to profile some of the Framework libraries, and so the
contents of the native image cache need to be changed.
I would really like to be able to just do a "ngen.exe /prof mscorlib.dll"
and then have this version or mscorlib picked up when profiling (and when
not profiling, have the defeault native image loaded).
However, this does not happen, and it appears that I need to either have no
versions of mscorlib.dll in the native image cache, or have ONLY the
"ngen.exe /prof mscorlib.dll" version in there. If there are any others then
my profiling code does not work.
Does anyone know how I could force the runtime to load the profiled-native
mscorlib when profiling, and load the default-native version in all other
cases?
Thanks in advance.
Simon
Jonathan Keljo [MS] - 24 May 2004 21:03 GMT
Hi Simon,
The purpose of NGEN /prof is to enable enter/leave and transition
callbacks for the profiler (that is--or at least should be--the only
difference between NGEN /prof and regular NGEN in v1.1). So the way to
force an NGEN /prof image to get loaded is by requesting enter/leave
(COR_PRF_MONITOR_ENTERLEAVE) or transition callbacks
(COR_PRF_MONITOR_CODE_TRANSITIONS).
Jonathan
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
| From: "Simon Sheffield" <sisheffield@hotmail.com>
| Subject: Profiling NGEN'ed modules
[quoted text clipped - 7 lines]
| Newsgroups: microsoft.public.dotnet.framework.clr
| NNTP-Posting-Host: 80-28-111-230.adsl.nuria.telefonica-data.net
80.28.111.230
| Path:
cpmsftngxa10.phx.gbl!TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP12
.phx.gbl
| Xref: cpmsftngxa10.phx.gbl microsoft.public.dotnet.framework.clr:10537
| X-Tomcat-NG: microsoft.public.dotnet.framework.clr
[quoted text clipped - 18 lines]
|
| Simon