我想分析jetty的堆外內(nèi)存使用情況。所以我使用 gperftools 并將 env 添加到 jetty.sh:export LD_PRELOAD=/usr/local/lib/libtcmalloc.so# export HEAPPROFILE=/home/cccccc/perftools/mybin它工作正常[root@xxx ~]# lsof -n | grep tcmallocjava 23200 root mem REG 253,1 2350880 667001 /usr/local/lib/libtcmalloc.so.4.5.3java 23200 23203 root mem REG 253,1 2350880 667001 /usr/local/lib/libtcmalloc.so.4.5.3java 23200 23204 root mem REG 253,1 2350880 667001 /usr/local/lib/libtcmalloc.so.4.5.3java 23200 23205 root mem REG 253,1 2350880 667001 /usr/local/lib/libtcmalloc.so.4.5.3但是當(dāng)我注釋掉HEAPPROFILE并嘗試service jetty restart(start).登錄后Starting tracking the heapStarting tracking the heapStarting tracking the heapStarting tracking the heapStarting tracking the heapStarting tracking the heapStarting tracking the heapStarting tracking the heapStarting tracking the heapStarting tracking the heapStarting tracking the heapStarting tracking the heapStarting tracking the heapStarting tracking the heapStarting tracking the heapStarting tracking the heapDumping heap profile to /home/cccccc/perftools/mybin.0001.heap (Exiting, 0 bytes in use)Starting tracking the heapStarting tracking the heapStarting tracking the heapStarting tracking the heapStarting Jetty: Starting tracking the heapStarting tracking the heapStarting tracking the heapok Thu Sep 20 20:33:36 CST 2018它不干了。離我的范圍太遠(yuǎn)了。我使用gperftools-2.7with libunwind-1.2.1(在我使用libunwind-0.99-BETA相同的結(jié)果之前)??赡芎茈y解決。環(huán)境因素太多。
添加回答
舉報(bào)
0/150
提交
取消