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

OJXPerf: featherlight object replica detection for Java programs

Published: 05 July 2022 Publication History
  • Get Citation Alerts
  • Abstract

    Memory bloat is an important source of inefficiency in complex production software, especially in software written in managed languages such as Java. Prior approaches to this problem have focused on identifying objects that outlive their life span. Few studies have, however, looked into whether and to what extent myriad objects of the same type are identical. A quantitative assessment of identical objects with code-level attribution can assist developers in refactoring code to eliminate object bloat, and favor reuse of existing object(s). The result is reduced memory pressure, reduced allocation and garbage collection, enhanced data locality, and reduced re-computation, all of which result in superior performance.
    We develop OJXPerf, a lightweight sampling-based profiler, which probabilistically identifies identical objects. OJXPerf employs hardware performance monitoring units (PMU) in conjunction with hardware debug registers to sample and compare field values of different objects of the same type allocated at the same calling context but potentially accessed at different program points. The result is a lightweight measurement --- a combination of object allocation contexts and usage contexts ordered by duplication frequency. This class of duplicated objects is relatively easier to optimize. OJXPerf incurs 9% runtime and 6% memory overheads on average. We empirically show the benefit of OJXPerf by using its profiles to instruct us to optimize a number of Java programs, including well-known benchmarks and real-world applications. The results show a noticeable reduction in memory usage (up to 11%) and a significant speedup (up to 25%).

    References

    [1]
    2013. Obtain object address. https://jrebel.com/rebellabs/dangerous-code-how-to-be-unsafe-with-java-classes-o\bjects-in-memory/4/.
    [2]
    2018. DaCapo Benchmark Suite 9.12. https://sourceforge.net/projects/dacapobench/files/9.12-bach-MR1/.
    [3]
    2018. OProfile. http://oprofile.sourceforge.net.
    [4]
    2020. AlphaGo Zero. https://deepmind.com/blog/article/alphago-zero-starting-scratch.
    [5]
    Ali-Reza Adl-Tabatabai, Richard L. Hudson, Mauricio J. Serrano, and Sreenivas Subramoney. 2004. Prefetch injection based on hardware monitoring and object metadata. SIGPLAN Not. 39, 6, 267--276.
    [6]
    Randy Allen and Ken Kennedy. 2001. Optimizing Compilers for Modern Architectures: A Dependence-based Approach. Morgan Kaufmann.
    [7]
    Matthew Arnold and Peter F. Sweeney. 1999. Approximating the Calling Context Tree via Sampling. Technical Report 21789. IBM.
    [8]
    RoaringBitmap authors. 2019. RoaringBitmap. https://github.com/RoaringBitmap/RoaringBitmap.
    [9]
    Mark Bull, Lorna Smith, Martin Westhead, David Henty, and Robert Davey. 2001. Java Grande benchmark suite. https://www.epcc.ed.ac.uk/research/computing/performance-characterisation-and-benchmarking/java-grande-benchmark-suite.
    [10]
    Wen-ke Chen, Sanjay Bhansali, Trishul Chilimbi, Xiaofeng Gao, and Weihaw Chuang. 2006. Profile-guided Proactive Garbage Collection for Locality Optimization. SIGPLAN Not. 41, 6, 332--340.
    [11]
    Oracle Corp. 2017. Oracle Developer Studio Performance Analyzer. https://www.oracle.com/technetwork/server-storage/solarisstudio/documentation/o11-151-perf-analyzer-brief-1405338.pdf.
    [12]
    Oracle Corporation. 2011. jmap Memory Map. https://docs.oracle.com/javase/7/docs/technotes/tools/share/jmap.html.
    [13]
    Oracle Corporation. 2018. All-in-One Java Troubleshooting Tool. https://visualvm.github.io.
    [14]
    Standard Performance Evaluation Corporation. 2008. SPECjvm2008 benchmark suite. https://www.spec.org/jvm2008.
    [15]
    Luca Della Toffola, Michael Pradel, and Thomas R. Gross. 2015. Performance Problems You Can Fix: A Dynamic Analysis of Memoization Opportunities. Proceedings of the 2015 ACM SIGPLAN International Conference on Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA 2015), 607--622.
    [16]
    NASA Advanced Supercomputing Division. 2018. NAS Parallel Benchmarks. https://www.nas.nasa.gov/publications/npb.html.
    [17]
    R. E. McLear, D. M. Scheibelhut, and E. Tammaru. 1982. Guidelines for creating a debuggable processor. Proceedings of the first international symposium on Architectural support for programming languages and operating systems (ASPLOS), 100--106.
    [18]
    Ariel Eizenberg, Shiliang Hu, Gilles Pokam, and Joseph Devietti. 2016. Remix: Online Detection and Repair of Cache Contention for the JVM. In Proceedings of the 37th ACM SIGPLAN Conference on Programming Language Design and Implementation (Santa Barbara, CA, USA) (PLDI '16). ACM, New York, NY, USA, 251--265.
    [19]
    ej-technologies GmbH. 2018. THE AWARD-WINNING ALL-IN-ONE JAVA PROFILER. https://www.ej-technologies.com/products/jprofiler/overview.html.
    [20]
    Peter F. Sweeney, Matthias Hauswirth, Brendon Cahoon, Perry Cheng, Amer Diwan, David Grove, and Michael Hind. 2004. Using hardware performance monitors to understand the behavior of Java applications. In Proceedings of the 3rd Virtual Machine Research and Technology Symposium (VM'04).
    [21]
    Lu Fang, Liang Dou, and Guoqing Xu. 2015. PerfBlower: Quickly Detecting Memory-Related Performance Problems via Amplification. In 29th European Conference on Object-Oriented Programming (ECOOP 2015) (Leibniz International Proceedings in Informatics (LIPIcs), Vol. 37), John Tang Boyland (Ed.). Schloss Dagstuhl-Leibniz-Zentrum fuer Informatik, Dagstuhl, Germany, 296--320.
    [22]
    Apache Software Foundation. 2017. Apache SAMOA: Scalable Advanced Massive Online Analysis. https://samoa.incubator.apache.org.
    [23]
    Andy Georges, Dries Buytaert, Lieven Eeckhout, and Koen De Bosschere. 2004. Method-Level Phase Behavior in Java Workloads. Proc. of the ACM SIGPLAN Conf. on Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA), 270--287.
    [24]
    YourKit GmbH. 2018. The Industry Leader in .NET and Java Profiling. https://www.yourkit.com.
    [25]
    Matthias Hauswirth, Peter F. Sweeney, Amer Diwan, and Michael Hind. 2004. Vertical Profiling: Understanding the Behavior of Object-Oriented Applications. Proc. of Conf. on Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA), 251--269.
    [26]
    Matthew Hertz, Stephen M. Blackburn, J. Eliot B. Moss, Kathryn S. McKinley, and Darko Stefanović. 2006. Generating object lifetime traces with Merlin. ACM Transactions on Programming Languages and Systems.
    [27]
    Xianglong Huang, Stephen M. Blackburn, Kathryn S. McKinley, J Eliot B. Moss, Zhenlin Wang, and Perry Cheng. 2004. The Garbage Collection Advantage: Improving Program Locality. SIGPLAN Not. 39, 10, 69--80.
    [28]
    Skymind Inc. 2019. Deep Learning for Java. https://deeplearning4j.org.
    [29]
    Twitter Inc. 2019. Parquet MR. https://github.com/apache/parquet-mr.
    [30]
    Intel Corporation. 2010. Intel 64 and IA-32 Architectures Software Developer's Manual, Volume 3B: System Programming Guide, Part 2, Number 253669-032.
    [31]
    Nguyen Khanh and Guoqing Xu. 2013. Cachetor: Detecting Cacheable Data to Remove Bloat. ESEC/FSE 2013 Proceedings of the 2013 9th Joint Meeting on Foundations of Software Engineering, 268--278.
    [32]
    Andreas Kull. 2020. Awesome Java. https://github.com/akullpp/awesome-java.
    [33]
    Jeremy Lau, Matthew Arnold, Michael Hind, and Brad Calder. 2006. Online performance auditing: Using hot optimizations without getting burned. In Proc. Conf. on Programming Language Design and Implementation (PLDI 2006), New York, USA, 239--251.
    [34]
    Linux. 2015. Linux Perf Tool. http://www.brendangregg.com/perf.html.
    [35]
    Stephen M. Blackburn, Robin Garner, Chris Hoffmann, Asjad M. Khang, Kathryn S. McKinley, Rotem Bentzur, Amer Diwan, Daniel Feinberg, Daniel Frampton, Samuel Z. Guyer, Martin Hirzel, Antony Hosking, Maria Jump, Han Lee, J. Eliot B. Moss, Aashish Phansalkar, Darko Stefanović, Thomas VanDrunen, Daniel von Dincklage, and Ben Wiedermann. 2006. The DaCapo benchmarks: java benchmarking development and analysis. OOPSLA '06 Proceedings of the 21st annual ACM SIGPLAN conference on Object-oriented programming systems, languages, and applications, Portland, Oregon, USA, 169--190.
    [36]
    Trishul M. Chilimbi and James R. Larus. 1998. Using Generational Garbage Collection to Implement Cache-conscious Data Placement. SIGPLAN Not. 34, 3, 37--48.
    [37]
    Darko Marinov and Robery O'Callahan. 2003. Object Equality Profiling. ACM SIGPLAN International Conference on Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA), 313--325.
    [38]
    Khanh Nguyen and Guoqing Xu. 2013. Cachetor: Detecting Cacheable Data to Remove Bloat. In Proceedings of the 2013 9th Joint Meeting on Foundations of Software Engineering (Saint Petersburg, Russia) (ESEC/FSE 2013). Association for Computing Machinery, New York, NY, USA, 268--278.
    [39]
    Adrian Nistor, Linhai Song, Darko Marinov, and Shan Lu. 2013. Toddler: Detecting Performance Problems via Similar Memory-access Patterns. In Proceedings of the 2013 International Conference on Software Engineering (San Francisco, CA, USA) (ICSE '13). IEEE Press, Piscataway, NJ, USA, 562--571.
    [40]
    Nitsan Wakart. 2016. The Pros and Cons of AsyncGetCallTrace Profilers. http://psy-lob-saw.blogspot.com/2016/06/the-pros-and-cons-of-agct.html.
    [41]
    Sable Research Group of McGill University. 2019. Soot. https://sable.github.io/soot/.
    [42]
    Oracle Corp. 2016. NetBeans profiler. https://profler.netbeans.org.
    [43]
    Andrei Pangin. 2018. Async-profiler. https://github.com/jvm-profiling-tools/async-profiler.
    [44]
    Aleksandar Prokopec, Andrea Rosà, David Leopoldseder, Gilles Duboscq, Petr Tůma, Martin Studener, Lubomír Bulej, Yudi Zheng, Alex Villazón, Doug Simon, Thomas Würthinger, and Walter Binder. 2019. Renaissance: Benchmarking Suite for Parallel Applications on the JVM. In Proceedings of the 40th ACM SIGPLAN Conference on Programming Language Design and Implementation (Phoenix, AZ, USA) (PLDI 2019). ACM, New York, NY, USA, 31--47.
    [45]
    Bill Pugh, Andrey Loskutov, and Keith Lea. 2015. FindBugs. http://findbugs.sourceforge.net.
    [46]
    Jeffrey S. Vitter. 1985. Random Sampling with a Reservoir. ACM Transactions on Mathematical Software (TOMS), 37--57.
    [47]
    Mark Scott Johnson. 1982. Some requirements for architectural support of software debugging. Proceedings of the first international symposium on Architectural support for programming languages and operating systems (ASPLOS), 140--148.
    [48]
    Ajeet Shankar, Mattew Arnold, and Rastislav Bodik. 2008. JOLT: Lightweight Dynamic Analysis and Removal of Object Churn. ACM SIGPLAN International Conference on Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA), 127--142.
    [49]
    Yefim Shuf, Manish Gupta, Hubertus Franke, Andrew Appel, and Jaswinder Pal Singh. 2002. Creating and Preserving Locality of Java Applications at Allocation and Garbage Collection Times. SIGPLAN Not. 37, 11, 13--25.
    [50]
    Linhai Song and Shan Lu. 2017. Performance Diagnosis for Inefficient Loops. In Proceedings of the 39th International Conference on Software Engineering (Buenos Aires, Argentina) (ICSE '17). IEEE Press, Piscataway, NJ, USA, 370--380.
    [51]
    Pengfei Su, Qingsen Wang, Chabbi Milind, and Xu Liu. 2019. Pinpointing Performance Inefficiencies in Java. The 27th ACM Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering, Tallinn, Estonia.
    [52]
    Nathan R. Tallent. 2010. Performance analysis for parallel programs from multicore to petascale. Ph.D. thesis. Department of Computer Science, Rice University.
    [53]
    Qingsen Wang, Xu Liu, and Milind Chabbi. 2019. Featherlight Reuse-Distance Measurement. Proceedings of The 25th IEEE International Symposium on High Performance Computer Architecture, 440--453.
    [54]
    Shasha Wen, Milind Chabbi, and Xu Liu. 2017. REDSPY: Exploring Value Locality in Software. In Proceedings of the Twenty-Second International Conference on Architectural Support for Programming Languages and Operating Systems (Xi'an, China) (ASPLOS '17). Association for Computing Machinery, New York, NY, USA, 47--61.
    [55]
    Shasha Wen, Xu Liu, John Byrne, and Milind Chabbi. 2018. Watching for Software Inefficiencies with Witch. Proceedings of the Twenty-Third International Conference on Architectural Support for Programming Languages and Operating Systems (ASPLOS '18), 440--453.
    [56]
    Guoqing Xu. 2012. Finding reusable data structures. ACM SIGPLAN International Conference on Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA), 1017--1034.
    [57]
    Guoqing Xu. 2013. Resurrector: A Tunable Object Lifetime Profiling Technique for Optimizing Real-World Programs. In Proceedings of the 2013 ACM SIGPLAN International Conference on Object Oriented Programming Systems Languages and Applications (Indianapolis, Indiana, USA) (OOPSLA '13). Association for Computing Machinery, New York, NY, USA, 111--130.
    [58]
    Guoqing Xu, Matthew Arnold, and Nick Mitchell. 2009. Go with the Flow: Profiling Copies To Find Runtime Bloat. Proceedings of the 30th ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI '09), 419--430.
    [59]
    Guoqing Xu, Matthew Arnold, Nick Mitchell, Atanas Rountev, and Gary Sevitsky. 2009. Go with the Flow: Profiling Copies to Find Runtime Bloat. In Proceedings of the 30th ACM SIGPLAN Conference on Programming Language Design and Implementation (Dublin, Ireland) (PLDI '09). Association for Computing Machinery, New York, NY, USA, 419--430.
    [60]
    Guoqing Xu, Michael D. Bond, Feng Qin, and Atanas Rountev. 2011. LeakChaser: Helping Programmers Narrow down Causes of Memory Leaks. In Proceedings of the 32nd ACM SIGPLAN Conference on Programming Language Design and Implementation (San Jose, California, USA) (PLDI '11). Association for Computing Machinery, New York, NY, USA, 270--282.
    [61]
    Guoqing Xu, Nick Mitchell, Matthew Arnold, Atanas Rountev, Edith Schonberg, and Gary Sevitsky. 2014. Scalable Runtime Bloat Detection Using Abstract Dynamic Slicing. ACM Trans. Softw. Eng. Methodol. 23, 3, Article 23 (June 2014), 50 pages.
    [62]
    Guoqing Xu and Atanas Rountev. 2010. Detecting Inefficiently-Used Containers to Avoid Bloat. In Proceedings of the 31st ACM SIGPLAN Conference on Programming Language Design and Implementation (Toronto, Ontario, Canada) (PLDI '10). Association for Computing Machinery, New York, NY, USA, 160--173.
    [63]
    Guoqing Xu and Atanas Rountev. 2010. Detecting Inefficiently-Used Containers to Avoid Bloat. Proceedings of the 31st ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI '10)., 160--173.
    [64]
    Guoqing Xu, Dacong Yan, and Atanas Rountev. 2012. Static Detection of Loop-Invariant Data Structures. In Proceedings of the 26th European Conference on Object-Oriented Programming (Beijing, China) (ECOOP'12). Springer-Verlag, Berlin, Heidelberg, 738--763.
    [65]
    Dacong Yan, Guoqing (Harry) Xu, Shengqian Yang, and Atanas Rountev. 2014. LeakChecker: Practical Static Memory Leak Detection for Managed Languages. In 12th Annual IEEE/ACM International Symposium on Code Generation and Optimization, CGO 2014, Orlando, FL, USA, February 15--19, 2014, David R. Kaeli and Tipp Moseley (Eds.). ACM, 87. https://dl.acm.org/citation.cfm?id=2544151
    [66]
    Albert Mingkun Yang, Erik Österlund, and Tobias Wrigstad. 2020. Improving program locality in the GC using hotness. PLDI 2020: Proceedings of the 41st ACM SIGPLAN Conference on Programming Language Design and Implementation, New York, NY, 301--313.

    Cited By

    View all
    • (2024)Precision-Driven Product Recommendation Software: Unsupervised Models, Evaluated by GPT-4 LLM for Enhanced Recommender SystemsSoftware10.3390/software30100043:1(62-80)Online publication date: 29-Feb-2024
    • (2024)A Survey on Factors Preventing the Adoption of Automated Software Testing: A Principal Component Analysis ApproachSoftware10.3390/software30100013:1(1-27)Online publication date: 2-Jan-2024
    • (2023)IoV Vulnerability Classification Algorithm Based on Knowledge GraphElectronics10.3390/electronics1223474912:23(4749)Online publication date: 23-Nov-2023
    • Show More Cited By

    Comments

    Information & Contributors

    Information

    Published In

    cover image ACM Conferences
    ICSE '22: Proceedings of the 44th International Conference on Software Engineering
    May 2022
    2508 pages
    ISBN:9781450392211
    DOI:10.1145/3510003
    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 the author(s) 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

    In-Cooperation

    • IEEE CS

    Publisher

    Association for Computing Machinery

    New York, NY, United States

    Publication History

    Published: 05 July 2022

    Permissions

    Request permissions for this article.

    Check for updates

    Qualifiers

    • Research-article

    Funding Sources

    • National Science Foundation

    Conference

    ICSE '22
    Sponsor:

    Acceptance Rates

    Overall Acceptance Rate 156 of 1,130 submissions, 14%

    Upcoming Conference

    ICSE 2025

    Contributors

    Other Metrics

    Bibliometrics & Citations

    Bibliometrics

    Article Metrics

    • Downloads (Last 12 months)45
    • Downloads (Last 6 weeks)2

    Other Metrics

    Citations

    Cited By

    View all
    • (2024)Precision-Driven Product Recommendation Software: Unsupervised Models, Evaluated by GPT-4 LLM for Enhanced Recommender SystemsSoftware10.3390/software30100043:1(62-80)Online publication date: 29-Feb-2024
    • (2024)A Survey on Factors Preventing the Adoption of Automated Software Testing: A Principal Component Analysis ApproachSoftware10.3390/software30100013:1(1-27)Online publication date: 2-Jan-2024
    • (2023)IoV Vulnerability Classification Algorithm Based on Knowledge GraphElectronics10.3390/electronics1223474912:23(4749)Online publication date: 23-Nov-2023
    • (2023)CLICK: Integrating Causal Inference and Commonsense Knowledge Incorporation for Counterfactual Story GenerationElectronics10.3390/electronics1219417312:19(4173)Online publication date: 8-Oct-2023
    • (2023)Enhancing Algorithm Selection through Comprehensive Performance Evaluation: Statistical Analysis of Stochastic AlgorithmsComputation10.3390/computation1111023111:11(231)Online publication date: 16-Nov-2023
    • (2023)MicroProf: Code-level Attribution of Unnecessary Data Transfer in Microservice ApplicationsACM Transactions on Architecture and Code Optimization10.1145/362278720:4(1-26)Online publication date: 14-Dec-2023
    • (2023)A Multifaceted Memory Analysis of Java BenchmarksProceedings of the 20th ACM SIGPLAN International Conference on Managed Programming Languages and Runtimes10.1145/3617651.3622978(70-84)Online publication date: 19-Oct-2023
    • (2023)TrivialSpy: Identifying Software Triviality via Fine-grained and Dataflow-based Value ProfilingProceedings of the International Conference for High Performance Computing, Networking, Storage and Analysis10.1145/3581784.3607052(1-13)Online publication date: 12-Nov-2023
    • (2023)DJXPerf: Identifying Memory Inefficiencies via Object-Centric Profiling for JavaProceedings of the 21st ACM/IEEE International Symposium on Code Generation and Optimization10.1145/3579990.3580010(81-94)Online publication date: 17-Feb-2023

    View Options

    Get Access

    Login options

    View options

    PDF

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader

    Media

    Figures

    Other

    Tables

    Share

    Share

    Share this Publication link

    Share on social media