Recent advances in Virtual Machine’s technology have led to the diffusion of Java execution environments which provide performance levels comparable to those of traditional languages such as C/C++ and Fortran. This paper’s focus is on method calls, a well researched area of compilers’ optimization. In particular, we evaluate the impact on the performance of the Java virtual call mechanism and the advantages which can be obtained through the inlining optimization. Moreover, we propose a new heuristic methodology which allows us to consider whole sequences of methods for the inlining decision and not only simple couples of caller–callee methods. The proposed methodology operates at bytecode level and is applicable only to the calls that can be resolved at compile time. Thus, we execute a devirtualization algorithm before the inlining decision, in order to enlarge the basis for the optimization. We made empirical measures on three major platforms (Unix, Windows and Linux) by using the SPEC JVM98 benchmark suite. Results reveal an average performance improvement of 1.9% with devirtualization and 5.5% with inlining. We discuss the different behaviour of single benchmarks and virtual machines, arguing that dynamic compilers are not yet able to fully exploit the wider scope for intraprocedural optimization offered by eliminating the calls. Finally, we show that taking into consideration whole sequences of calls—instead of single calls—is effective only on a few benchmarks where hotspots of execution involve cycles of nested methods.

Evaluation and optimization of method calls in java

BELLOTTI, FRANCESCO;BERTA, RICCARDO;DE GLORIA, ALESSANDRO
2004-01-01

Abstract

Recent advances in Virtual Machine’s technology have led to the diffusion of Java execution environments which provide performance levels comparable to those of traditional languages such as C/C++ and Fortran. This paper’s focus is on method calls, a well researched area of compilers’ optimization. In particular, we evaluate the impact on the performance of the Java virtual call mechanism and the advantages which can be obtained through the inlining optimization. Moreover, we propose a new heuristic methodology which allows us to consider whole sequences of methods for the inlining decision and not only simple couples of caller–callee methods. The proposed methodology operates at bytecode level and is applicable only to the calls that can be resolved at compile time. Thus, we execute a devirtualization algorithm before the inlining decision, in order to enlarge the basis for the optimization. We made empirical measures on three major platforms (Unix, Windows and Linux) by using the SPEC JVM98 benchmark suite. Results reveal an average performance improvement of 1.9% with devirtualization and 5.5% with inlining. We discuss the different behaviour of single benchmarks and virtual machines, arguing that dynamic compilers are not yet able to fully exploit the wider scope for intraprocedural optimization offered by eliminating the calls. Finally, we show that taking into consideration whole sequences of calls—instead of single calls—is effective only on a few benchmarks where hotspots of execution involve cycles of nested methods.
File in questo prodotto:
Non ci sono file associati a questo prodotto.

I documenti in IRIS sono protetti da copyright e tutti i diritti sono riservati, salvo diversa indicazione.

Utilizza questo identificativo per citare o creare un link a questo documento: https://hdl.handle.net/11567/247206
Citazioni
  • ???jsp.display-item.citation.pmc??? ND
  • Scopus 0
  • ???jsp.display-item.citation.isi??? 0
social impact