Forum Stats

  • 3,876,067 Users
  • 2,267,054 Discussions
  • 7,912,418 Comments

Discussions

stack traces for GC-related activity

sam.bishop
sam.bishop Member Posts: 5
edited Jan 4, 2018 4:55PM in Java Mission Control

What I am trying to do is figure out which part of my code is causing G1 GC pauses due to humongous allocations.  I would expect to find stack traces that were recorded when the pauses happened, but I don't see any stack traces related to GC activity.  (Even though there is a "Stack Trace" panel on the "Garbage Collections" and "VM Operations" tabs.)  Is that information available somewhere?

I am using JMC version 6.0.0 (M6.0.0-666, 173472).  The JVM version used to record the JFR files is "Java HotSpot(TM) 64-Bit Server VM (25.144-b01) for windows-amd64 JRE (1.8.0_144-b01), built on Jul 21 2017 21:57:33 by 'java_re' with MS VC++ 10.0 (VS2010)".  When I start a JFR session, I set the "Garbage Collector" setting to "All" on the Event Options page.  Let me know if there is any other information I can provide.

Best Answer

  • Greijus-Oracle
    Greijus-Oracle Member Posts: 4
    edited Jan 2, 2018 4:13AM Answer ✓

    I think you should be looking at the Memory page instead. You can select an area in the chart, where a GC of interest is happening, right-click that and choose "Store and Set As Focused Selection". That way, in the table above the chart, you will be able to see the allocations made during that time. Selecting one (or more) of those classes will then show you the stack trace(s) for the allocations.

    Hope this helps.

    /Erik

Answers

  • Greijus-Oracle
    Greijus-Oracle Member Posts: 4
    edited Jan 2, 2018 4:13AM Answer ✓

    I think you should be looking at the Memory page instead. You can select an area in the chart, where a GC of interest is happening, right-click that and choose "Store and Set As Focused Selection". That way, in the table above the chart, you will be able to see the allocations made during that time. Selecting one (or more) of those classes will then show you the stack trace(s) for the allocations.

    Hope this helps.

    /Erik

This discussion has been closed.