A Profiler for Java Programs

  • Mathias Wöß

Research output: ThesisMaster's / Diploma thesis

Abstract

Profilers are an important aid for developers to find bottlenecks and unused code in programs. Over the years many such tools have been developed for the Java language and ecosystem, each with their own advantages and caveats. We present a novel profiling tool that is fully open-source, has a permissive license and is simple to set up and use. While most Java profilers use bytecode instrumentation, our profiler inserts counter statements directly into the source code. To analyze raw Java files we leverage the Coco/R compiler generator, coupled with a small and reusable fuzzy grammar. The grammar is designed to be robust against future language changes and is tailored to gather only necessary metadata about Java source files. In its core, our profiler is a multi-platform command-line tool that generates HTML reports. The report serves as a structured, sorted and detailed overview of how often methods, blocks and statements were executed. To ensure correctness and the compatibility of our profiler to Java Version 17, we relied upon an extensive unit test suite and the successful instrumentation of large code repositories (like jUnit 5). For improved usability and comfort, we additionally provide a JavaFX user interface to easily configure the parameters for our tool and to automatically execute it with the press of a button.
Original languageEnglish
Supervisors/Reviewers
  • Mössenböck, Hanspeter, Supervisor
Publisher
Publication statusPublished - Feb 2024

Fields of science

  • 102 Computer Sciences
  • 102009 Computer simulation
  • 102011 Formal languages
  • 102013 Human-computer interaction
  • 102022 Software development
  • 102024 Usability research
  • 102029 Practical computer science

JKU Focus areas

  • Digital Transformation

Cite this