IBM Real Time Application Execution Optimizer for Java helps to optimize and verify a compiled Java application, preparing the application for deployment in specific environments. It is a command line tool that can operate on any compiled Java application, whether standard edition, micro-edition, or real-time.
The tool provides the following functions:
- Escape analysis of objects per method invocation
- Control flow analysis that splits an application into archives according to thread accessibility
- Control flow analysis that detects potental occurrences of real-time java runtime errors MemoryAccessError, IllegalAssignmentError, IllegalThreadStateException
- Control flow analysis that determines entry points into an application
- Addition of stackmaps to Java class files
- Verification of Java class files
- Auto-generation of classes that will load and initialize all other classes within the same archive
- Specialized packaging of Java applications into deployable archives by packaging all referenced classes from a dual class path
- Removal of unwanted attributes from Java class files
How does it work?
IBM Real Time Application Execution Optimizer for Java has many features. It loads the classes and resources of an application, analyzes or modifies them, then it writes them to disk along with any requested analysis files.
While loading the application, all classes needed for deployment of the application are identified and loaded. Also identified are all unresolved references. An unresolved reference is a class, method or field that cannot be found. Each class is checked for all possible class loading, resolution, and verification errors. This can be helpful to verify classes that are not produced by standard compilers and to ensure no application components are missing.
The tool separates application classes into the following categories:
- NoHeapRealtimeThread (NHRT) accessible
- RealtimeThread accessible
- regular thread accessible
- inaccessible: classes not accessible to any thread.
Once separated, the tool will package these class groups into separate archives for specialized deployment when the classes are written to disk. It will package resources into an additional archive.
While analyzing the control flow of the application, the tool identifies all entry points into the application, which are the classes, methods or fields that can be accessed from outside the application. For example, it will detect methods that can be invoked in application classes from external classes because they override external methods.
It verifies the integrity of real-time Java memory usage in the application, by detecting the potential run-time errors MemoryAccessError, IllegalAssignmentError and IllegalThreadStateException which are common errors that are difficult to eliminate when developing real-time Java.
Escape analysis is used by the tool to determine the persistent memory characteristics of allocated objects within the application on a per-invocation basis. For each method, an escape analysis determines whether the objects created by invocations of the method can persist. This helps identify memory requirements for the heap, for scopes, and for other memory areas in use.
While writing classes, to disk, the tool can remove unwanted class file attributes (such as attributes needed only for debugging), and adds stackmaps to classes. This can assist with run-time memory consumption constraints.
The tool can add to each written archive an auto-loader class that will load and initialize all other classes within the same archive, in order to trigger early class initialization for an application.
No comments:
Post a Comment