how to bring jvm to safepoint
David.Holmes at oracle.com
Thu Jul 29 18:07:09 PDT 2010
I don't see anything obviously wrong with what you attempted. Can you
show the full stack dump from the error.
Tony Guan said the following on 07/30/10 07:29:
> Dear all,
> I want to invoke the GC at a certain time, for example, when a certain
> method is called at runtime, so I created a new subtype of
> VM_GC_Operation class, and initialized it with an object op, finally,
> executed using:VMThread::execute(&op)
> then I got the following error message:
> # Internal Error
> pid=29652, tid=1096460624
> # Error: Possible safepoint reached by thread that does not allow it
> The reason for the fail is that
> Thread::check_for_valid_safepoint_state() didn't pass because the
> currentThread is not a VMThread.
> My question is: how do I bring the current thread to a safepoint? or
> how do I call a GC operation properly? is there any prerequisite for
> doing so?
> Tony (Xiaohua Guan)
More information about the hotspot-runtime-dev