The method for investigating the transition of use status of Explicit heap includes the method for investigating the event log of the explicit management heap functionality and method for acquiring the information using JavaAPI. For details about how to use the Java API, see 7.13.1 Investigating the usage (snapshot) of Explicit heap at a certain point.
This point describes how to investigate using the event log of explicit management heap functionality.
Set normal in the -XX:HitachiExplicitMemoryLogLevel option of JavaVM. As a result, the use status of Explicit heap is output at the following timings:
Moreover, when verbose is specified in the -XX:HitachiExplicitMemoryLogLevel option of JavaVM, the use status of the Explicit heap will be output at the following timings in addition to the output timing in case of normal.
An output example is as follows:
[ENS]<Thu Oct 21 14:55:50 2007>[EH: 12672K->12800K(12800K/65536K)][E/F/D: 200/0/0][cause:GC][CF: 0] |
The part marked with bold starting with EH indicates the usage of Explicit heap. Among the contents output to the log, the row indicating the usage of Explicit heap must include the information corresponding to the bold part. You can check the transition of the use status by coding and plotting this value in graph.
This example shows that the line beginning with the first [ENS] is the log that is output when a copy garbage collection (GC) occurs, as indicated in the part that begins with cause:, and the line beginning with the second [ENS] is the log that is output during the automatic release processing of the Explicit memory block (Migrate). The log in the first line indicates that the used size of the Explicit heap before the copy garbage collection occurs is 12,672 KB, and the used size after the copy garbage collection occurs is 12,800 KB. The log in the second line indicates that the used size of the Explicit heap is 12,800 KB and that the automatic release processing of the Explicit memory block took 0.1124626 seconds.
Note that the log indicating the use status starts with ENS or EVS. When the event log is filtered in this character string, it becomes easier to check the use status.
Specify verbose in the -XX:HitachiExplicitMemoryLogLevel option of JavaVM. As a result, the use status of Explicit memory block with the changed size will be output at the following timings:
An output example is as follows:
[ENS]Thu Oct 21 14:55:50 2007[EH: 11422K->12800K(12800K/65536K)][E/F/D: 200/0/0][cause:GC][CF: 0] |
The part marked in bold indicates the usage of one Explicit memory block called "REM2".
Moreover, when verbose is specified in the -XX:HitachiExplicitMemoryLogLevel option, if the Explicit memory block is released, the information of the released Explicit memory block is output. An output example is as follows:
[ENS]Tue Jul 24 01:23:51 2007[EH: 12800K->11776K(11776K/65536K), 0.1129602 secs][E/F/D: 523/0/0]\ |
The part marked in bold indicates the information of the released Explicit memory block called "REM2". "302" is the released memory size (Size of the allocated Explicit memory block).
You can check the transition of the use status for each Explicit memory block by coding and plotting these values in the graph. Note that the size of individual Explicit memory block increases uniformly until released.