Birth, life and death of a class

Day 2 / 15:45  / Track 3  / Lang: EN

In this talk we will explore the life cycle of a Java class in depth. We will see how classes can be generated (statically by a compiler, dynamically at runtime or even «anonymously» by the VM itself), how they get loaded into the VM and how they can be modified (i.e. instrumented) during this process. We will describe how classes may live in different class loaders and how a single class loader can have several versions of the same class due to class redefinition. We will also explain how classes are maintained inside the HotSpot virtual machine (in the meta-space) and how they are mirrored in Java trough java.lang.Class objects. We will show how class loading and redefinition can impact apparently unrelated parts of the VM like for example JIT compilation and how the VM manages these dependencies. Finally we will see how classes can die and how they finally get garbage collected.



Volker Simonis

Volker Simonis, SAP

volker_simonis

Volker Simonis works in the SAP JVM Technology group for more than 10 years. He is an OpenJDK contributor from the very beginning and helped the SAP JVM team engage in the OpenJDK project. He's the project lead of the OpenJDK PowerPC/AIX and s390x porting projects and a JDK 8/9 reviewer. He also represents SAP in the Executive Committee of the Java Community Process.