Data Collection Agent of JPManager Java Virtual Machine Java Application Environment (Tomcat, JBoss, WebLogic) Target Application Servlets, JSP, EJBs, Threads Data Collection Agents Instrumenter Applicatoin Class Instrumentation Profile Metrics Information: Class Metrics Thread Metrics DCA Metric Provider
Two instrumentation methods Class Intercepting Instrument the byte code by changing the hierarchy of class inheritance. Method Hijacking Instrument the byte code by adding new methods to classes or new probe codes to the methods.
Java Virtual Machine Components Class loaders Class file verifier Execution engine
The Delegation of Class Loaders Primary Class Loader Extension Class Loader Application Class Loader User Defined Class Loader
Data Flow of the Instrumentation Modified ClassLoader Instrumentation Profile DCA Instrumenter Instrumented Classes Metrics Information DCA Metric Provider Application Classes JVM Execution Engine Dynamic Information JPManager Server JVM
Analysis of Java Instrumentation (1) Static Structure Consistency instrumentation : R = x, v [P.start(x) = R.start(x) v before L P.ValueOf(v) = R.ValueOf(v)] x, v [P.start(x) = R.start(x) w after L P.ValueOf(w) = R.ValueOf(w)] Dynamic Execution Consistency Object o can be described by a six-tuple = (S, s0, Mcall, T, )
Analysis of Java Instrumentation (2) is o life space S is a finite set of states of object s0 is a single start state of the object s0, this state is usually created by new. Mcall is a set of method calls T is a set of valid timestamps is a mapping