AllocationRequiringGC stacktrace precision

Markus Gronlund markus.gronlund at oracle.com
Thu Jun 13 22:16:23 UTC 2019


Hi Milan,

Would you be able to create a small reproducer that demonstrates this behavior you are seeing?

It would help a lot.

Thanks in advance
Markus


-----Original Message-----
From: Milan Mimica <milan.mimica at gmail.com> 
Sent: den 13 juni 2019 21:33
To: hotspot-jfr-dev at openjdk.java.net
Subject: AllocationRequiringGC stacktrace precision

Hello List

I've been using JFR Java API to track allocations that are of interests to me. I'm focused on large allocations that trigger AllocationRequiringGC event. I came across this event I can't explain:

This is the top of the stack trace
(jdk.jfr.consumer.RecordedStackTrace#getFrames):
at java.lang.Integer#valueOf line: 1050

and jdk.jfr.consumer.RecordedObject#getValue("size") says it allocated about 8MB.

Happened using version 11.0.3, with G1.
This makes me wonder how reliable the stack-traces that come with events are? I've been looking at hotspot code and I would say that the java thread is blocked while waiting for allocation and it's safe to take a snapshot of its stack. I'm I missing something?


--
Milan Mimica


More information about the hotspot-jfr-dev mailing list