Sun Logo




CLDC HotSpottrademark Implementation Architecture Guide

04-2008


Contents

Figures

Examples

Preface

1. CLDC HotSpot Implementation Virtual Machine

1.1 Overview

1.2 The HotSpot Virtual Machine

1.3 Processor and Memory Requirements

1.4 Compilation Performance

1.4.1 Faster Execution Consumes Less Power

2. Technical Overview

2.1 Key Features

2.1.1 Portable Architecture

2.1.2 Adaptive JIT Compiler

2.1.2.1 Incremental and Scheduled Compilation

2.1.2.2 Tunability

2.1.3 Optimized Interpreter

2.1.4 Lightweight Threading System

2.1.5 Compact Object Layout

2.1.5.1 Very Compact Object Headers

2.1.5.2 Field Packing

2.1.6 Unified Resource Management

2.1.7 Generational Garbage Collection

2.1.8 Dedicated Heap Area for Compiled Code

2.1.9 Fast Integrated Class Prelinker

2.1.10 Fully Object-Oriented Internal Design and Upwards Scalability

2.1.11 Synchronization

2.1.12 Multitasking Support

2.1.13 Faster Virtual Machine Startup With Ahead‐of‐Time Compilation

2.1.14 Faster Application Startup With In-Place Execution

2.1.15 ARM Processor Support

2.2 Additional Components

2.3 Other Technical Features in This Release

2.3.1 Multiple and Shared In-place Execution Images

2.3.2 AOT Compilation of Application Classes

2.3.3 Improved Support for Dynamically Loaded Optional Packages

2.3.4 ARM Vector Floating Point Compiler Support

3. Heap Architecture and Garbage Collection

3.1 Garbage Collection

3.1.1 Structure of the Heap

3.1.2 Tracking Pointers Across Generations

3.1.3 Fast Allocation

4. Adaptive JIT Compiler

4.1 Code Set Management

4.2 Tuning the JIT Compiler

5. Threading System

5.1 Long-Running Compared With Blocking Native Methods

6. Multitasking

6.1 Introduction

6.1.1 Isolates

6.1.1.1 Example Program

6.1.2 Multitasking in MIDP 2.0

6.1.3 Reduced Isolate API

6.2 Isolate Implementation

6.2.1 Virtualization of Static Variables

6.2.2 Static Class Initialization

6.2.3 Isolate Creation

6.2.4 Synchronization

6.2.4.1 Synchronization of Java Classes

6.2.4.2 Synchronization of String Objects

6.2.5 Resource Management

6.2.5.1 Scheduling and Priorities

6.2.5.2 Object Heap Sharing

6.2.6 JSR 121

7. Ahead-of-Time Compilation Support

7.1 Methods Eligible for AOT Compilation

7.2 Choosing ROMized Methods to be AOT Compiled

7.3 AOT Compilation of Application Classes

7.3.1 Choosing Which Application Methods to AOT Compile

8. In-Place Execution

8.1 Design Overview

8.2 Multiple and Shared Images

8.2.1 Libraries Used By Multiple MIDlets

8.2.2 Example of Unshared Library Image

8.2.3 Example of Shared Library Image

8.3 Security Considerations

8.3.1 Storing Application Image Files

8.3.2 Warning Message

8.4 Integrating the In-Place Execution Feature

8.4.1 Running the Converter

8.4.2 Executing an Application Image

8.4.3 In-Place Execution Example

8.5 In-Place Execution from Flash

8.6 Experimenting With In-Place Execution

9. Jazelle Options for ARM Implementations

9.1 Flags to Enable Jazelle DBX

10. Vector Floating Point Support for ARM Implementations

10.1 VFP Implementation Details

10.1.1 BUGS

11. ROMizer

11.1 Running the ROMizer

11.2 Requirement for System Classes

11.3 ROMizer Options

11.3.1 ROMizer Optimization Options

11.3.2 Romconfig Option

11.3.3 Ahead-of-Time (AOT) Compilation

11.3.4 Example ROM Configuration File

11.4 ROMizer Log File

12. Dynamically Loaded Optional Packages

12.1 Dynamic Native Method Support Improvements

12.2 Dynamic Hidden Classes

13. Java Programming Language Debugging with KDWP

13.1 KDWP Architecture

13.2 Debug Agent

13.2.1 Connections Between a Debugger and CLDC HotSpot Implementation

13.2.2 Packet Processing

13.3 Debugger Support

13.3.1 Events

13.3.2 Breakpoints

13.3.3 Single Stepping

13.4 Using the Debug Agent and the JPDA Debugger

13.4.1 Starting a Debug Session

13.4.2 Debugging Example