Questions tagged [jhat]

jHat refers to Java Heap Analysis Tool.

Definition:

jhat refers to Java Heap Analysis Tool.

It is a tool that can be run in the command line, with which the user can analyze a heap by browsing a binary heap dump file.

Example Usage:

jhat [ options ] <heap-dump-file>

Important Links:

33 questions
3
votes
2 answers

How to see program variable name and values in heap dump?

I am using JMAP to create a heap dump of JVM while executing a Java program. Then using JHAT I am opening the dump details in the browser. Now, I can see many details of the memory dump, but I don't know how to simply look at the program variable…
kajarigd
  • 1,299
  • 3
  • 28
  • 46
3
votes
2 answers

learning sites for fixing java memory leaks

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…
Geek
  • 23,089
  • 20
  • 71
  • 85
2
votes
1 answer

Why is usage of javascript within visualvm (jhat?) oql sometimes confusing?

I am interested in knowing why visualvm OQL has a problem with the following statement: select filter(heap.objects("java.util.HashMap"), isTrue(it)); function isTrue(object) { return true; } Exception is: javax.script.ScriptException:…
PineForest
  • 75
  • 1
  • 9
2
votes
3 answers

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

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…
raksja
  • 3,969
  • 5
  • 38
  • 44
2
votes
3 answers

Java heapdump analysis find source for the instantiated objects

I am analyzing a heap dump using a jvisualvm. From the report I can see the classes, number of instances and the size occipied. What I wanted to know is - the source (which class instantiated) of these objects. For a given object, if I could know…
VenKatari
  • 38
  • 4
1
vote
0 answers

What is the memory overhead for analyzing a heap with jhat?

jhat is a great tool for analyzing Java heap dumps, but for large heaps its easy to waste a lot of time. Give jhat a runtime heap too small, and it may take 15 minutes to fail and run out of memory. What I'd like to know is: is there is a rule of…
Adam Lehenbauer
  • 309
  • 4
  • 12
1
vote
0 answers

Java object memory footprint - what to believe ? jhat ? ClassLayout?

I have a simple java class "Tile" that declares 4 fields : two integers two objects (pointers) I'm trying to know what is the exact memory footprint of an instance of this class. Using the org.openjdk.jol.info.ClassLayout.parseInstance(obj)…
sr-01-01
  • 87
  • 1
  • 3
1
vote
2 answers

Using Jhat heap built-in object

Can anybody show an example of how to use heap.heapForEachClass in a select statement? It would be great if you could provide some links with different examples of queries (other than those in the oqlhelp page of course :) )
Eugen
  • 2,292
  • 3
  • 29
  • 43
1
vote
0 answers

jhat -baseline feature does not work with HeapDumpOnOutOfMemoryError and jcmd GC.heap_dump generated baseline

I have a sudden memory leak which occurs fairly instantaneously so I must catch the dump with HeapDumpOnOutOfMemoryError. But to see what really caused this massive memory spike I need to take a baseline first, and I use jcmd $pid GC.heap_dump…
Gunther Schadow
  • 1,490
  • 13
  • 22
1
vote
1 answer

Trouble with OQL 'unique' function of 'jhat' in Java 1.6.0_24

this is my first posted question. I have a fairly complicated OQL query which lists static fields of classes loaded in our packages. One problem I'm seeing with running the query against 'jhat' of Java 1.6.0_24 is that the 'unique' function doesn't…
karmakaze
  • 34,689
  • 1
  • 30
  • 32
1
vote
0 answers

Object returned from OQL query in jhat does not match query

Our team has a Java process running (on a 64-bit server OpenJDK 1.8.0_171-b10) in which some unexplainable things happen regarding the value of (boxed) Long objects. We have created a heap dump to analyse with jhat and here something really strange…
1
vote
1 answer

Is there any basic gc generation size and ratios for application in production

How much should be the initial size of the young generation? How much should be -XX:+NewRatio? -XX:+SurvivourRatio? What should be the ratio between perm and old generation.?
John
  • 2,682
  • 5
  • 23
  • 24
1
vote
0 answers

JHAT not able to analyze 40 gb dump file even after giving 70 GBs of heap size

I have requirement to analyze 40 GB of heap dump created by an application. I am using jhat, I have allocated 70 GBs of memory to JHAT to analyze the same but its still throwing java.lang.OutOfMemoryError: Java heap space Can anyone suggest a way…
Rogger296
  • 147
  • 3
  • 15
0
votes
2 answers

Can I set up profiles like jhat or jmap to take snapshots at regular intervals or whenever exception is detected

So basically in our case the server goes down mysteriously and we often restart it and it starts to work fine. Till now we haven't been able to establish a pattern. Looking at thread dump did help but we want to analyse memory usage too. Can these…
Smiles in a Jar
  • 479
  • 1
  • 6
  • 20
0
votes
1 answer

jhat OQL AND in where clause

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…
Fakrudeen
  • 5,778
  • 7
  • 44
  • 70