Dismiss
InnovationQ will be updated on Sunday, Oct. 22, from 10am ET - noon. You may experience brief service interruptions during that time.
Browse Prior Art Database

Outlined prologues

IP.com Disclosure Number: IPCOM000228587D
Publication Date: 2013-Jun-20
Document File: 5 page(s) / 50K

Publishing Venue

The IP.com Prior Art Database

Abstract

Disclosed is a novel technique developed to achieve outlining of method prologues. The invention is a compiler optimization and associated runtime support to replace a method's prologue with a call to a runtime routine. On most workloads, this has the effect of reducing i-cache footprint at the expense of path length, and so it can be expected to be a performance win on i-cache-limited workloads, which are increasingly important in the application server area.

This text was extracted from a PDF file.
This is the abbreviated version, containing approximately 25% of the total text.

Page 01 of 5

Outlined prologues

Method inlining tends to reduce path length (i.e., number of instructions executed), but since it inserts a copy of the called routine, it has the potential to increase instruction-cache (i-cache) footprint. In workloads where performance is path-length-limited, inlining is a win even if it modestly increases i-cache footprint. However, large application server workloads tend to be i-cache limited. Inlining still usually wins even in such settings, since increased i-cache footprint is offset by the code customization opportunities afforded by having a custom copy of the called routine.

However, in situations without customization opportunities, inlining in i-cache-limited situations can be a net loss. This observation leads to the opposite optimization: "outlining" takes a section of code that is common among multiple methods , and pulling it out into its own routine. As expected, this has the effect of reducing i-cache footprint while increasing path length.

One piece of code that is common to every method is the prologue, which is a code snippet start of the method that allocates the

method's stack frame and performs some register/stack manipulations required by the linkage convention. Prologues can account for as much as 10% or more of all instructions executed by some large workloads, and since each method has its own prologue, the methods possess no spatial locality with each other and poor use of i-cache. Each prologue is custom to its method, yet most prologues are quite similar to each other. This makes method prologues a desirable target for outlining.

Outlining is uniquely challenging for method prologues because outlining and prologues interact in a particularly difficult way. On the one hand, the outlining transformation leaves code functionally equivalent except for stack frame and register manipulations : calling an outlined routine could require saving and restoring registers, moving arguments and return values to and from registers, and building a new frame for the called routine. Normally, these differences are insignificant, not affecting the functional correctness of the program. On the other hand, however, the entire purpose of a method's prologue is to set up the stack frame and registers to execute the method body. Thus, the outlining transformation perturbs the very machine state that the prologue is attempting to establish. This makes naive outlining of method prologues impossible.

The invention is a novel technique developed to achieve outlining of method prologues. The invention is a compiler optimization and associated runtime support to replace a method's prologue with a call to a runtime routine. On most workloads, this has the effect of reducing i-cache footprint at the expense of path length, and so it can be expected to be a performance win on i-cache-limited workloads, which are increasingly important in the application server area.

The invention offers 2%-5% performance improve...