Browse Prior Art Database

Sampling-based structural profiling framework

IP.com Disclosure Number: IPCOM000021780D
Original Publication Date: 2004-Feb-09
Included in the Prior Art Database: 2004-Feb-09
Document File: 8 page(s) / 68K

Publishing Venue

IBM

Abstract

A technique is disclosed that realizes an efficient online profiling framework for Just-in-Time compilers by combining the instrumentation-sampling mechanism [1] and the structural profiling mechanism [2]. With the disclosed technique, profiles are collected periodically by counter-based sampling for each loop nest. by controlling the transition between the check code and the instrumentation code in basis of the loop structure. The instrumentation codes themselves are generated and inserted into the code of the target method by using the previous techniques, that is, instrumentation codes are generated in basis of the structural profiling technique [2] and placed on the duplicated code, generated by duplicating the code of the target method according to [1].

This text was extracted from a PDF file.
At least one non-text object (such as an image or picture) has been suppressed.
This is the abbreviated version, containing approximately 36% of the total text.

Page 1 of 8

Sampling-based structural profiling framework

The important technique to combine the structural profiling mechanism and the instrumentation-sampling mechanism is how to enable and disable the set of instrumentation codes for each structure graph with collecting the profiles by sampling. To control the transition between the check code and the instrumentation code structurally, a set of transition codes is generated for each structure graph, and each set of codes is enabled and disabled according to the progress of the profiling for the corresponding structure graph as same manner of the structural profiling.

Table 1 shows the twelve transition points for the transition. These points are generated for each structure graph and associated to the graph. In the description, the checking code is the code corresponding to the original code of the target method, and the duplicated code is the code corresponding to the duplicated code of the target method.

The control code generated at the transition point of ChkP and ExtP for transition between the checking code and the duplicated code is shown in Table 2.

The process of generating the instrumentation codes and the transition codes are divided into the following six steps:

Construct the structure graphs for the target method

Generate the instrumentation codes as same as [2]

Generate the transition codes according to Table 1 and 2

Insert the instrumentation codes and the transition codes by using a dynamic

instrumentation technique Store the information for each structure graph


1.


2.


3.


4.


5.


6.

After generating the instrumentation code, the disclosed technique performs the sampling-based structural profiling by controlling each set of the transition code for each structure graph at runtime by the same manner of [2], instead of enabling and disabling the instrumentation codes themselves.

Perform code duplication

1

Page 2 of 8

            Table 1. Transition points for transition Name Location of the transition point
ChkP-E This point is placed on each edge that is located in the checking code and corresponds to an entry edge of a structure graph.

ChkP-R This point is placed on each edge that is located in the checking code and corresponds to an edge linked from a loop node in a structure graph.

ChkP-B This point is placed on each edge that is located in the checking code and corresponds to a backedge in a structure graph.

RetP-I This point is placed on each edge that is located in the checking code and corresponds to an edge linked to a loop node in a structure graph.

RetP-B This point is placed on each basic block that is located in the checking code and corresponds to the destination node of a backedge in a structure graph.

RetP-X This point is placed on each edge that is located in the checking code and corresponds to an exit edge in a structure graph.

EntP-E This point is placed on each edge that is located in the duplicated code and corresponds to an entry edge in a structure graph.

EntP-R This po...