我想分析jetty的堆外内存使用情况。所以我使用 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但是当我注释掉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它不干了。离我的范围太远了。我使用gperftools-2.7with libunwind-1.2.1(在我使用libunwind-0.99-BETA相同的结果之前)。可能很难解决。环境因素太多。
添加回答
举报
0/150
提交
取消