The InnovationQ application will be updated on Sunday, May 31st from 10am-noon ET. You may experience brief service interruptions during that time.
Browse Prior Art Database

Method to detect loop and to collect runtime information

IP.com Disclosure Number: IPCOM000014128D
Original Publication Date: 2000-May-01
Included in the Prior Art Database: 2003-Jun-19

Publishing Venue



Disclosed is a technique for interpreters for selective dynamic compilation to detects long running loop at run-time. The detection is done at backward branch, i.e., loop back-edge. When a method with long running loop is detected, the method is compiled immediately by a dynamic compiler and executed by compiled code from the next iteration of the loop. This technique to compile a method immediately at loop back-edge and to continue execution from the next iteration is known and applied patent application by IBM, and disclosed technique refines the technique to detect long running loop. Selective compilation technique is important to improve interactive performance of virtual machines (VM) consist of bytecode interpreter and dynamic compiler, like Java VM with JIT compiler, because it avoids compiling performance insensitive portion of a program and wasting time by ineffective compilation. In order to implement selective compilation, profiling technique is necessary to detect performance sensitive portion. One of the simplest and quickest technique is "method profiling". In this technique, interpreter counts number of invocation for each method using a per-method counter ("global counter"), and methods invoked more than a threshold are compiled on the invocation when "global counter" reaches the threshold. This technique, however, has a problem that a method which is called few times and which has long running loop in it isn't compiled because its invocation count is small. The solution of this problem is an IBM patent JA9-1998-221 ). The key idea of this invention is: On the first execution of taken backward conditional branch, interpreter