我正在拼命地试图找到我的Eclipse的问题,以便在CPU加标(18-19核心,100%负载)引起的时刻(最多2-3秒)冻结。在尖峰期间没有任何作用,整个日食都没有反应。
因为我修改eclipse.ini
以使用适当的堆大小和垃圾收集器,所以生活变得更好。然而,冻结仍然存在。我使用jvisualvm
来排除垃圾收集器。正如您在下面的屏幕上看到的那样,CPU峰值和堆大小之间没有依赖关系。
您能否告诉我如何使用jvisualvm
或任何其他可用于Linux的工具来识别问题(CPU峰值)?
技术细节:
$ java -version
java version "1.7.0_65"
OpenJDK Runtime Environment (IcedTea 2.5.3) (7u71-2.5.3-0ubuntu0.12.04.1)
OpenJDK 64-Bit Server VM (build 24.65-b04, mixed mode)
$ cat /opt/eclipse/eclipse.ini
-startup
plugins/org.eclipse.equinox.launcher_1.3.0.v20130327-1440.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.200.v20140116-2212
-showsplash org.eclipse.platform
--launcher.defaultAction openFile
--launcher.appendVmargs
-vmargs
-Xss2M
-Xms3G
-server
-XX:MaxPermSize=2048M
-XX:+UnlockExperimentalVMOptions
-XX:+UseG1GC
-XX:G1HeapWastePercent=5
-XX:InitiatingHeapOccupancyPercent=83
-XX:MaxGCPauseMillis=500
完整线程转储here
最可疑的帖子:
"RJHelper [Thread-1]" daemon prio=10 tid=0x00007fe128009000 nid=0xe37a waiting for monitor entry [0x00007fe13f5f9000]
java.lang.Thread.State: BLOCKED (on object monitor)
at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:172)
- locked <0x00000003a4539c40> (a java.util.ArrayList)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:129)
at java.rmi.server.RemoteObjectInvocationHandler.invokeRemoteMethod(RemoteObjectInvocationHandler.java:194)
at java.rmi.server.RemoteObjectInvocationHandler.invoke(RemoteObjectInvocationHandler.java:148)
at com.sun.proxy.$Proxy16.runAsync(Unknown Source)
at de.walware.rj.server.client.AbstractRJComClient.runAsyncPing(AbstractRJComClient.java:754)
at de.walware.rj.server.client.AbstractRJComClient$KeepAliveRunnable.run(AbstractRJComClient.java:178)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:304)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:178)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Locked ownable synchronizers:
- <0x000000039a4ee240> (a java.util.concurrent.ThreadPoolExecutor$Worker)
答案 0 :(得分:1)
Jvisualvm还支持threaddumps甚至基于线程转储的分析,这可以帮助您快速识别正在发生的事情。