同步操作将从 唯品会/VJTools 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
VJMap is jmap with per GC generation (Eden, Survivor, OldGen) object stats printing. It is built with advanced techniques to disclose situations like memory leaks and fast-growing tenured objects.
You may print stats about objects with the stock jmap via jmap -histo PID
but only by viewing the heap as a whole.
However, additional information like OldGen object counting and survivor object age counting can play a vital
role in troubleshooting. VJMap is built to make such information available.
Initially inspired by tbjmap, JDK8 compatibility was added as well as query on aged survivor objects.
[Note]: Does not work with G1. Use it with CMS and ParallelGC only.
donload from Maven Central - 27k
[Important]: VJMap DOES cause stop-of-the-world of the target app. Make sure the target app is isolated from user access before you start using VJMap in production.
Run VJMap under the same user who started the target process. If access errors are still met, try again with root user.
VJMap may take quite some time to finish. Use kill <PID_OF_VJMap>
to allow for a graceful exit. If kill -9 <PID_OF_VJMap>
is mistakenly issued to the VJMap process, the target app will end up in blocked state, in which case you will have to
execute kill -18 <PID_OF_TARGET_APP>
TWICE to awaken the target app.
// Prints object stats of all the heap, ordered by their respective size in total.
./vjmap.sh -all PID > /tmp/histo.log
// Prints oldgen object stats, ordered by size in OldGen. Only CMS is supported for this option.
./vjmap.sh -old PID > /tmp/histo-old.log
// Prints survivor objects over the age of 3.
./vjmap.sh -sur PID > /tmp/histo-sur.log
// Prints survivor objects over the age of 10, as desinated by the argument -sur:minage=10
// When the promotion threshold -XX:MaxTenuringThreshold is lifted, objects with a high age value will be bound
for the CMS oldgen
./vjmap.sh -sur:minage=10 PID > /tmp/histo-sur.log
PID is the process ID of target java application
// Shows objects with sizes over 1KB over the whole heap
./vjmap.sh -all:minsize=1024 PID > /tmp/histo.log
// shows objects with sizes over 1KB in OldGen specifically
./vjmap.sh -old:minsize=1024 PID > /tmp/histo-old.log
// shows objects with sizes over 1KB in survivor space
./vjmap.sh -sur:minsize=1024 PID > /tmp/histo-sur.log
./vjmap.sh -all:minsize=1024,byname PID > /tmp/histo.log
./vjmap.sh -old:minsize=1024,byname PID > /tmp/histo-old.log
./vjmap.sh -sur:minsize=1024,byname PID > /tmp/histo-sur.log
Survivor Object Histogram:
#num #count #bytes #Class description
-----------------------------------------------------------------------------------
1: 37 1k io.netty.buffer.PoolThreadCache$MemoryRegionCache$Entry
2: 2 64 java.util.concurrent.locks.AbstractQueuedSynchronizer$Node
Total: 39/ 1k over age 2
Heap traversal took 1.3 seconds.
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。