Borland Optimizeit Suite is a Java code optimization kit provided by Borland, including: 1. Profiler: Memory, Java Virtual Machine, CPU Usage Tracking 2, Thread Debugger: Thread Tracking Tool 3, Code Cover: Code Run Overlay Tracking Tool, Provide the coverage of the code
The following is a detailed introduction:
[1, PROFILER:] First introduces what is the important advantage of Java's memory leak Java is to automatically manage memory by the garbage collection, gc. The programmer does not need to release memory by calling a function. Therefore, many programmers believe that Java does not have memory leaks, or that even if there is a memory leak, it is not the responsibility of the program, but the problem with GC or JVM. In fact, this idea is incorrect because Java also exists in memory, but its performance is different from C . As more and more server programs use Java technology, such as JSP, servlet, EJB, etc., server programs are often run for a long time. In addition, in many embedded systems, the total amount of memory is very limited. Memory leakage issues also become very critical, even after each running a small amount of leakage, the system is also dangerous in the crash after long-term operation. Java has memory leak issues, which is mainly to be some objects that are no longer used, but they are still referenced. In order to solve these problems, we can check the memory leaks through software tools. The main principle of check is to expose objects in all stacks, so that programmers find objects that are useless but still quote.
Profiler is primarily used to observe current memory and Java virtual machines, CPU usage. You can view the contents: 3 buttons in the middle of the icon bar sequence from left to right, view Java virtual machines, CPUs, memory. View memory conditions You can view: 1, Heap: Heap, Default Mode 2, Allocation Backtrace: Displaying a Class of a Class in HEAP 3, Instance Display: Shows a reference to a certain instance (Reference) 4. Reference from roots: Double-click the Source code by double-click the Allocated At list by double-clicking the Allocated AT list after the class inheritance relationship, and the source code path must be set in advance.
[2, Thread Debugger] Thread Debugger is used for thread debugging, and it can observe the operation, deadlock and thread modifier of threads. Thread Debugger can use the features: 1. View threads 2, see Monitor information: Mainly to look at the thread. 3, launch Moniter Analysis View threads can follow 1, Acitvate mode: View thread activity 2, Contention mode: Display content, so-called contention refers to two or more Thread trying to simultaneously enter the same Monitor 3, Waiting and I / O Waiting mode 4, Moniter Enter mode: Show threads enter Moniter and run in Moniter.
[3, Code Coverage:] Main function: It is used to detect which code is executed, which code is not executed, and the code executed accounts for the proportion of total code. Use the steps: 1, set (file-> settings) to be executed, the package, the source code path, the source code path. 2, start executing 3, Class Coverage view, you can see the coverage of all classes of the system references. 4. Double-click a class that can jump into this class to skip this class. The three buttons in the Method Coverage unit are 1, the Class Coverage (Class Code Covers) View 2, Method Coverage View (Method coverage) 3, console view, you can see the output of the program. Note: Chinese display is not supported.