Java Cup
Inside Java

News and views from members of the Java team at Oracle

Master Thesis Proposals

Java is one of the most popular programming languages in the world and it runs on billions of devices scaling from credit cards to multi-machine servers. Oracle is the main contributor to the Java programming language, developed through the OpenJDK project. The Java Virtual Machine (JVM) is the core piece of technology that enables Java's "write once, run anywhere" - the ability to run the same Java program on multiple hardware architectures and operating systems without having to recompile the code. The JVM also implements the Java memory management with a garbage collector that handles all the details for you, and just-in-time (JIT) compilers that enable Java performance to be better than what is possible with any statically compiled language.

The Oracle development office in Stockholm hosts a large part of the JVM development team. We have world leading expertise in areas such as garbage collection, managed runtimes, and compilers. The thesis work will be performed on-site in the Stockholm office in collaboration with Oracle experts and academic researchers who are doing scholarly work on the JVM. For the prospective thesis student, this means the availability of both expert advice on the JVM domain as well as expert advice on writing, and the academic discipline.

To apply, or for more information, contact jesper.wilhelmsson@oracle.com. For Master Thesis projects starting in January, please apply before November 10.

For information about internships in JPG Stockholm, see Internship proposals.

Current Project Proposals

LLM-Guided Optimization and Testing of C2

Summary: Large Language Models (LLMs) have emerged as a promising approach to solving several problems across many disciplines, including programming language implementation and compilers. This thesis project focuses on leveraging LLMs to improve the C2 just-in-time compiler in the HotSpot Java Virtual Machine.

Description

The general goal of the thesis project is to improve the performance and reliability of C2. There are many possible applications of LLMs that could advance this goal. The project can therefore, to a large degree, align with the student's interests. Example topics include:

  • Use LLMs to automatically generate or tune compiler heuristics (e.g., inlining) leveraging the vast amount of data, parameters, and source code available within HotSpot.

  • Use LLMs to guide fuzzing (a technique used to automatically generate tests) towards test cases that are more likely to reveal compiler bugs.

  • Use LLMs to formalize optimizations in C2 to validate the compiler and possibly reveal bugs.

Requirements

  • Must be able to understand and work in C++

  • Must be familiar with basic compiler design

  • Must have a good understanding of low-level development

  • Basic knowledge of Java and HotSpot is desirable, but not required

This is not an exhaustive list of requirements. Getting in touch with us early is a good way to identify any knowledge gaps that must be filled prior to project start to avoid delays.

Improving Java's Memory Efficiency

Summary: This thesis explores how to make Java programs use memory more efficiently by improving how HotSpot decides where to store objects. The goal is to reduce memory usage and runtime overhead, helping Java applications run more efficiently at scale.

Description

In Java, every newly created object is (conceptually) allocated on the heap and managed automatically by a garbage collector. This simplifies development, improves safety, and facilitates interoperability across libraries, but it can also introduce significant memory and CPU overhead compared to lower-level systems languages such as C++.

To mitigate this overhead, the HotSpot Java Virtual Machine attempts to identify, at runtime, objects that can reside in more efficient memory locations, such as the stack, or even allocated to processor registers. The analysis that determines whether an object can safely avoid heap allocation is commonly referred to as "escape analysis".

This thesis investigates different approaches to improving the efficiency, effectiveness, and applicability of escape analysis within HotSpot. Several aspects of the analysis and its integration into HotSpot are in scope for study and improvement, depending on the student's interests. Possible topics include:

  • Improving bytecode analysis to make escape analysis more precise across method calls.

  • Improving inlining heuristics to better align with escape analysis.

  • Rigorously studying and benchmarking escape analysis to identify present limitations.

A successful project has the potential to improve Java's performance and memory efficiency across billions of deployments.

Requirements

  • Must be able to understand and work in C++

  • Must be familiar with garbage collection

  • Must have a good understanding of low-level development

  • Basic knowledge of Java and HotSpot is desirable, but not required

This is not an exhaustive list of requirements. Getting in touch with us early is a good way to identify any knowledge gaps that must be filled prior to project start to avoid delays.