Skip to content

tongzhou80/MiniSpot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This project is out of personal interest and is currently put on hold. The documentation is moving to GitBook, this page is no longer updated. This project is paused because it involves too much details of the VM. I am planning on letting loose of some requirements and not supporting Java thread, and making the implementation easier.

Table of Contents

Introduction

Aiming to be like Minix, MiniSpot is an educational JVM based on HotSpot VM. A JVM is not difficult to understand, this project shows you what a naive JVM really looks like without the high performance tweaks.

It may serve as a teaching assisting tool for compiler classes, or as a guide for students who are interested in high-level language VM implementations. For example, it provides a clear interface of intermediate representation so that students could use the interface to practice implementing static analysis and compiler optimizations.

It has the following features compared to the original HotSpot

  • Editable with Clion IDE
  • Minimized production-style code, much easier to read
  • Minimized platform-dependent code by using STL
  • Easier to extend, more modular and reusable

For now, MiniSpot only supports linux_x86 platform.

The following section gives an overview of some vital topics.

Runtime Overview

MiniSpot implements most of HotSpot's runtime services' interface, you may read HotSpot' runtime overview first to have a general idea. The following overview is MiniSpot specific.

Heap

GenCollectedHeap is defines a generational model for generational GC. Each generation's specific implementation depends on the collector.

Generally a Generation derived class should at least implement

  • Basic space operations
  • Allocation routine
  • Collection routine
  • Oops iteration

DefNewGeneration is the young gen used by serial GC. It uses this model and implement those operations.

General Reference

About

An educational JVM (to be continued)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published