harpoon.Analysis.Realtime
Class Realtime

java.lang.Object
  extended by harpoon.Analysis.Realtime.Realtime

public class Realtime
extends Object

Realtime is the top-level access point for the rest of the Harpoon compiler to provide support for the Realtime Java MemoryArea extensions described in the Realtime Java Specification and there's also a JavaDoc version.

Version:
$Id: Realtime.java,v 1.16 2004/02/08 01:53:47 cananian Exp $
Author:
Wes Beebee <wbeebee@mit.edu>

Nested Class Summary
static class Realtime.QuadPass
           
static class Realtime.TreePass
           
 
Field Summary
static int ALL
          Overly aggressive (and wrong!)
static int ANALYSIS_METHOD
          Determine which analysis method to use.
static int CHEESY_POINTER_ANALYSIS
          Pointer analysis to determine whether checks can be removed
static boolean COLLECT_RUNTIME_STATS
          Add code to the executable to enable gathering of runtime statistics.
static boolean DEBUG_REF
          Add additional information on calls to RTJ_malloc to store information about the def. points of all objects which are allocated.
static boolean NOHEAP_CHECKS
          Add checks to determine if a NoHeapRealtimeThread is touching the heap.
static boolean NOHEAP_MASK
          Add masking support, but no checks
static int REAL_POINTER_ANALYSIS
          More complicated pointer analysis to determine which checks to remove.
static boolean REALTIME_JAVA
          Is Realtime JAVA support turned on?
static boolean REALTIME_THREADS
          Add support for realtime threads
static boolean REALTIME_THREADS_PREEMPT
          Add support for CheckQuanta
static boolean REMOVE_TAGS
          Remove tagging when you remove all checks?
static boolean RTJ_PERF
          Add support for RTJPerf
static int SIMPLE
          Very conservative analysis method - keep all checks
 
Constructor Summary
Realtime()
           
 
Method Summary
static HCodeFactory addChecks(Linker linker, ClassHierarchy ch, HCodeFactory parent, Set roots)
          Adds realtime support to a block of code using an harpoon.ClassFile.HCodeFactory.
static HCodeFactory addNoHeapChecks(HCodeFactory hcf)
          Add checks to see if a NoHeapRealtimeThread illegally touches the heap.
static HCodeFactory addQuantaChecker(HCodeFactory hcf)
          Add code to check to see if a realtime thread quanta has passed to determine whether to do a user-thread-level context switch.
static void configure(String options)
          Configure Realtime Java based on the following command-line options.
static Collection getRoots(Linker linker)
           
static void printStats()
          Print statistics about the static analysis and addition of Realtime support.
static HCodeFactory setupCode(Linker linker, ClassHierarchy ch, HCodeFactory parent)
          Adds realtime support to a block of code using an harpoon.ClassFile.HCodeFactory.
static void setupObject(Linker linker)
          Creates a field memoryArea on java.lang.Object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

REALTIME_JAVA

public static boolean REALTIME_JAVA
Is Realtime JAVA support turned on?


REMOVE_TAGS

public static boolean REMOVE_TAGS
Remove tagging when you remove all checks?


REALTIME_THREADS

public static boolean REALTIME_THREADS
Add support for realtime threads


REALTIME_THREADS_PREEMPT

public static boolean REALTIME_THREADS_PREEMPT
Add support for CheckQuanta


RTJ_PERF

public static boolean RTJ_PERF
Add support for RTJPerf


ANALYSIS_METHOD

public static int ANALYSIS_METHOD
Determine which analysis method to use.


SIMPLE

public static final int SIMPLE
Very conservative analysis method - keep all checks

See Also:
Constant Field Values

CHEESY_POINTER_ANALYSIS

public static final int CHEESY_POINTER_ANALYSIS
Pointer analysis to determine whether checks can be removed

See Also:
Constant Field Values

REAL_POINTER_ANALYSIS

public static final int REAL_POINTER_ANALYSIS
More complicated pointer analysis to determine which checks to remove.

See Also:
Constant Field Values

ALL

public static final int ALL
Overly aggressive (and wrong!) check removal that removes all checks.

See Also:
Constant Field Values

COLLECT_RUNTIME_STATS

public static boolean COLLECT_RUNTIME_STATS
Add code to the executable to enable gathering of runtime statistics.


NOHEAP_CHECKS

public static boolean NOHEAP_CHECKS
Add checks to determine if a NoHeapRealtimeThread is touching the heap.


NOHEAP_MASK

public static boolean NOHEAP_MASK
Add masking support, but no checks


DEBUG_REF

public static boolean DEBUG_REF
Add additional information on calls to RTJ_malloc to store information about the def. points of all objects which are allocated.

Constructor Detail

Realtime

public Realtime()
Method Detail

configure

public static void configure(String options)
Configure Realtime Java based on the following command-line options.


setupObject

public static void setupObject(Linker linker)
Creates a field memoryArea on java.lang.Object. Since primitive arrays inherit from java.lang.Object, this catches them as well.


getRoots

public static Collection getRoots(Linker linker)

setupCode

public static HCodeFactory setupCode(Linker linker,
                                     ClassHierarchy ch,
                                     HCodeFactory parent)
Adds realtime support to a block of code using an harpoon.ClassFile.HCodeFactory. This includes all of the pre-analysis modifications:


addChecks

public static HCodeFactory addChecks(Linker linker,
                                     ClassHierarchy ch,
                                     HCodeFactory parent,
                                     Set roots)
Adds realtime support to a block of code using an harpoon.ClassFile.HCodeFactory. This includes the analysis and all of the post-analysis modifications.


addNoHeapChecks

public static HCodeFactory addNoHeapChecks(HCodeFactory hcf)
Add checks to see if a NoHeapRealtimeThread illegally touches the heap.


addQuantaChecker

public static HCodeFactory addQuantaChecker(HCodeFactory hcf)
Add code to check to see if a realtime thread quanta has passed to determine whether to do a user-thread-level context switch.


printStats

public static void printStats()
Print statistics about the static analysis and addition of Realtime support.