jhat

jhat OQL AND in where clause

你离开我真会死。 提交于 2019-12-25 05:16:22
问题 How to do a conjunction [AND] in jhat OQL where clause? I want do this: select s from sun.security.x509.X500Name s where s.canonicalDn !=null and /tiberium/(s.canonicalDn.toString()) That is- I want to find all X500Names containing appTrust in their canonicaldn. I need the null check as some of canonicaldn can be null [and jhat throws a null pointer exception in that case at toString]. But literal "and" doesn't work. BTW, I got around this for my purpose using filter function: select filter

How to find memory leaks in my Java application

江枫思渺然 提交于 2019-12-22 10:27:43
问题 This is a follow-up question from my previous question HERE. I was witnessing memory leaks in my Java application. Initially, I was thinking that the leak is coming from the Server component of my application. But as per other's suggestion, it wasn't. I used a tool to dump the heap memory and visualize it with JProfiler . Apparently it is due to my suspected HashMaps . But I'm not sure as I'm not familiar how to interpret the dump. Here is a brief snippet of my application's structure (it is

Why doesn't the -baseline option of jhat work?

℡╲_俬逩灬. 提交于 2019-12-10 16:01:34
问题 How come every object appears to be marked new, instead of just objects that are in the second snapshot but not in my baseline snapshot? Looking around online, I see some suggestions that I need to use hprof instead of jmap to make my memory dumps, but it appears that hprof generates dumps in exactly the same format. This is JDK 1.6.0_14; I have tried on both Windows and UNIX. 回答1: jhat -baseline indeed won't work with dumps produced by jmap . I'm not certain, but I believe this is because

How to find a Java Memory Leak

吃可爱长大的小学妹 提交于 2019-12-10 12:02:22
问题 How do you find a memory leak in Java (using, for example, JHat)? I have tried to load the heap dump up in JHat to take a basic look. However, I do not understand how I am supposed to be able to find the root reference (ref) or whatever it is called. Basically, I can tell that there are several hundred megabytes of hash table entries ([java.util.HashMap$Entry or something like that), but maps are used all over the place... Is there some way to search for large maps, or perhaps find general

learning sites for fixing java memory leaks

笑着哭i 提交于 2019-12-07 14:49:50
问题 What would be the best places to learn fixing a java memory leak ? I have been trying to find good resource over the NET but to my disappointment, I find toy examples being discussed. I am also able to troubleshoot small toy dumps but the real world application dumps are more challenging and give little clue. I have tried tools like Jhat, JMap, VisualVM and MAT. what would be the best place to learn about fixing Java memory leaks ? suggestion of a book is also welcome. thanks in advance. 回答1:

Mat can't open the dump file

被刻印的时光 ゝ 提交于 2019-12-07 11:55:24
问题 My jmap command is sudo -u flume /usr/java/jdk1.8.0_60/bin/jmap -F -dump:format=b,file=heap.hprof pid , But eclips mat can't open the dump file,and throw an exception. java.lang.NullPointerException at org.eclipse.mat.hprof.HprofParserHandlerImpl.resolveClassHierarchy(HprofParserHandlerImpl.java:587) at org.eclipse.mat.hprof.Pass2Parser.readInstanceDump(Pass2Parser.java:205) at org.eclipse.mat.hprof.Pass2Parser.readDumpSegments(Pass2Parser.java:159) at org.eclipse.mat.hprof.Pass2Parser.read

learning sites for fixing java memory leaks

橙三吉。 提交于 2019-12-05 19:08:28
What would be the best places to learn fixing a java memory leak ? I have been trying to find good resource over the NET but to my disappointment, I find toy examples being discussed. I am also able to troubleshoot small toy dumps but the real world application dumps are more challenging and give little clue. I have tried tools like Jhat, JMap, VisualVM and MAT. what would be the best place to learn about fixing Java memory leaks ? suggestion of a book is also welcome. thanks in advance. Have you tried searching the internet ? There are many examples . A good search engine will sort them by

Huge heap dump (11GB) - Jhat failed & Eclipse MAT needed help

馋奶兔 提交于 2019-12-02 13:12:02
问题 We got a memory error in our EA and we used -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/path/to/some/dir to dump the heap at the time of OOM. We had a heap memory of 12GB and perm gen of 256MB. The heap dump is generated in the Linux box where we have our application running and its size is 11.5GB. We don't have privileges to download it to our local. When we tried to analyze that 11GB heap dump using JHAT it thrown an OOM. We tried the following commands from our Linux CLI. jhat java

Huge heap dump (11GB) - Jhat failed & Eclipse MAT needed help

二次信任 提交于 2019-12-02 06:09:27
We got a memory error in our EA and we used -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/path/to/some/dir to dump the heap at the time of OOM. We had a heap memory of 12GB and perm gen of 256MB. The heap dump is generated in the Linux box where we have our application running and its size is 11.5GB. We don't have privileges to download it to our local. When we tried to analyze that 11GB heap dump using JHAT it thrown an OOM. We tried the following commands from our Linux CLI. jhat java_pid1491.hprof jhat -J-Xmx16g -XX:-UseBiasedLocking java_pid1491.hprof jhat -J-d64 -J-Xmx16g -J-XX:

What does the class class [B represents in Java?

随声附和 提交于 2019-11-29 21:14:04
I am trying out a tool jhat here to test my java memory usage. It reads in a heap dump file and prints out information as html. However, the tables shows as follows: Class Instance Count Total Size class [B 36585 49323821 class [Lcom.sun.mail.imap.IMAPMessage; 790 16254336 class [C 124512 12832896 class [I 23080 11923504 class [Ljava.lang.Object; 13614 6664528 class java.lang.String 108982 2179640 class java.lang.Integer 219502 878008 What are those [B [C etc classes? Aaron Digulla Those are arrays of primitives ( [B == byte[] , [C == char , [I == int ). [Lx; is an array of class type x . For