Clearing JIT buffer
-
Hi I am trying to test the time it takes my .NET application to load 1st time. When the application is called the 1st time, the JIT compiler generates a native code. I am looking for a way to clear the cache which is holding thie native code, so I can measure the time the app takes to load accurately. Any tips would be welcome! thank you.
-
Hi I am trying to test the time it takes my .NET application to load 1st time. When the application is called the 1st time, the JIT compiler generates a native code. I am looking for a way to clear the cache which is holding thie native code, so I can measure the time the app takes to load accurately. Any tips would be welcome! thank you.
You try writing an unmanaged loader to instrument the load time of the app by binding to a specific runtime (not the current one) and launching the app. See Hosting the Common Language Runtime for more information. Also check out the Unmanaged API Reference, especially CorBindToRuntimeEx This may not work, as I'm not sure how different instances of the load time of the newly hosted runtime is affected by an already loaded instance of a runtime version. Good luck!
Ian Mariano - http://www.ian-space.com/
"We are all wave equations in the information matrix of the universe" - me