CDC Porting Guide

These include Linux and several other UNIX-like operating systems. … This Host Programming Interface (HPI) represents the portability interface for the …

More PDF Content

CDC Porting Guide

  • CDC Porting Guide
    • Contents
    • Figures
    • Tables
    • Preface
    • I Getting Started
      • Introduction
        • 1.1 CDC Technology
        • 1.2 Benefits
      • Planning
        • 2.1 Target Platform Requirements
          • 2.1.1 CPU
          • 2.1.2 Operating System
        • 2.2 Porting Steps
        • 2.3 Source Code Organization
          • 2.3.1 build Directory
          • 2.3.2 src Directory
    • II HPI Layer
      • Host Programming Interface
        • 3.1 HPI Header File Hierarchy
          • 3.1.1 CVM_HDR_* Header File Macros
          • 3.1.2 src/portlibs Porting Libraries
        • 3.2 Creating an HPI Implementation
          • 3.2.1 Suggested Work Flow
          • 3.2.2 Prepare the Target-Specific build and src Hierarchies
          • 3.2.3 Data Types, Global State and Memory Access Support
          • 3.2.4 JNI Support
            • 3.2.4.1 CVMjniInvokeNative
          • 3.2.5 Thread Support
          • 3.2.6 Synchronization Support
          • 3.2.7 I/O and System Support
          • 3.2.8 Networking Support
        • 3.3 CDC Class Library Support Layer
          • 3.3.1 Source Code Organization
          • 3.3.2 Creating a CDC Class Library Support Layer Implementation
        • 3.4 Simple Test Procedure
      • Fast Locking
        • 4.1 Fast Lock Implementations
        • 4.2 Choosing a Fast Lock Implementation
        • 4.3 Implementations
    • III Dynamic Compiler Layer
      • Dynamic Compiler
        • 5.1 Dynamic Compiler Overview
        • 5.2 Dynamic Compiler Header File Hierarchy
          • 5.2.1 portlibs/jit/risc RISC Porting Library
        • 5.3 Creating a Dynamic Compiler Implementation
          • 5.3.1 Suggested Work Flow
          • 5.3.2 CPU Abstraction Interface
          • 5.3.3 Glue Code
          • 5.3.4 Miscellaneous Code
            • 5.3.4.1 Code Cache Copy
            • 5.3.4.2 Trap-based NullPointerExceptions
          • 5.3.5 Intrinsics
          • 5.3.6 Invokers
          • 5.3.7 Emitters
          • 5.3.8 Helpers
          • 5.3.9 Floating Point Support
    • IV Garbage Collector Layer
      • Creating a Garbage Collector
        • 6.1 Introduction
        • 6.2 Exactness
          • 6.2.1 Global GC Requests
            • 6.2.1.1 Method Invocation Points
            • 6.2.1.2 Backwards Branches
            • 6.2.1.3 Class Loading and Constant Resolution Points
            • 6.2.1.4 JNI Implementation
            • 6.2.1.5 Memory Allocation Points
        • 6.3 Pluggable GC
          • 6.3.1 Separate Memory System
          • 6.3.2 Entry Points to GC Code
          • 6.3.3 Shared Memory System Code
          • 6.3.4 GC-specific Memory System Code
          • 6.3.5 GC Execution Flow
        • 6.4 Writing a New GC
          • 6.4.1 Source Organization
          • 6.4.2 Data Types
          • 6.4.3 What to Implement
            • 6.4.3.1 Basic Execution
            • 6.4.3.2 Read and Write Barriers
            • 6.4.3.3 Moving Arrays
          • 6.4.4 What to Call
            • 6.4.4.1 Initiating a GC
            • 6.4.4.2 Root Scans
            • 6.4.4.3 Special Root Scans
            • 6.4.4.4 Object Walking
            • 6.4.4.5 Per-object Data
          • 6.4.5 Example GC
      • Direct Memory Interface Reference
        • 7.1 Introduction
        • 7.2 Object Field Accesses
          • 7.2.1 Accessing Fields of 32-bit Width
            • 7.2.1.1 Weakly-Typed 32-bit Read and Write
            • 7.2.1.2 Strongly-Typed 32-bit Read and Write
          • 7.2.2 Accessing Fields of 64-bit Width
            • 7.2.2.1 Weakly-Typed 64-bit Read and Write
            • 7.2.2.2 Strongly-Typed 64-bit Read and Write
        • 7.3 Array Accesses
          • 7.3.1 Accessing Elements of 32-bit Width and Below
          • 7.3.2 Accessing Elements of 64-bit Width
            • 7.3.2.1 Weakly-Typed Versions
            • 7.3.2.2 Strongly-Typed Versions
          • 7.3.3 Miscellaneous Array Operations
        • 7.4 GC-safety of Threads
          • 7.4.1 GC-unsafe Blocks
          • 7.4.2 GC-safe Blocks: Requesting a GC-Safe Point
      • Indirect Memory Interface Reference
        • 8.1 Introduction
        • 8.2 ICell Manipulations
        • 8.3 Registered Indirection Cells
          • 8.3.1 Local Roots
          • 8.3.2 Global Roots
        • 8.4 Object Field Accesses
          • 8.4.1 Accessing Fields of 32-bit Width
            • 8.4.1.1 Weakly-Typed 32-bit Read and Write
            • 8.4.1.2 Strongly-Typed 32-bit Read and Write
          • 8.4.2 Accessing Fields of 64-bit Width
            • 8.4.2.1 Weakly-Typed 64-bit Read and Write
            • 8.4.2.2 Strongly-Typed 64-bit Read and Write
        • 8.5 Array Accesses
          • 8.5.1 Accessing Elements of 32-bit Width and Below
          • 8.5.2 Accessing Elements of 64-bit Width
            • 8.5.2.1 Weakly-Typed Versions
            • 8.5.2.2 Strongly-Typed Versions
          • 8.5.3 Miscellaneous Array Operations
          • 8.5.4 GC-unsafe Operations
      • How to be GC-Safe
        • 9.1 Introduction
        • 9.2 Living with ICells
          • 9.2.1 ICell Types
        • 9.3 Explicitly Registered Roots
          • 9.3.1 Declaring and Using Local Roots
            • 9.3.1.1 Example of Local Root Use
          • 9.3.2 Declaring and Using Global Roots
            • 9.3.2.1 Examples of Declaring and Using Global Roots
        • 9.4 GC-safety of Threads
          • 9.4.1 GC-atomic Blocks
          • 9.4.2 Offering a GC-safe Point
    • V GUI Layer
      • Personal Basis Profile
        • 10.1 Introduction
        • 10.2 Porting Architecture
        • 10.3 Planning and Requirements
          • 10.3.1 Native GUI Toolkit Requirements
          • 10.3.2 Notes
        • 10.4 Writing a Personal Basis Profile AWT Implementation
          • 10.4.1 Build System Procedures
          • 10.4.2 Source Code Procedures
          • 10.4.3 Native Bridge Implementation
      • Personal Profile
        • 11.1 Introduction
          • 11.1.1 AWT Background
          • 11.1.2 Additional Reading
        • 11.2 Porting Architecture
        • 11.3 Planning and Requirements
          • 11.3.1 Native GUI Toolkit Requirements
          • 11.3.2 Notes
        • 11.4 Writing a Personal Profile AWT Implementation
          • 11.4.1 Build System Procedures
          • 11.4.2 Source Code Procedures
          • 11.4.3 Native Bridge Implementation
          • 11.4.4 Event Delivery Notes
            • 11.4.4.1 Event Ordering
            • 11.4.4.2 Event Delivery Mechanism
    • VI AMS Layer
      • CDC Application Management System
        • 12.1 Overview
        • 12.2 Conventional Java Application Management
        • 12.3 mtask: Process-Based JVM Cloning
        • 12.4 CDC AMS Application Management Framework
        • 12.5 Tuning Notes
          • 12.5.1 Generating a Class Preinitialization List
          • 12.5.2 Calculating Code-Cache Size
          • 12.5.3 Generating a Method Precompilation List
        • 12.6 Implementation Notes
    • VII Appendices
      • Debugging with gdb
        • A.1 Setup Procedures
          • A.1.1 Signal Handlers
          • A.1.2 gdb and GC Safety
          • A.1.3 Turning on Trace Output
        • A.2 High-Level Dumpers
          • A.2.1 CVMdumpObject
          • A.2.2 CVMdumpClassBlock
          • A.2.3 CVMdumpString
          • A.2.4 CVMdumpObjectReferences
          • A.2.5 CVMdumpClassReferences
        • A.3 Low-Level Dumpers
          • A.3.1 Using CVMconsolePrintf()
          • A.3.2 Displaying the PC Offset
          • A.3.3 Dumping the Java Stack
          • A.3.4 Displaying Opcode Information
          • A.3.5 Dumping the Java Heap
          • A.3.6 Dumping Object Information
          • A.3.7 Dumping Loaded Classes
          • A.3.8 Dumping Threads
        • A.4 Conversion Procedures
          • A.4.1 The CVMExecEnv Structure
          • A.4.2 Converting Between CVMExecEnv* and JNIEnv*
          • A.4.3 Converting from JNI Types to Internal VM Types
          • A.4.4 Converting from java.lang.Class to CVMClassBlock*
        • A.5 Other Procedures
          • A.5.1 Debugging Crashes on Linux
          • A.5.2 Debugging Compiled Methods
      • C Stack Checking
        • B.1 Introduction
        • B.2 Calculating C Stack Redzones
          • B.2.1 C Stack Redzone Checks
            • B.2.1.1 Recursive Functions
          • B.2.2 C Stack Redzone Values
        • B.3 Worst Cases of Stack Usage Chains
          • B.3.1 Worst C Stack Usage Chain in Interpreter Loop
          • B.3.2 Worst C Stack Usage Chain in CVMimplementsInterface Routine
          • B.3.3 Worst C Stack Usage Chain in Class Loader at Class Lookup
          • B.3.4 Worst C Stack Usage Chain in Class Link
          • B.3.5 Worst C Stack Usage Chain in Formatting a String from the PC for a Console Print Out
          • B.3.6 Worst C Stack Usage Chain in Formatting a String of Object from a Class and Hash Value
          • B.3.7 Worst C Stack Usage Chain in Class Verifier
          • B.3.8 Worst C Stack Usage Chain in Signaling an Exception Routine
Download CDC Porting Guide pdf from download.oracle.com, 336 pages, 5195.32KB.
Related Books

Leave a Reply