[8u40]: RFR (backport): 8049599: MetaspaceGC::_capacity_until_GC can overflow

Mikael Gerdin mikael.gerdin at oracle.com
Fri Oct 10 13:41:13 UTC 2014


Hi Erik,

On 10/10/2014 12:05 PM, Erik Helin wrote:
> Hi all,
>
> the patch in jdk9/hs-gc/hotspot [0] did not apply cleanly to
> jdk8u/hs-dev/hotspot, the problem is the following part of the patch to
> whitebox.cpp (long lines truncated with ...):
>
> --- whitebox.cpp
> +++ whitebox.cpp
> @@ -986,16 +1013,18 @@ static JNINativeMethod methods[] = {
>     {CC"isInStringTable",    CC"(Ljava/lang/String;)Z", ...
>     {CC"fullGC",   CC"()V", (void*)&WB_FullGC },
>     {CC"youngGC",  CC"()V", (void*)&WB_YoungGC },
>     {CC"readReservedMemory", CC"()V", (void*)&WB_ReadReservedMemory },
>     {CC"allocateMetaspace", CC"(Ljava/lang/ClassLoader;J)J", ...
>     {CC"freeMetaspace", CC"(Ljava/lang/ClassLoader;JJ)V", ...
> +  {CC"incMetaspaceCapacityUntilGC", CC"(J)J", ...
> +  {CC"metaspaceCapacityUntilGC", CC"()J", ...
>     {CC"getCPUFeatures", CC"()Ljava/lang/String;" ...
>     {CC"getNMethod", CC"(Ljava/lang/reflect/Executable;Z) ...
>     {CC"getThreadStackSize", CC"()J", (void*)&WB_GetThreadStackSize },
>     {CC"getThreadRemainingStackSize", CC"()J, ...
> };
>
> The problem is that the last two whitebox functions,
> "getThreadStackSize" and "getThreadRemainingStackSize" has not been
> backported to jdk8u, so the patch fails to apply since the context is
> different.

Looks good.
/Mikael

>
> Webrev:
> - full: http://cr.openjdk.java.net/~ehelin/8049599/webrev.8u40/
> - diff between the two patches (very minor, just a context change):
>    http://cr.openjdk.java.net/~ehelin/8049599/webrev.8u40/diff.patch
>
> Thanks,
> Erik




More information about the hotspot-gc-dev mailing list