skip to main content
10.1145/1346256.1346263acmconferencesArticle/Chapter ViewAbstractPublication PagesveeConference Proceedingsconference-collections
research-article

Trace fragment selection within method-based JVMs

Published: 05 March 2008 Publication History

Abstract

Java virtual machines have historically employed either a "wholemethod" or a "trace" methodology for selecting regions of code for optimization. Adaptive whole-method optimization primarily leverages intra-procedural optimizations derived from classic static compilation techniques whereas trace optimization utilizes an interpreter to select, manage, and dispatch inter-procedural fragments of frequently executed code.
In this paper we present our hybrid approach for supplementing the comprehensive strengths of a whole-method JIT compiler with the inter-procedural refinement of trace fragment selection and show that that the two techniques would be mutually beneficial. Using the "interpreterless" Jikes RVM as a foundation, we use our trace profiling subsystem to identify an application's working set as a collection of hot traces and show that there is a significant margin for improvement in instruction ordering that can be addressed by trace execution. Our benchmark hot-trace profiles indicate that 20% of transitions between machine-code basic blocks as laid out by the JIT compiler are non-contiguous, many of which are transfers of control flow to locations outside of the current virtual memory page. Additionally, the analyses performed by the adaptive whole-method JIT compiler allow for better identification of trace starting and stopping locations, an improvement over the popular next-executing-tail (NET) trace selection scheme. We show minimal overhead for trace selection indicating that inter-procedural trace execution provides an opportunity to improve both instruction locality as well as compiler-directed branch prediction without significant run-time cost.

References

[1]
B. Alpern, S. Augart, S.M. Blackburn, M. Butrico, A. Cocchi, P. Cheng, J. Dolby, S. Fink, D. Grove, M. Hind, K.S. McKinley, M. Mergen, J.E.B. Moss, T. Ngo, and V. Sarkar. The Jikes research virtual machine project: Building an open-source research community. IBM Systems Journal, 44(2):399--417, 2005.
[2]
M. Arnold, S. Fink, D. Grove, M. Hind, and P.F. Sweeney. Adaptive optimization in the Jalapeno JVM. In 15th ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages, and Applications, pages 47--65, Minneapolis, MN, 2000.
[3]
V. Bala, E. Duesterwald, and S. Banerjia. Transparent dynamic optimization. Technical Report HPL-1999-77, Hewlett Packard, June 1999.
[4]
V. Bala, E. Duesterwald, and S. Banerjia. Dynamo: A transparent dynamic optimization system. In Programming Language Design and Implementation, pages 1--12, Vancouver, BC, 2000.
[5]
T. Ball and J. Larus. Programs follow paths. Technical Report MSR-TR-99-01, Microsoft Research, Jan. 1999.
[6]
M. Berndl and L. Hendren. Dynamic profiling and trace cache generation. In First Int'l Symposium on Code Generation and Optimization, pages 276--285, San Francisco, CA, 2003.
[7]
S.M. Blackburn, R. Garner, C. Hoffman, A.M. Khan, K.S. McKinley, R. Bentzur, A. Diwan, D. Feinberg, D. Frampton, S.Z. Guyer, M. Hirzel, A. Hosking, M. Jump, H. Lee, J.E.B. Moss, A. Phansalkar, D. Stefanović, T. VanDrunen, D. von Dincklage, and B. Wiedermann. The DaCapo benchmarks: Java benchmarking development and analysis. In 21st Annual ACM SIGPLAN Conference on Object-Oriented Programing, Systems, Languages, and Applications, Portland, OR, Oct. 2006.
[8]
B.J. Bradel and T.S. Abdelrahman. The use of traces for inlining in Java programs. In Int'l Workshop on Languages and Compilers for Parallel Computing, pages 179--193, West Lafayette, IN, Sept. 2004.
[9]
D. Bruening, T. Garnett, and S. Amarasinghe. An infrastructure for adaptive dynamic optimization. In First Int'l Symposium on Code Generation and Optimization, pages 265--275, Mar. 2003.
[10]
J.C. Dehnert, B.K. Grant, J.P. Banning, R. Johnson, T. Kistler, A. Klaiber, and J. Mattson. The Transmeta Code Morphing Software: Using speculation, recovery, and adaptive retranslation to address real-life challenges. In First Int'l Symposium on Code Generation and Optimization, pages 15--24, San Francisco, CA, Mar. 2003.
[11]
E. Duesterwald and V. Bala. Software profiling for hot path prediction: Less is more. In 12th Int'l Conference on Architectural Support for Programming Languages and Operating Systems, pages 202--211, Cambridge, Massachusetts, Oct. 2000.
[12]
A. Gal, C.W. Probst, and M. Franz. Hotpathvm: an effective jit compiler for resource-constrained devices. In 2nd Conference on Virtual Execution Environments, pages 144--153, Ottawa, ON, 2006.
[13]
K. Hazelwood and D. Grove. Adaptive online context-sensitive inlining. In First Int'l Symposium on Code Generation and Optimization, pages 253--264, San Francisco, CA, Mar. 2003.
[14]
D.J. Hiniker, K. Hazelwood, and M.D. Smith. Improving region selection in dynamic optimization systems. In 38th Int'l Symposium on Microarchitecture, pages 141--154, Barcelona, Spain, Nov. 2005.
[15]
J.D. Hiser, D.Williams, A. Filipi, J.W. Davidson, and B.R. Childers. Evaluating fragment construction policies for SDT systems. In Virtual Execution Environments, pages 122--132, Ottawa, ON, 2006.
[16]
J.D. Hiser, D. Williams, J. Mars, B. Childers, and J.W. Davidson. Evaluating indirect branch handling mechanisms in software dynamic translation systems. In 5th Int'l Symposium on Code Generation and Optimization, 2007.
[17]
X. Huang, S.M. Blackburn, D. Grove, and K.S. McKinley. Fast and efficient partial code reordering: taking advantage of dynamic recompilation. In International Symposium on Memory Management, pages 184--192, Ottawa, ON, 2006.
[18]
C.-K. Luk, R. Cohn, R. Muth, H. Patil, A. Klauser, G. Lowney, S. Wallace, V. J. Reddi, and K. Hazelwood. Pin: Building customized program analysis tools with dynamic instrumentation. In Programming Language Design and Implementation, pages 190--200, Chicago, IL, June 2005.
[19]
Paleczny, C. Vick, and C. Click. The java hotspot server compiler. In USENIX Java Virtual Machine Research and Technology Symposium, pages 1--12, 2001.
[20]
K. Pettis and R.C. Hansen. Profile guided code positioning. In ACM SIGPLAN Conference on Programming Language Design and Implementation, pages 16--27, White Plains, NY, 1990.
[21]
K. Scott, N. Kumar, S. Velusamy, B. Childers, J.W. Davidson, and M.L. Soffa. Retargetable and reconfigurable software dynamic translation. In First Int'l Symposium on Code Generation and Optimization, pages 36--47, Mar. 2003.
[22]
A. Shankar, S.S. Sastry, R. Bodik, and J.E. Smith. Runtime specialization with optimistic heap analysis. SIGPLAN Notices, 40(10):327--343, 2005.
[23]
Standard Performance Evaluation Corporation. SPEC JVM98 Benchmarks. http://www.spec.org/jvm98.
[24]
T. Suganuma, T. Ogasawara, M. Takeuchi, T. Yasue, M. Kawahito, K. Ishizaki, H. Komatsu, and T. Nakatini. Overview of the ibm java just-in-time compiler. IBM Systems Journal, 39(1):175--193, 2000.
[25]
T. Suganuma, T. Yasue, and T. Nakatani. An empirical study of method in--lining for a java just-in-time compiler. In 2nd Java Virtual Machine Research and Technology Symposium, pages 91--104, Berkeley, CA, 2002. USENIX Association.
[26]
Sun Microsystems. The java hotspot performance engine architecture. http://java.sun.com/products/hotspot/whitepaper.html, Apr. 1999.

Cited By

View all
  • (2013)Trace construction using enhanced performance monitoringProceedings of the ACM International Conference on Computing Frontiers10.1145/2482767.2482811(1-10)Online publication date: 14-May-2013
  • (2012)HQEMUProceedings of the Tenth International Symposium on Code Generation and Optimization10.1145/2259016.2259030(104-113)Online publication date: 31-Mar-2012
  • (2011)Dynamic Binary Modification: Tools, Techniques, and ApplicationsSynthesis Lectures on Computer Architecture10.2200/S00345ED1V01Y201104CAC0156:2(1-81)Online publication date: 28-Mar-2011
  • Show More Cited By

Index Terms

  1. Trace fragment selection within method-based JVMs

    Recommendations

    Comments

    Information & Contributors

    Information

    Published In

    cover image ACM Conferences
    VEE '08: Proceedings of the fourth ACM SIGPLAN/SIGOPS international conference on Virtual execution environments
    March 2008
    190 pages
    ISBN:9781595937964
    DOI:10.1145/1346256
    Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

    Sponsors

    Publisher

    Association for Computing Machinery

    New York, NY, United States

    Publication History

    Published: 05 March 2008

    Permissions

    Request permissions for this article.

    Check for updates

    Author Tags

    1. JIT compilation
    2. JVM
    3. region selection
    4. traces

    Qualifiers

    • Research-article

    Conference

    VEE '08

    Acceptance Rates

    VEE '08 Paper Acceptance Rate 18 of 57 submissions, 32%;
    Overall Acceptance Rate 80 of 235 submissions, 34%

    Contributors

    Other Metrics

    Bibliometrics & Citations

    Bibliometrics

    Article Metrics

    • Downloads (Last 12 months)1
    • Downloads (Last 6 weeks)0
    Reflects downloads up to 16 Feb 2025

    Other Metrics

    Citations

    Cited By

    View all
    • (2013)Trace construction using enhanced performance monitoringProceedings of the ACM International Conference on Computing Frontiers10.1145/2482767.2482811(1-10)Online publication date: 14-May-2013
    • (2012)HQEMUProceedings of the Tenth International Symposium on Code Generation and Optimization10.1145/2259016.2259030(104-113)Online publication date: 31-Mar-2012
    • (2011)Dynamic Binary Modification: Tools, Techniques, and ApplicationsSynthesis Lectures on Computer Architecture10.2200/S00345ED1V01Y201104CAC0156:2(1-81)Online publication date: 28-Mar-2011
    • (2011)Reducing trace selection footprint for large-scale Java applications without performance lossACM SIGPLAN Notices10.1145/2076021.204812746:10(789-804)Online publication date: 22-Oct-2011
    • (2011)Reducing trace selection footprint for large-scale Java applications without performance lossProceedings of the 2011 ACM international conference on Object oriented programming systems languages and applications10.1145/2048066.2048127(789-804)Online publication date: 22-Oct-2011
    • (2011)Improving the performance of trace-based systems by false loop filteringACM SIGPLAN Notices10.1145/1961296.195041246:3(405-418)Online publication date: 5-Mar-2011
    • (2011)Improving the performance of trace-based systems by false loop filteringACM SIGARCH Computer Architecture News10.1145/1961295.195041239:1(405-418)Online publication date: 5-Mar-2011
    • (2011)Improving the performance of trace-based systems by false loop filteringProceedings of the sixteenth international conference on Architectural support for programming languages and operating systems10.1145/1950365.1950412(405-418)Online publication date: 5-Mar-2011
    • (2010)SPURACM SIGPLAN Notices10.1145/1932682.186951745:10(708-725)Online publication date: 17-Oct-2010
    • (2010)SPURProceedings of the ACM international conference on Object oriented programming systems languages and applications10.1145/1869459.1869517(708-725)Online publication date: 17-Oct-2010
    • Show More Cited By

    View Options

    Login options

    View options

    PDF

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader

    Figures

    Tables

    Media

    Share

    Share

    Share this Publication link

    Share on social media