optiongcutil{column{header"^S0^"/* Survivor 0 Space - Percent Used */data(1-((sun.gc.generation.0.space.1.capacity-sun.gc.generation.0.space.1.used)/sun.gc.generation.0.space.1.capacity))*100scalerawalignrightwidth6format"0.00"}column{header"^S1^"/* Survivor 1 Space - Percent Used */data(1-((sun.gc.generation.0.space.2.capacity-sun.gc.generation.0.space.2.used)/sun.gc.generation.0.space.2.capacity))*100scalerawalignrightwidth6format"0.00"}column{header"^E^"/* Eden Space - Percent Used */data(1-((sun.gc.generation.0.space.0.capacity-sun.gc.generation.0.space.0.used)/sun.gc.generation.0.space.0.capacity))*100alignrightscalerawwidth6format"0.00"}column{header"^O^"/* Old Space - Percent Used */data(1-((sun.gc.generation.1.space.0.capacity-sun.gc.generation.1.space.0.used)/sun.gc.generation.1.space.0.capacity))*100alignrightscalerawwidth6format"0.00"}column{header"^M^"/* Metaspace Space - Percent Used */data(1-((sun.gc.metaspace.capacity-sun.gc.metaspace.used)/sun.gc.metaspace.capacity))*100alignrightwidth6scalerawformat"0.00"}column{header"^CCS^"/* Compressed Class Space Space - Percent Used */data(1-((sun.gc.compressedclassspace.capacity-sun.gc.compressedclassspace.used)/sun.gc.compressedclassspace.capacity))*100alignrightwidth6scalerawformat"0.00"}column{header"^YGC^"/* Young Generation Collections */datasun.gc.collector.0.invocationsalignrightwidth6format"0"}column{header"^YGCT^"/* Young Generation Collection Time */datasun.gc.collector.0.time/sun.os.hrt.frequencyalignrightscalesecwidth8format"0.000"}column{header"^FGC^"/* Full Collections */datasun.gc.collector.1.invocationsalignrightwidth5scalerawformat"0"}column{header"^FGCT^"/* Full Collection Time */datasun.gc.collector.1.time/sun.os.hrt.frequencyalignrightscalesecwidth8format"0.000"}column{header"^GCT^"/* Total Garbage Collection Time */data(sun.gc.collector.0.time+sun.gc.collector.1.time)/sun.os.hrt.frequencyalignrightwidth8scalesecformat"0.000"}}
if(PerfDisableSharedMem){// do not share the memory for the performance data._start=create_standard_memory(size);}else{_start=create_shared_memory(size);if(_start==NULL){// creation of the shared memory region failed, attempt// to create a contiguous, non-shared memory region instead.//if(PrintMiscellaneous&&Verbose){warning("Reverting to non-shared PerfMemory region.\n");}PerfDisableSharedMem=true;_start=create_standard_memory(size);}}
JDK8下metaspace的使用情况不准确,比如说CCSC的值表示的是 Compressed Class Space Capacity,但是发现这个值的计算却不是reserve的值,所以我们可能会发现metaspace其实用了非常少,但是通过jstat看起使用率已经非常大了,因此这种情况最好是通过jmx的方式去取那些值做一个计算