[13] RFR(M): 8163511: Allocation of compile task fails with assert: "Leaking compilation tasks?"

Tobias Hartmann tobias.hartmann at oracle.com
Wed Mar 6 10:44:28 UTC 2019


Hi Coleen,

thanks for the review!

On 27.02.19 17:25, coleen.phillimore at oracle.com wrote:
> Nit, can you use // comments.

Sure, I was just using /* */ comments in compileTask.cpp to adapt to existing code. Fixed it.

> Also, there should be a HandleMark here.

There already is a HandleMark in the compiler thread loop:
http://hg.openjdk.java.net/jdk/jdk/file/8b341d6728fe/src/hotspot/share/compiler/compileBroker.cpp#l1774

Do you want me to add another one to CompileTask::select_for_compilation()?

> I think this method also needs to check for is_unloading() before touching method().
> 
> // RedefineClasses support
> void CompileTask::metadata_do(void f(Metadata*)) {
>   f(method());
>   if (hot_method() != NULL && hot_method() != method()) {
>     f(hot_method());
>   }
> }

Right, fixed it. I've also added an assert to CompileTask::mark_on_stack().

New webrev:
http://cr.openjdk.java.net/~thartmann/8163511/webrev.02

> This change makes sense to me.  It would be nice if these were in VM mode, if you could use
> WeakHandles instead of JNI, but you would need your own weak handle area.  For future consideration,
> anyway.

Yes, I think that cleanup is out of the scope of this fix.

Thanks,
Tobias


More information about the hotspot-dev mailing list