Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
10.1145/2660193.2660199acmconferencesArticle/Chapter ViewAbstractPublication PagessplashConference Proceedingsconference-collections
research-article
Open access

The hiphop virtual machine

Published: 15 October 2014 Publication History

Abstract

The HipHop Virtual Machine (HHVM) is a JIT compiler and runtime for PHP. While PHP values are dynamically typed, real programs often have latent types that are useful for optimization once discovered. Some types can be proven through static analysis, but limitations in the ahead-of-time approach leave some types to be discovered at run time. And even though many values have latent types, PHP programs can also contain polymorphic variables and expressions, which must be handled without catastrophic slowdown.
HHVM discovers latent types by structuring its JIT around the concept of a tracelet. A tracelet is approximately a basic block specialized for a particular set of run-time types for its input values. Tracelets allow HHVM to exactly and efficiently learn the types observed by the program, while using a simple compiler. This paper shows that this approach enables HHVM to achieve high levels of performance, without sacrificing compatibility or interactivity.

References

[1]
K. Adams and O. Agesen. A comparison of software and hardware techniques for x86 virtualization. In Proceedings of the International Conference on Architectural Support for Programming Languages and Operating Systems (ASPLOS), pages 2--13, October 2006.
[2]
Apple. JavaScriptCore. Web site: http://trac.webkit.org/wiki/JavaScriptCore.
[3]
M. Bebenita. Trace-Based Compilation and Optimization in Meta-Circular Virtual Execution Environments. PhD thesis, UC Irvine, 2012.
[4]
J. Benda, T. Matousek, and L. Prosek. Phalanger: Compiling and running PHP applications on the Microsoft .NET platform. In Proceedings on the 4th International Conference on .NET Technologies, pages 11--20, 2006.
[5]
P. Biggar, E. de Vries, and D. Gregg. A practical solution for scripting language compilers. In Proceedings of the ACM Symposium on Applied Computing, pages 1916--1923, 2009.
[6]
B. Calder, P. Feller, and A. Eustace. Value profiling. In Proceedings of the IEEE/ACM International Symposium on Microarchitecture, pages 259--269, December 1997.
[7]
J. Castanos, D. Edelsohn, K. Ishizaki, P. Nagpurkar, T. Nakatani, T. Ogasawara, and P. Wu. On the benefits and pitfalls of extending a statically typed language jit compiler for dynamic scripting languages. In Proceedings of the ACM International Conference on Object Oriented Programming Systems Languages and Applications (OOPSLA), October 2012.
[8]
B. Cmelik and D. Keppel. Shade: A fast instruction-set simulator for execution profiling. In T. Conte and C. Gimarc, editors, Fast Simulation of Computer Architectures, pages 5--46. Springer US, 1995.
[9]
G. E. Collins. A method for overlapping and erasure of lists. Communications of the ACM, 3(12), December 1960.
[10]
R. Cytron, J. Ferrante, B. K. Rosen, M. N. Wegman, and F. K. Zadeck. Efficiently computing static single assignment form and the control dependence graph. ACM Transactions on Programming Languages and Systems, 13(4):451--490, October 1991.
[11]
Facebook, Inc. The HipHop Virtual Machine. Web site: http://hhvm.com.
[12]
M. Fijalkowski. HippyVM. Web site: http://hippyvm.com.
[13]
A. Gal, B. Eich, M. Shaver, D. Anderson, D. Mandelin, M. R. Haghighat, B. Kaplan, G. Hoare, B. Zbarsky, J. Orendorff, J. Ruderman, E. Smith, R. Reitmaier, M. Bebenita, M. Chang, and M. Franz. Trace-based just-in-time type specialization for dynamic languages. In Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation, pages 465--478, 2009.
[14]
T. Garnett. Dynamic optimization of ia-32 applications under dynamorio. Master's thesis, 2003.
[15]
A. Goldberg and D. Robson. Smalltalk-80: The Language and its Implementation. Addison-Wesley Longman Publishing Co. Inc., Boston, MA, 1983.
[16]
Google. The V8 JavaScript engine. Web site: http://code.google.com/p/v8.
[17]
U. Hölzle, C. Chambers, and D. Ungar. Optimizing dynamically-typed object-oriented languages with polymorphic inline caches. In Proceedings of the European Conference on Object-Oriented Programming, 1991.
[18]
A. Homescu and A. Şuhan. HappyJIT: a tracing JIT compiler for PHP. In Proceedings of the 7th Symposium on Dynamic Languages, pages 25--36, 2011.
[19]
C. Lattner and V. Adve. LLVM: A compilation framework for lifelong program analysis & transformation. In Proceedings of the International Symposium on Code Generation and Optimization, 2004.
[20]
T. Lindholm and F. Yellin. Java Virtual Machine Specification. Addison-Wesley Longman Publishing Co., Inc., Boston, MA, USA, 2nd edition, 1999.
[21]
E. Meijer, R. Wa, and J. Gough. Technical overview of the common language runtime, 2000.
[22]
Nginx. Nginx. Web site: http://wiki.nginx.org.
[23]
G. Ottoni, T. Hartin, C. Weaver, J. Brandt, B. Kuttanna, and H. Wang. Harmonia: a transparent, efficient, and harmonious dynamic binary translator targeting x86. In Proc. of the 8th ACM International Conference on Computing Frontiers, pages 26:1--26:10, May 2011.
[24]
M. Pall. The LuaJIT project. Web site: http://luajit.org.
[25]
PHP5. Web site: http://php.net.
[26]
F. Pizlo and G. Barraclough. Value profiling for code optimization, Feb. 13 2014. US Patent App. 13/593,404.
[27]
Quercus: PHP in Java. Web site: http://www.caucho.com/resin-3.0/quercus/.
[28]
A. Rigo and S. Pedroni. PyPy's approach to virtual machine construction. In Proceedings of the 21st ACM SIGPLAN Symposium on Object-oriented Programming Systems, Languages, and Applications, pages 944--953, 2006.
[29]
Roadsend compiler. Web site: http://www.roadsend.com.
[30]
M. Tatsubori, A. Tozawa, T. Suzumura, S. Trent, and T. Onodera. Evaluation of a just-in-time compiler retrofitted for PHP. In Proceedings of the ACM International Conference on Virtual Execution Environments, pages 121--132, 2010.
[31]
The Apache Software Foundation. ab - Apache HTTP server benchmarking tool. Web site: http://httpd.apache.org/docs/2.2/programs/ab.html.
[32]
The Computer Languages Benchmark Game. Web site: http://shootout.alioth.debian.org/.
[33]
Tiobe. TIOBE programming community index. Web site: http://www.tiobe.com/tiobe_index/index.htm.
[34]
A. Tozawa, M. Tatsubori, T. Onodera, and Y. Minamide. Copy-on-write in the PHP language. In Proceedings of the ACM Symposium on Principles of Programming Languages, pages 200--212, 2009.
[35]
C. Wimmer and M. Franz. Linear scan register allocation on ssa form. In Proceedings of the IEEE/ACM International Symposium on Code Generation and Optimization, pages 170--179, 2010.
[36]
C. Wimmer and T. Würthinger. Truffle: A self-optimizing runtime system. In Proceedings of the 3rd Annual Conference on Systems, Programming, and Applications: Software for Humanity, pages 13--14, 2012.
[37]
E. Witchel and M. Rosenblum. Embra: Fast and flexible machine simulation. In Proceedings of the International Conference on Measurement and Modeling of Computer Systems, pages 68--79, 1996.
[38]
H. Zhao, I. Proctor, M. Yang, X. Qi, M. Williams, Q. Gao, G. Ottoni, A. Paroski, S. MacVicar, J. Evans, and S. Tu. The HipHop compiler for PHP. In Proceedings of the ACM International Conference on Object Oriented Programming Systems Languages and Applications, pages 575--586, October 2012.

Cited By

View all
  • (2024)BTBench: A Benchmark for Comprehensive Binary Translation Performance Evaluation2024 IEEE International Symposium on Performance Analysis of Systems and Software (ISPASS)10.1109/ISPASS61541.2024.00014(36-47)Online publication date: 5-May-2024
  • (2024)Revamping Sampling-Based PGO with Context-Sensitivity and Pseudo-instrumentation2024 IEEE/ACM International Symposium on Code Generation and Optimization (CGO)10.1109/CGO57630.2024.10444807(322-333)Online publication date: 2-Mar-2024
  • (2022)Whisper: Profile-Guided Branch Misprediction Elimination for Data Center Applications2022 55th IEEE/ACM International Symposium on Microarchitecture (MICRO)10.1109/MICRO56248.2022.00017(19-34)Online publication date: Oct-2022
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
OOPSLA '14: Proceedings of the 2014 ACM International Conference on Object Oriented Programming Systems Languages & Applications
October 2014
946 pages
ISBN:9781450325851
DOI:10.1145/2660193
  • cover image ACM SIGPLAN Notices
    ACM SIGPLAN Notices  Volume 49, Issue 10
    OOPSLA '14
    October 2014
    907 pages
    ISSN:0362-1340
    EISSN:1558-1160
    DOI:10.1145/2714064
    • Editor:
    • Andy Gill
    Issue’s Table of Contents
Permission to make digital or hard copies of part or all 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 third-party components of this work must be honored. For all other uses, contact the Owner/Author.

Sponsors

In-Cooperation

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 15 October 2014

Check for updates

Author Tags

  1. dynamic languages
  2. jit compiler
  3. php
  4. tracelet

Qualifiers

  • Research-article

Conference

SPLASH '14
Sponsor:

Acceptance Rates

OOPSLA '14 Paper Acceptance Rate 52 of 186 submissions, 28%;
Overall Acceptance Rate 268 of 1,244 submissions, 22%

Upcoming Conference

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)170
  • Downloads (Last 6 weeks)47
Reflects downloads up to 15 Oct 2024

Other Metrics

Citations

Cited By

View all
  • (2024)BTBench: A Benchmark for Comprehensive Binary Translation Performance Evaluation2024 IEEE International Symposium on Performance Analysis of Systems and Software (ISPASS)10.1109/ISPASS61541.2024.00014(36-47)Online publication date: 5-May-2024
  • (2024)Revamping Sampling-Based PGO with Context-Sensitivity and Pseudo-instrumentation2024 IEEE/ACM International Symposium on Code Generation and Optimization (CGO)10.1109/CGO57630.2024.10444807(322-333)Online publication date: 2-Mar-2024
  • (2022)Whisper: Profile-Guided Branch Misprediction Elimination for Data Center Applications2022 55th IEEE/ACM International Symposium on Microarchitecture (MICRO)10.1109/MICRO56248.2022.00017(19-34)Online publication date: Oct-2022
  • (2021)Twig: Profile-Guided BTB Prefetching for Data Center ApplicationsMICRO-54: 54th Annual IEEE/ACM International Symposium on Microarchitecture10.1145/3466752.3480124(816-829)Online publication date: 18-Oct-2021
  • (2021)Lightning BOLT: powerful, fast, and scalable binary optimizationProceedings of the 30th ACM SIGPLAN International Conference on Compiler Construction10.1145/3446804.3446843(119-130)Online publication date: 2-Mar-2021
  • (2021)HHVM Jump-Start: Boosting Both Warmup and Steady-State Performance at Scale2021 IEEE/ACM International Symposium on Code Generation and Optimization (CGO)10.1109/CGO51591.2021.9370314(340-350)Online publication date: 27-Feb-2021
  • (2020)Amalgamating different JIT compilations in a meta-tracing JIT compiler frameworkProceedings of the 16th ACM SIGPLAN International Symposium on Dynamic Languages10.1145/3426422.3426977(1-15)Online publication date: 17-Nov-2020
  • (2020)AccelerometerProceedings of the Twenty-Fifth International Conference on Architectural Support for Programming Languages and Operating Systems10.1145/3373376.3378450(733-750)Online publication date: 9-Mar-2020
  • (2019)BOLT: a practical binary optimizer for data centers and beyondProceedings of the 2019 IEEE/ACM International Symposium on Code Generation and Optimization10.5555/3314872.3314876(2-14)Online publication date: 16-Feb-2019
  • (2019)Constrained Bayesian Optimization with Noisy ExperimentsBayesian Analysis10.1214/18-BA111014:2Online publication date: 1-Jun-2019
  • Show More Cited By

View Options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Get Access

Login options

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media