2019 50th Sunday

We work to receive the task, not only should understand what to do, and also what should be thinking about it at the time of execution, especially when they feel there is a problem encountered place in doubt. Some of my colleagues very close attention to what to do, who think that is company policy, said the leaders were executed unconditionally, even if they are doing when feeling obvious question to do the same, but also to allow the leadership to do so under the pretext that only the their own way of doing things as a work machine for the team and myself are actually negative.

Java Platform Debugger System (Java Platform Debugger Architecture, JPDA) defines a complete stand-alone system, which consists of three relatively independent levels composed, and the provisions of the interaction between the three of them, these three levels from low to high are the Java virtual machine tool Interface (JVMTI), Java debug wire protocol (JDWP) and Java debug Interface (JDI).
The debugger calls the JDK provided JDI realized (JPDA front-end), comes through JDWP agreement, and JVM JPDA back-end (jdwp.dll, jdwp.so, ...) to communicate. JPDA back-end by calling the JVM TI interfaces to learn debugging information, or to send control commands. Then, JPDA back-end information or commands to debug an execution result by JDWP protocol, returns to the debugger.

JVMTI (JVM Tool Interface) is a Java virtual machine provided by the native programming interface, is JVMPI (Java Virtual Machine Profiler Interface) and JVMDI (Java Virtual Machine Debug Interface) is an updated version. In Java 5/6, the virtual machine interface is also increased monitor (Monitoring), thread analysis (Thread analysis) and coverage analysis (Coverage Analysis) and other functions. It is an implementation of the Java debugger, and basic operation of state testing and other analysis tools Java, such as Visual VM, Eclipse TPTP (Test and Performance Tools Platform) The CPU Profiler and Memory Profiler.
JVMTI is a native code interfaces, so using JVMTI we need to deal with C / C ++ and JNI. In fact, the development of commonly used to establish a Agent (in the form of dynamic libraries), we can start when a Java program to load it (boot loader mode), you can load (active load mode) after 5 using Java run time .
-agentlib:agent-lib-name=options
-agentpath:path-to-agent=options

javaagent function is (dynamic library association under linux is libinstrument.so) called instrument of JVMTIAgent, another name JPLISAgent (Java Programming Language Instrumentation Services Agent), this name was also fully embodies the most essential function: that special provide support for the preparation of java language instrumentation services.
instrument agent and realized Agent_OnLoad two methods Agent_OnAttach, that is when we use it to support both the start time to load the agent, also supports dynamically at runtime to load the agent, which agent can also be loaded through a similar start - javaagent: myagent.jar indirect manner Instrument agent loading, dynamic loading operation is dependent on the jvm agent attach mechanism jVM attach mechanism implemented to load the agent by sending the load command.

Guess you like

Origin www.cnblogs.com/doit8791/p/12006115.html