beautiful fashion jewelry wholesale Does the same speed of Java virtual machine even appear the AOT compilation method?

beautiful fashion jewelry wholesale

1 thought on “beautiful fashion jewelry wholesale Does the same speed of Java virtual machine even appear the AOT compilation method?”

  1. typical wholesale discount for jewelry Whether it is a physical or virtual machine, most of the program code from the beginning to the target code or the instruction set of the virtual function execution of the physical machine from the beginning to the final step will be performed.

    The green module can be implemented selectively. It is easy to see that the branch in the middle of the figure above is the process of explaining the execution (that is, an interpretation of a byte code, a bytecode, and the execution, and the branch below is The generation process of machine code.
    Today, most of the language based on physical machines, virtual machines, etc., mostly follow this idea based on the principles of modern classic compilation. Before performing the implementation Tree. For the realization of a specific language, phylics and grammar analysis, and even the optimizer and target code generator later can choose to perform the engine independently to form a complete compiler to achieve it. Such representatives are C/C language. Essence You can also implement a semi -independent compiler before the steps before the abstract syntax tree or instruction flow. Such representatives are Java language. Or you can concentrate these steps with the execution engine, such as most of the actuators.
    javac compilation
    M mentioning "compilation" in Java, naturally it is easy to think of the process of compiling the*.java file into*.class files. Other front -end compilers include an increased compiler ECJ in ECLIPSEJDT. The corresponding back -end compiler, it transforms the byte code into a machine code during the program running (the current Java program basically explains the execution and compilation execution), such as the JIT (HOTSPOT virtual machine (JIT ( JustintimeCompiler) compiler (divided into client and server). In addition, sometimes it may encounter a static advance compiler (AOT, AHEADOFTIMECOMPILER) directly compile the*.java file compile costs, such as GCJ, Excelsiorjet, etc. We should be less encountered by this type of compiler.
    It briefly talk about the process of Javac compilation (front -end compilation).
    Tramia, grammar analysis
    The phrase analysis is to transform the character flow of the source code to the collection. A single character is the minimum element in the program writing process, and the mark is the minimum element of the compilation process. Keywords, variable names, literal quantity, operators, etc. can be marked. But it is just a mark that cannot be split.
    The syntax analysis is based on the token sequence to construct the process of abstract syntax trees. Abstract syntax trees are a tree -shaped way to describe the syntax structure of the program code. Each node of the syntax tree represents a syntax structure in the program code, such as BAO, type, modifier, and operator. After this step, the compiler will basically do not operate the source file anymore, and the subsequent operations are based on the abstract syntax tree.
    Paping symbol table
    After completing grammatical analysis and lexical analysis, the next step is the process of filling the symbol table. The symbol table is a form of a set of symbol address and symbol information. The information registered in the symbol table must be used at different stages of compilation. In semantic analysis (subsequent steps), the content of the symbolic table will be used for semantic inspection and generating intermediate code. During the target code generation stage, the party party will be generated. When the symbol name is allocated, the symbol table is the basis for address distribution.
    Semeter analysis
    The syntax tree can represent an abstraction of a correct source of the structure, but it cannot guarantee that the source program is logical. The main task of semantic analysis is to read the correct source sequence of the structure for review and context. The semantic analysis process is divided into two steps: label inspection and data and control flow analysis:
    The content of the check -checking steps, such as whether the data types between the variables have been declared, variables and assignments have matched.
    Ist data and control flow analysis is a further verification of the logic of the program above and below. It can check whether the local variables are assigned before use, whether each path of the method has a return value, whether all the investigations are investigated The abnormalities are dealt with correctly.
    bytecode generation
    The byte code generation is the last stage of the Javac compilation process. The hethial code generation phase is not just to transform the information generated by the previous steps into the byte code into the disk, the compiler also performs a small amount of code addition and conversion work. The instance constructor u003Cinit> () method and class constructor u003Cclinit> () method is added to the grammatical tree at this stage (the instance constructor here does not refer to the default constructor, but that we are heavy ourselves. The constructor loaded, if there is no constructor in the user code, the compiler will automatically add a default constructor that does not have parameters and access permissions as consistent with the current class, which is completed during the fill symbol table).
    jit compile
    java program was first explained by the interpreter, that is, explaining the byte code one by one, the execution speed of this method will be relatively slow, especially when a method or code block is running When it is particularly frequent, the implementation efficiency of this method is very low. Then I introduced the JIT compiler (instant compiler) in the virtual machine. When the virtual machine found that a method or code block was particularly frequent, these code would be identified as "HotSpotcode" (hot code) to improve the hotspot to improve the hotspot. The execution efficiency of the code, when running, the virtual machine will compile these code into a machine code related to the local platform and optimize at all levels. It is the JIT compiler that completes this task.
    The mainstream commercial virtual machines (such as SunHotSpot, IBMJ9) almost include interpreters and compilers (Jrockit, one of the three major commercial virtual machines, is an exception. Disadvantages such as time, but it is mainly for server -oriented applications. Such applications generally do not focus on startup time). The two have their own advantages: when the program needs to start and execute quickly, the interpreter can first play a role, eliminate the time to compile, and execute immediately; when the program runs, the compiler will gradually return to the role after the program is running, and the compiler will gradually return to the role. After more and more code compile the cost of the code, higher execution efficiency can be obtained. Explanation execution can save memory, and compile execution can improve efficiency.
    hotspot virtual machines have built -in JIT compilers: ClientComplier and ServerComplier, which are used on the client and server. The current mainstream HOTSPOT virtual machine uses the interpreter and one of the compilers to work directly. Essence
    The "hot codes" compiled by instant compilers during the operation: there are two types of "hot codes":
    The method of being called multiple times.
    The cycles called multiple times.
    The compilers are compiled by the entire method. This compilation is also a standard compilation method in the virtual machine. You need to know if a code or method is a hot spot code, whether it needs to be triggered by instant compilation, and the HotSpotDetection needs to be performed. At present, the main hotspot judgment methods are the following:
    The hotspot detection based on sampling: virtual opportunities using this method to check the top of each thread periodically. If some methods often appear on the top of the stack, then then This method code is "hot code". The advantage of this detection method is that it can achieve simple and efficient, and it can easily obtain the method calling relationship. The disadvantage is that it is difficult to accurately confirm the heat of a method.
    The hotspot detection based on counter: Virtual opportunities using this method to establish counter for each method, or even code blocks, the number of execution of statistical methods, if the number of execution exceeds a certain threshold, it is considered to be "hotspot hotspot method". This statistical method is more complicated. It needs to establish and maintain the counter for each method, and cannot directly obtain the calling relationship of the method, but its statistical results are relatively more accurate and rigorous.
    It uses the second type in the HOTSPOT virtual machine -the hotspot detection method based on counter, so it prepares two counter for each method: the method call the counter and the border counters.
    The method call counter is used to statistical method calls. Under the default settings, the method calls the counter statistics. frequency.
    The number of times the number of cyclic code execution is used to count the number of times in a method (accurately speaking, the number of times should be the back side, because not all the cycles are backside). The instructions that flow backwards are called "backside".
    In the premise of determining the running parameters of the virtual machine, these two counters have a certainly threshold value. When the value of the counter exceeding the threshold, JIT compile will be triggered. After triggering JIT compilation, under the default settings, the execution engine does not wait for the compilation request to complete simultaneously. Instead, it continues to enter the interpreter to execute the byte code according to the interpretation method until the request submitted by It is carried out in the background thread). When the compilation work is completed, the next method or code is called, and the compiled version will be used.
    The process of instant compilation is similar to the process of instant compilation and the process of triggering instant compilers, so only the method calls the counter to trigger the instant compile process:

Leave a Comment