none
JIT COMPILER RRS feed

  • Question

  • IN WHICH MEMORY LOCATION   THE  JIT COMPILER OPERATIONS WILL BE SAVED .?

     

     

    what could be a good application to test the JIT compiler in .net?

    Tuesday, June 28, 2011 9:27 AM

Answers

  • Understanding JIT compiler

    JIT compiler compiles is the integral part of CLR. the MSIL code to Native code and executes the batch of code Just in time which will be cached and next time when the code gets executed from cache in stud of compiling again.

    http://www.codeproject.com/KB/dotnet/DotNetWhitePaper/image006.jpg

    JIT Execution process.

    CLR class loader lodes MSIL code and metadata are loaded into memory; the code manager calls the entry point method which is WinMain or DLLMain method. The JIT compiler compiles the method to before its execution of the entry point method. The code manager places the objects in memory and controls the execution of the code. The garbage collector performs periodic checks on the managed heap to identify the objects which is not in use for the application.

    At the time of program execution the type checker ensures that all objects and values, and the references of objects and values has its valid type. The type checker also makes sure that only valid operations are performed on the code other wise the exception will be thrown. The code is controlled by CLR at run time. CLR enforces security in following manner.

    • To control and access the system recourses like hard disk
    • To control and access the network connections
    • To control and access the other hard ware resources.

    Mr.GMKREDDY
    • Marked as answer by Mr.GMKREDDY Thursday, July 28, 2011 11:15 AM
    Thursday, July 28, 2011 11:15 AM

All replies

  • You can get the address of the compiled code of a managed method by the MethodInfo.MethodHandle.Value property.

    A sample of code that retrieve the address of the compiled method is the following (code taken from the project http://interceptor.codeplex.com):

     

    private static IntPtr GetMethodAddress( MethodInfo method )
    {
      var methodDescriptorAddr = method.MethodHandle.Value;
      var methodAddr = new IntPtr( methodDescriptorAddr.ToInt32() + ( IntPtr.Size * 2 ) );
    
      return methodAddr;
    }
    Tuesday, June 28, 2011 5:24 PM
  • i excepted that  .....

      the   operations should be saved in   stack n  heap   .....is this true?


    Mr.GMKREDDY
    • Marked as answer by Mr.GMKREDDY Saturday, July 9, 2011 2:32 PM
    • Unmarked as answer by Mr.GMKREDDY Thursday, July 28, 2011 11:14 AM
    • Marked as answer by Mr.GMKREDDY Thursday, July 28, 2011 11:14 AM
    • Unmarked as answer by Mr.GMKREDDY Thursday, July 28, 2011 11:14 AM
    Tuesday, June 28, 2011 5:31 PM
  • Error    1    The type or namespace name 'MethodInfo' could not be found (are you missing a using directive or an assembly reference?)    D:\DOTNET\DOTNET Source Codes\C# 2010\CONSOL based APPLICATION\JIT COMPILER\JIT COMPILER\Program.cs    12    48    JIT COMPILER

     

     

    I GOT THE ERROR LIKE DIS?

     

     

    CAN U PLEASE   SEND ME  THE  LINK   R FULL PROGRAME


    Mr.GMKREDDY
    Tuesday, June 28, 2011 6:36 PM
  • You can download the complete code at http://interceptor.codeplex.com/SourceControl/list/changesets. The intersted file is MethodHook32 (you can see the source online at http://interceptor.codeplex.com/SourceControl/changeset/view/3142#58170).

    The error is a bit strange, what version of the framework are you using and what type of application have you created (Silverlight, Console, ...)?

    Tuesday, June 28, 2011 9:48 PM
  • VS 2010

    IIS 5.1

    SQL SERVER 2008

    ACTIVE SYNC 4.5

       AM NOT PREPARING ANY APP  ..  I GOT Q  IN MICROSOFT  INTERVIEW  SO  JUST  SHARING


    Mr.GMKREDDY
    Wednesday, June 29, 2011 2:02 AM
  • The first error is due to the fact that is not defined the interface IMethodHook, you can resolve the problem by deleteing the dependency.

    The second error is due to the fact that the project is not compiled with the "permit unsafe code" option enabled. You should enable this option in the project settings.

    Wednesday, June 29, 2011 9:48 AM
  • TELL MEIS DER ANY TOOL TO PREDICT PERFORMANCE OF   JIT?

    Mr.GMKREDDY
    Wednesday, June 29, 2011 12:42 PM
  • Understanding JIT compiler

    JIT compiler compiles is the integral part of CLR. the MSIL code to Native code and executes the batch of code Just in time which will be cached and next time when the code gets executed from cache in stud of compiling again.

    http://www.codeproject.com/KB/dotnet/DotNetWhitePaper/image006.jpg

    JIT Execution process.

    CLR class loader lodes MSIL code and metadata are loaded into memory; the code manager calls the entry point method which is WinMain or DLLMain method. The JIT compiler compiles the method to before its execution of the entry point method. The code manager places the objects in memory and controls the execution of the code. The garbage collector performs periodic checks on the managed heap to identify the objects which is not in use for the application.

    At the time of program execution the type checker ensures that all objects and values, and the references of objects and values has its valid type. The type checker also makes sure that only valid operations are performed on the code other wise the exception will be thrown. The code is controlled by CLR at run time. CLR enforces security in following manner.

    • To control and access the system recourses like hard disk
    • To control and access the network connections
    • To control and access the other hard ware resources.

    Mr.GMKREDDY
    • Marked as answer by Mr.GMKREDDY Thursday, July 28, 2011 11:15 AM
    Thursday, July 28, 2011 11:15 AM