Code generated by JIT compiler

Hi,
I'm doing some research about Java and C performance on different platforms. My question: is it possible to access the code that is generated by JIT compiler. Without knowing what exactly JIT compiler does, only the statistical analysis (performance measurements) can be made...
Thank you in advance!
Vytautas Dusevicius,
M.Sc student in Aalborg University, Denmark

is it possible to access the code that is generated by JIT compiler.Considering that there is no "JIT compiler" any more, no. HotSpot generates fragments of native code at the basic block (or even finer) level within routines. I don't know if there's a dumper that can dump out the code sequences chosen.
Oh, you can try downloading the SCSL (Sun Community Source License) JDK sources, and reading the HotSpot source files..

Similar Messages

  • Problem with .c code generated from proc compiler.

    I am having a problem compiling the c code generated from the proc pre-compiler.
    First some info on my system.
    [root@dell-xps-420-22 ~]# cat /etc/redhat-release
    Red Hat Enterprise Linux Client release 5.4 (Tikanga)
    [root@dell-xps-420-22 ~]# cat /proc/version
    Linux version 2.6.18-164.11.1.el5 ([email protected]) (gcc version 4.1.2 20080704 (Red Hat 4.1.2-46)) #1 SMP Wed Jan 6 13:26:04 EST 2010
    [root@dell-xps-420-22 ~]# uname -a
    Linux dell-xps-420-22.drew.com 2.6.18-164.11.1.el5 #1 SMP Wed Jan 6 13:26:04 EST 2010 x86_64 x86_64 x86_64 GNU/Linux
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
    With the Partitioning, OLAP and Data Mining options
    I have written a simple PRO*C program to test the compile.
    [oracle@dell-xps-420-22 etl]$ cat Test.pc
    #include <stdio.h>
    main(int argc,char **argv)
    printf("Testing ........\n");
    [oracle@dell-xps-420-22 admin]$ cat pcscfg.cfg
    sys_include=(/usr/include,/usr/include/linux,/build/s630/precomp/public,/usr/lib/gcc/x86_64-redhat-linux/4.1.1/include)
    include=$(ORACLE_HOME)/precomp/public
    include=$(ORACLE_HOME)/precomp/hdrs
    include=$(ORACLE_HOME)/precomp/include
    CODE=cpp
    TYPE_CODE=ORACLE
    DEF_SQLCODE=YES
    VARCHAR=YES
    LTYPE=short
    define=__x86_64__
    When compiling the Test.pc program with the pcscfg.cfg file above.
    [oracle@dell-xps-420-22 etl]$ proc Test.pc
    Pro*C/C++: Release 10.2.0.1.0 - Production on Sun Feb 21 19:51:15 2010
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    System default option values taken from: /u01/app/oracle/product/10.2.0/db_1/precomp/admin/pcscfg.cfg
    [oracle@dell-xps-420-22 etl]$ gcc -c ./Test.c -I . -I$ORACLE_HOME/precomp/public
    ./Test.c:117: error: expected identifier or '(' before string constant
    ./Test.c:131: error: expected identifier or '(' before string constant
    The code generated by the proc compiler that has problems is below.
    //File Test.c
    // Prototypes
    Line 117: extern "C" {
    void sqlcxt (void **, unsigned int *,
    struct sqlexd *, const struct sqlcxp *);
    void sqlcx2t(void **, unsigned int *,
    struct sqlexd *, const struct sqlcxp *);
    void sqlbuft(void **, char *);
    void sqlgs2t(void **, char *);
    void sqlorat(void **, unsigned int *, void *);
    // Forms Interface
    Line 131: extern "C" { void sqliem(char *, int *); }
    It seems like the compiler is generating c++ code but the gcc compiler is only compiling in cc mode. I've tried a number of options in the pcscfg.cfg file to no avail. I have tried the different options for the CODE=cpp in the pcscfg.cfg file but still get the same error and/or multiple errors. I have also tried to compile the oracle demo programs using the demo_proc.mk file and also get the same error.
    The install of Oracle is fine. I can start the database and have created a needed user and tables but cannot successfully compile the pro*C code.

    My proc is also compiling for cpp code but in the pcscfg.cfg file there is no "CODE=cpp"

  • Need of a jit compiler

    hi,
    what i know is jit compiler is used to boostup the process of converting byte code into native machine code .then in the absence of jit who will do this process.
    and please also calrify
    will byte code be interpreted or complied into native code ?
    if jit compiler will compile the byte code into native code then why java is called interpreted language?

    hi,
    what i know is jit compiler is used to boostup the
    process of converting byte code into native machine
    code .then in the absence of jit who will do this
    process.What ever it is that is used instead.
    and please also calrify
    will byte code be interpreted or complied into native
    code ?Take a guess: why is it called compiler and not interpreter?
    if jit compiler will compile the byte code into
    native code then why java is called interpreted
    language?It isn't.

  • [svn:fx-trunk] 12077: Although Spark RichText does not support link formats , modifying compiled FXG to not generate ActionScript code that will cause compile time exceptions .

    Revision: 12077
    Revision: 12077
    Author:   [email protected]
    Date:     2009-11-20 18:16:32 -0800 (Fri, 20 Nov 2009)
    Log Message:
    Although Spark RichText does not support link formats, modifying compiled FXG to not generate ActionScript code that will cause compile time exceptions.
    Removing references to Flex Builder 3 in RPC.
    QE notes: N/A
    Doc notes: N/A
    Bugs:
    SDK-24305 - Link format property nodes cause errors on RichText in FXG 2.0
    SDK-24322 - A couple references to Flex Builder 3 in Flex 4 LangRef (and code comments)
    Reviewer: Deepa
    Tests run: checkintests
    Is noteworthy for integration: No
    Ticket Links:
        http://bugs.adobe.com/jira/browse/SDK-24305
        http://bugs.adobe.com/jira/browse/SDK-24322
    Modified Paths:
        flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/xml/XMLDecoder.as
        flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/fxg/FlexFXG2SWFTranscoder.java

  • Space limit for JIT-compiled code?

    I was just wondering if there is an upper limit on the amount of space that can be occupied by JIT-compiled native code.

    Yes, there is an upper limit.
    To anticipate your next question ;-), the upper limit is controlled by
    -Xmaxjitcodesize<size>
    Search for it on this page:
    http://blogs.sun.com/roller/resources/watt/jvm-options-list.html
    And, if you have the source code to look at [note 1], look for:
    define_pd_global(intx, InitialCodeCacheSize,         160*K);
    ....hotspot/src/share/vm/runtime/globals_core.hppNote 1:
    https://j2se.dev.java.net/

  • How do I edit the file created by code generator?

    hi all,
    I want to modify a java file that is generated when you create the webdynpro, but I can not change.
    // This file has been generated partially by the Web Dynpro Code Generator.
    // MODIFY CODE ONLY IN SECTIONS ENCLOSED BY @@begin AND @@end.
    // ALL OTHER CHANGES WILL BE LOST IF THE FILE IS REGENERATED.
    how can I disable the file to modify
    thanks!

    Hi Pablo.
    There's no way to modify it, NW2004s and its IDE has a code compilation based in some internal scripts based on eclipse plugin architecture.
    In your code you must consider this.
    1 - Try to find in your declared methods, importing directives, packages declarations  some like this:
    // This file has been generated partially by the Web Dynpro Code Generator.
    // MODIFY CODE ONLY IN SECTIONS ENCLOSED BY @@begin AND @@end.
    // ALL OTHER CHANGES WILL BE LOST IF THE FILE IS REGENERATED.
    package com.sap.teste;
    // IMPORTANT NOTE:
    // ALL IMPORT STATEMENTS MUST BE PLACED IN THE FOLLOWING SECTION ENCLOSED
    // BY @@begin imports AND @@end. FURTHERMORE, THIS SECTION MUST ALWAYS CONTAIN
    // AT LEAST ONE IMPORT STATEMENT (E.G. THAT FOR IPrivateTesteApp).
    // OTHERWISE, USING THE ECLIPSE FUNCTION "Organize Imports" FOLLOWED BY
    // A WEB DYNPRO CODE GENERATION (E.G. PROJECT BUILD) WILL RESULT IN THE LOSS
    // OF IMPORT STATEMENTS.
    //@@begin imports
    import com.sap.teste.wdp.IPrivateTesteApp;
    import com.sap.myimport.MyClass;
    //@@end
    //@@begin
    //@@end
    it means that between begin and end...you can add what you want..and the code will not be removed after class compilation....
      //@@begin javadoc:wdDoExit()
      /** Hook method called to clean up controller. */
      //@@end
      public void wdDoExit()
        //@@begin wdDoExit()
        //@@end
    int this case too....if you implement something between //@@begin and //@@end in the method scope...all part of your code will be surely safe.

  • Bug in the JIT compiler?

    Hi All,
    I don't know if I have found a bug in the JIT compiler.
    uname -a : Linux kiloo-server2 2.6.26-2-amd64 #1 SMP Fri Mar 27 04:02:59 UTC 2009 x86_64 GNU/Linux
    java -version:
    java version "1.6.0_12";
    Java(TM) SE Runtime Environment (build 1.6.0_12-b04)
    Java HotSpot(TM) 64-Bit Server VM (build 11.2-b01, mixed mode)
    all in our server module runs fine, until we try to rescale/transform an Image from a rss feed. after this a CompilerThread0 is started and never stops.
    it just keeps running at 100% on core0
    so right now we are running our server module with the -Xint option.. this is of course not an ideal solution.
    Before we moved the server module to linux, it was running on a windows machine (the same code), and there was no JIT compilerthreads problems.
    Is there anybody who has experienced anything like this, and is there a workaround to it?
    BR
    Kristian

    Kristian_Iversen wrote:
    Hi All,
    I don't know if I have found a bug in the JIT compiler.To start with you would need to reduce the code from your "server module" to a very small piece of code that demonstrates the problem.

  • JIT compiler and nested classes

    Q1. how does JIT compile on fly and improve the performance ?
    Q2. how is system.out.println(argument) implemented in java ? is it that system is a class in which out is a static nested class and println is a static method in out?

    Hello rishiluvsjava,
    Q1. How does JIT compile on fly and improve the performance?
    The following answer was taken from "The Java HotSpot Performance Engine Architecure: A White Paper About Sun's Second Generation Performance Technology" to view the full document go to:
    http://java.sun.com/products/hotspot/whitepaper.html
    Just-In-Time (JIT) compilers are essentially fast traditional compilers that translate the Java-technology bytecodes into native machine code on-the-fly. A JIT runs on the end-user's machine which actually executes the bytecodes, and compiles each method the first time it is executed.
    Q2. How is System.out.println(argument) implemented in java ? is it that system is a class in which out is a static nested class and println is a static method in out?
    From the Java docs:
    System is a public final class in the java.lang package. It has three fields:
    static PrintStream err    // The "standard" error output stream.
    static InputStream in    // The "standard" input stream.
    static PrintStream out  //The "standard" output stream.println is one of the methods in the java.io.PrintStream class.
    -Merwyn,
    Developer Technical Support,
    http://www.sun.com/developers/support.

  • JIT compiler "jitc" not found

    Hi,
    I've just installed JVM 1.4.2 for Unix Systems Services on z/OS 1.4 mainframe.
    When I issue the command java -version I get the following:
    # java -version
    Could not load dll : /usr/lpp/java/IBM/J1.4/bin/libjitc.so
    : EDC5157I An internal error has occurred.
    Warning: JIT compiler "jitc" not found. Will use interpreter.
    java version "1.4.2"
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2)
    Classic VM (build 1.4.2, J2RE 1.4.2 IBM z/OS Persistent Reusable VM build cm142-
    20070329 (SR8) (JIT disabled))
    I have check for libjitc.so in the java directory and it is there. Java compiles and runs fine. Can anyone help?

    OS/400 interprets Java methods until reaching the threshold specified by the os400.jit.mmi.threshold Java system property. After reaching the threshold, OS/400 uses the JIT compiler to compile methods into native machine instructions.
    To use the Just-In-Time compiler, you need to set the compiler value to jitc (default it isn't). You can set the value by adding an environment variable or setting the java.compiler system property. Select one method from the list below to set the compiler value:
    * From a command line prompt on your iSeries server, add the environment variable by using the Add Environment Variable (ADDENVVAR) command. Then, run your Java program using the Run Java (RUNJVA) command or JAVA command. For example, use:
    ADDENVVAR ENVVAR (JAVA_COMPILER) VALUE(jitc)
    JAVA CLASS(Test)
    * Set the java.compiler system property on the iSeries command line. For example, enter JAVA CLASS(Test) PROP((java.compiler jitc))
    * Set the java.compiler system property on the Qshell Interpreter command line. For example, enter java -Djava.compiler=jitc Test
    Once you set this value, the JIT compiler optimizes all of the Java code before running it.

  • The code generated by EJBC in Weblogic 5.1 is wrong!

    I have a container managed bean that has a primary key named
    productLicenseId as follows:
    public class ProductLicenseBean implements EntityBean
    public int productLicenseId;
    I had this code running in Weblogic 4.5.1 and converted it to EJB 1.1
    (now I use java.lang.Integer for the primary key class) and attempted to
    build it using WebLogic 5.1. I built your container managed example
    (AccountBean), which built fine (it is clear why your example did not
    have the problem mine did- the primary key is java.lang.String). After
    that, I tried to build my container managed bean, but without success.
    Here is a description of my problem:
    After trying to compile my simple container-managed program using EJBC
    in Weblogic 5.1, I get the following error:
    ProductLicenseBeanEOImpl.java:56: Incompatible type for =. Can't convert
    int to java.lang.Integer
    pk = bean.productLicenseId;
    ProductLicenseBeanEOImpl.java is a class that was generated by EJBC. It
    is clear that this code is incorrect! The generated code (pk =
    bean.productLicenseId) attempts to assign the primary key in the
    ProductLicenseBean (an int) to a java.lang.Integer (pk is of type
    java.lang.Integer), which is wrong! The source code generated by EJBC is
    wrong!
    Do you have a bug fix for this, or is there something I'm just not
    getting?? !!
    I should be able to use a java.lang.Integer as a primary key.
    Thanks much for your help.
    Tim Kimmet, [email protected]
    [timk.vcf]

    I had the same problem. I had used the deployer tool and had specified a
    primary key class AND a primary key field "ID".
    This had put an extra tag in the ejb-jar.xml file <persistence field> which
    I hadn't seen before.
    Changing the primary key field to "none" fixed caused other problems to show
    up in the deployer tool (finders). I had to redo the
    deployer project from scratch, this time keeping the primary key field to
    "none" and it worked.
    Tim Kimmet <[email protected]> wrote in message
    news:[email protected]..
    I have a container managed bean that has a primary key named
    productLicenseId as follows:
    public class ProductLicenseBean implements EntityBean
    public int productLicenseId;
    I had this code running in Weblogic 4.5.1 and converted it to EJB 1.1
    (now I use java.lang.Integer for the primary key class) and attempted to
    build it using WebLogic 5.1. I built your container managed example
    (AccountBean), which built fine (it is clear why your example did not
    have the problem mine did- the primary key is java.lang.String). After
    that, I tried to build my container managed bean, but without success.
    Here is a description of my problem:
    After trying to compile my simple container-managed program using EJBC
    in Weblogic 5.1, I get the following error:
    ProductLicenseBeanEOImpl.java:56: Incompatible type for =. Can't convert
    int to java.lang.Integer
    pk = bean.productLicenseId;
    ProductLicenseBeanEOImpl.java is a class that was generated by EJBC. It
    is clear that this code is incorrect! The generated code (pk =
    bean.productLicenseId) attempts to assign the primary key in the
    ProductLicenseBean (an int) to a java.lang.Integer (pk is of type
    java.lang.Integer), which is wrong! The source code generated by EJBC is
    wrong!
    Do you have a bug fix for this, or is there something I'm just not
    getting?? !!
    I should be able to use a java.lang.Integer as a primary key.
    Thanks much for your help.
    Tim Kimmet, [email protected]

  • Difference between JIT compiler and Execution engine...

    where does bytecode get generated???is is in the JIT compiler or in the execution engine???What actually is the process happening inside JVM???can anybody help me in knowing this???

    where does bytecode get generated?Bytecode is the output of javac, the j2se sdk java source compiler.
    is it in the JIT compiler or in the execution engine?No, and No.
    What actually is the process happening inside JVM?The bytecode of the classes to be used
    is loaded and verified
    For an application the main() method of the primary class is launched.
    can anybody help me in knowing this?Unknown.
    We can tell you the answers to the questions you seem to be asking.
    It would help if you could be a bit more specific.

  • Invoking code generated at runtime

    Is there a possibility to create at runtime a piece of code
    e.g. in String variable and invoke it ?
    for example something like that:
    var sf = "function xyz():void { do_something } "
    run sf
    ??

    I'm 95% sure that this can't be done, because SWF files are
    compiled and the Flash player does not provide a JIT compiler
    (unlike Java and .NET).
    I was thinking about a brute-force trick, but I'm sure it
    won't work. Anyway I'll tell you. You let the script create a local
    .as file with the script within the string variable, and then run
    an include("tempfile.as") instruction from a function inside an
    external .as file. The problem is that I don't know if .as files
    can be live-interpreted.
    The only trick you can do is to process the request
    server-side. PHP and ASP.NET allow you to run custom code and
    return the value you want. I have a VB.NET example on my book,
    about parsing math functions.
    If your application runs server-side you may opt for this
    elegant solution that, unfortunately, wastes bandwidth and puts
    your server in
    severe security danger.

  • Problem w/ Java code generated by Darwin

    Our net model from [Options]/[Generate Code]/[Java] would not compile. The code has something like
    CD_BUYER = (String ) output[0];
    while output[0] is a double.
    Is there any fix to this problem?

    Hi,
    These Mapping Functions are coming as a Jar file which is a set of Class Files that SAP gives.
    So there is no question to be able to see it's code.
    Anytime what you will get is a class file and not JAVA file.
    Regards,
    Akshay.
    Dont forget to reward points,

  • Regarding JIT compiler

    Hi,
    I would like to know what is a JIT compiler and how it works.My understanding of JIT compiler is that it is a compiler that takes in as input the bytecode and gives native code as output which is then interpretted by interpretter.I guess JIT compiler helps in speedig up the loops, but i dont know how.Could someone explain JIT and its features in detail or provide a useful link where i could get these details.
    Thanks!!Have a Great Day!
    vivek

    Hi,
    Thanks a lot guys. Well both the artciles were great.So to my understanding now......the portion of code which is bieng compiled by JIT need not be interpretted by Interprettor......am i right?so what JIT does is ...it converts the bytecode into series of intsructions that are understood by the underlying microporocessor......and the mp executes the instructions.......am i correct?
    i have another doubt.......take a small pece of program which has no loop.........
    int a =5;
    int b= 6;
    int c= a +b;
    in this case if u use JIT compiler time taken will be
    time taken by JIT to convert bytecode to machin code + time taken by CPU to execute the entire code.
    in the caseof using interprettor :
    well i guess interpretter executes each line at a time, so it converts the byte code into machine code one line at a time and CPU executes it.
    so time taken is
    time taken by Interprettor to convert each line of bytecode to machine code + time taken by CPU to execute each line of code.
    SO I guess JIT compiler wud be faster.SO wudnt it be advantageous over inteprettor in all cases?Or does JIT compiler waste time in optimizing small pieces of code which does not reqiure optimization in which cases interpretter is quicker?
    Thanks!
    Vivek

  • Warning codes generated in UCCHECK   - Technical Upgrade - 4.0b to ECC 6.0

    Hi SDN'ers ,
    I am currently working on Technical Upgrade project from 4.0 b system to ECC 6.0 system . I am facing a
    problem relating to the analysis of the warnings displayed whehn we run the UCCHECK for the client inventory by
    checking the "Display lines that cannot be analyzed statically" option under the Selection-screen block
    "Statements that cannot be analyzed statically" .Based on the warning codes generated during UCCHECK, they can
    be classified into 12 different categories given below in the list ( Viz. ABB,MESSAGEG!C,MESSAGEG!D......MESSAGEG!P).The same are given below in the end
    I want to know
    - Which are the warning codes which need resolution so that the program does not encounter any runtime
    errors or during Integration testing ?
    - Do all the offset related errors (For example ;variable A = B+offset(length)
    or  variable A+offset(length) = B ) need resolution so that the program gives no runtime error.
    - Also, do all statements where length is calculated using STRLEN also need changes ? I have seen offset length related warnings come under MESSAGEG!M warning code.
    The objective of this is to make sure that the upgraded system ECC 6.0 in Australia ,when rolled out to
    non-English speaking geographies in APAc such as Malaysia,Japan or China would only need translations and no ABAP Coding effort even when using languages such as Japanese which have double byte characters.
    S.No.     Error Code     Message
    1     ABB     Syntax Check Aborted
         ABB Total     
    2     MESSAGEG!C      check at runtime. at runtime.
               statement because of untyped or generic operands. It can only carry out this
              The system could not perform a static convertibility check on the current
         MESSAGEG!C Total     
    3     MESSAGEG!D      out this check at runtime. It can only carry out this check at runtime.
               to a table line because of untyped or generic operands. It can only carry out
              The system could not perform a static check on convertibility from a work area
         MESSAGEG!D Total     
    4     MESSAGEG!E      check at runtime. at runtime.
               defined by a "DATA" statement. .
               statement because of untyped or generic operands. It can only carry out this
              Field "ELEMENTN" is unknown. It is neither in one of the specified tables nor
              The system could not perform a static comparability check on the current
         MESSAGEG!E Total     
    5     MESSAGEG!F      operand "<FELD1>" for the current statement. .
         MESSAGEG!F Total     
    6     MESSAGEG!G      current statement on incompletely typed operand "<DATA>". .
         MESSAGEG!G Total     
    7     MESSAGEG!H      for the incompletely typed operand "<S>". . - - - - - - - - -
              The system cannot perform a static check on a character-type field data type
         MESSAGEG!H Total     
    8     MESSAGEG!I      incompletely-typed operand "<A>" in the current statement. .
              The system cannot perform a static check on a character-type data type for the
         MESSAGEG!I Total     
    9     MESSAGEG!J      "<%_1_SYSINI>" in the current statement to check whether the operand can be
              The system cannot perform a static check on incompletely-typed operand "VALUE"
         MESSAGEG!J Total     
    Early response wil be highly appreciated.

    Hi Karthik
    >
    > 1) SPDD adjustments are done in which phase? PREPARE or UPGRADE?
    >
    SPDD is done in Upgrade ->Phase ACT_700
    > 2) Are here special cases where the adjustments need to be done before running the UPGRADE phase?
    >
    At ACT_700 phase stop the upgrade and take a backup of the DB and the PUT<DIR> before starting the SPDD activity.
    Make sure there are no pending tp request.  Either release them or delete them.
    All phase need to be completed successfully in PREPARE, before starting UPGRADE
    Cheers
    Shaji
    Edited by: Shaji Jacob on May 5, 2008 9:23 PM

Maybe you are looking for

  • Shantanu Narayen, President and CEO of Adobe

    Here is some general information about the history of Adobe for new users. But later on quotes from Shantanu Narayen, President and CEO of Adobe. 1) In 2005 Adobe buys Macromedia: "On April 18, 2005 Adobe Systems announced a definitive agreement to a

  • MBP switches off without warning at 15% battery

    After recently upgrading to 10.6.5, I was working on my MBP and when it hit 15% of battery, without warning the laptop completely shut itself off. To reboot, I had to plug it in to power up. This has happened both times I've run low, and I have yet t

  • FI- CA -  Problems with transaction FPINTM1 - Interest run

    I have 2 doubts with this transaction. The user has run this transaction with the option "all items" in Interest Parameters so this may cause several troubles for the Business partners. Question 1:  How can I reverse the interest run with fpintm1? Qu

  • Integration using XML

    Good morning to everyone! I am still very new to XML. Currently, I have a problem in integrating 2 different systems. In my hand , I have an asset management system that written in J2EE environment and from here I need to integrate with SAP system. B

  • System Refresh ECC6 Windows/MSSQL

    Hi everybody, I have to make a refresh from the PRD system to the QAS system. I do not need to make a system copy. I can not find any documentation or thread to do it. I red some documentation about detach/attach the database or backup/restore it. I