heap-dump

Programmatically analyze java heap dump file

丶灬走出姿态 提交于 2019-12-30 05:30:08
问题 I want to write a program (preferably in java) that will parse and analyze a java heap dump file (created by jmap). I know there are many great tools that already do so (jhat, eclipse's MAT, and so on), but I want to analyze the heap from a specific perspective to my application. Where can I read about the structure of the heap dump file, examples how to read it, and so on? Didn't find anything useful searching for it... Many thanks. 回答1: I'm not familiar with jhat, but Eclipse's MAT is open

MAT : Eclipse is not showing any running process

走远了吗. 提交于 2019-12-24 20:42:34
问题 I have installed MAT tool in my eclipse. I have tomcat running on eclipse but no process is showing this, how to I proceed to fix get this working. I have configured eclipse to use JDK ( in installed jre ) 回答1: I have clicked on configure and given JDK path and it worked 来源: https://stackoverflow.com/questions/38522401/mat-eclipse-is-not-showing-any-running-process

JMap.java - Timed out while attempting to connect to debug server - SwDbgSrv.exe

最后都变了- 提交于 2019-12-24 04:12:35
问题 I'm trying to run and debug the utilies from sun.jvm.hotspot.tools and sun.jvm.hotspot.utilities (like JMap.java) in order to understand better what is going on. Unfortunately I get stuck very early with the following error message and don't even get to debug a lot: Attaching to process ID 5144, please wait... Error attaching to process: Timed out while attempting to connect to debug server (please start SwDbgSrv.exe) It seems like for whatever reason the tools are trying to connect to a

JMap.java - Timed out while attempting to connect to debug server - SwDbgSrv.exe

孤街醉人 提交于 2019-12-24 04:12:22
问题 I'm trying to run and debug the utilies from sun.jvm.hotspot.tools and sun.jvm.hotspot.utilities (like JMap.java) in order to understand better what is going on. Unfortunately I get stuck very early with the following error message and don't even get to debug a lot: Attaching to process ID 5144, please wait... Error attaching to process: Timed out while attempting to connect to debug server (please start SwDbgSrv.exe) It seems like for whatever reason the tools are trying to connect to a

Why the Application and it's resources are being kept in the memory after exiting in Android?

时光总嘲笑我的痴心妄想 提交于 2019-12-23 17:48:02
问题 I have a simple Hello World application public class TestLeaksOnFinish extends Activity { static int ctr = 0; protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); TextView t = new TextView(this); t.setText("Hello World! "+ctr++); setContentView(t); } } When I run this multiple times, each time followed by pressing BACK, I see that ctr increases each time, indicating that the Activity is not killed completely after BACK. This is also confirmed by dumping the

How can I find the local variables in Heap file

柔情痞子 提交于 2019-12-23 08:50:50
问题 I have a j2ee application and monitoring it by visualVM. Lets say that I have a method like this: public void doStuff(int param) { String s = getStringVariable(param); StringBuilder sb = new StringBuilder(); //Do stuff with sb object } From the thread tap, I can see that some of my threads stuck in the above method. So I have generated a heap dump file to figure out what is s and sb contains. But how can I do that? I am using Eclipse Memory Analyzer. 回答1: you can get the local variable's from

Garbage Collector First and JMap EOF bug

时光怂恿深爱的人放手 提交于 2019-12-20 14:13:32
问题 We are working over our client's production server heap to detect and solve memory leaks. For this we are using jmap periodically to collect the necessary information. But last week we couldn't take the dump, because it triggered a EOF error and shutdown the Tomcat instance. I searched on the internet but couldn't find any concrete information about this error. We detected that it only occurs when using the Gc First garbage collector algorithm. This is the command line we used to perform the

High memory usage when using Hibernate

别来无恙 提交于 2019-12-18 11:35:43
问题 I code a server side application with java run on linux server. I use hibernate to open session to database, use native sql to query it and always close this session by try, catch, finally. My server query DB using hibernate with very high frequency. I already define MaxHeapSize for it is 3000M but it usually use 2.7GB on RAM, it can decrease but slower than increase. Sometime it grow up to 3.6GB memory usage, more than my MaxHeapSize define when start. When memory used is 3.6GB, i try to

How to convert a heap dump in android to eclipse format

半世苍凉 提交于 2019-12-18 11:29:08
问题 Im attempting to analyze a memory leak that has been driving me crazy for weeks, I found out about the eclipse MAT tool that helps you to figure out what is wrong, the problem is every single tutorial I have found says that I need to convert the format of the file from dalvik to HPROF format, however not one single tutorial I can find explains how to actually do it, instead I get vague things like this Now the file you will get does not conform to the "standard" Sun .hprof format but is

how to increase java heap memory permanently?

喜欢而已 提交于 2019-12-17 10:44:58
问题 I have one problem with java heap memory. I developed one client server application in java which is run as a windows service it requires more than 512MB of memory. I have 2GB of RAM but when I run my application it throws an exception Out of memory error:java heap space but I have already set heap size (maximum 512MB) in the java control panel and I still get the same error. I can't set heap size through the command line because my application runs as a windows service so how can I increase