From 569b59ac6d188b8b59c0f150ebbfb1b93df9ab25 Mon Sep 17 00:00:00 2001 From: Fabio Niephaus Date: Mon, 27 Feb 2023 13:30:28 +0100 Subject: [PATCH 1/3] Stop deleting `(Buddhist|JapaneseImperial)Calendar`. --- .../oracle/svm/core/jdk/CalendarSubstitutions.java | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/jdk/CalendarSubstitutions.java b/substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/jdk/CalendarSubstitutions.java index fc74067d63f5..cfa31cb71cdf 100644 --- a/substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/jdk/CalendarSubstitutions.java +++ b/substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/jdk/CalendarSubstitutions.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -29,7 +29,6 @@ import java.util.Locale; import java.util.TimeZone; -import com.oracle.svm.core.annotate.Delete; import com.oracle.svm.core.annotate.Substitute; import com.oracle.svm.core.annotate.TargetClass; import com.oracle.svm.core.util.VMError; @@ -74,16 +73,6 @@ final class Util_sun_util_calendar_CalendarSystem { static final CalendarSystem JULIAN = CalendarSystem.forName("julian"); } -@TargetClass(sun.util.BuddhistCalendar.class) -@Delete -final class Target_sun_util_BuddhistCalendar { -} - -@TargetClass(className = "java.util.JapaneseImperialCalendar") -@Delete -final class Target_java_util_JapaneseImperialCalendar { -} - /** Dummy class to have a class with the file's name. */ public final class CalendarSubstitutions { } From d4799e80ee7f34e2323da5a720473a54990626a7 Mon Sep 17 00:00:00 2001 From: Fabio Niephaus Date: Mon, 27 Feb 2023 13:31:18 +0100 Subject: [PATCH 2/3] Add `japanese` calendar for `CalendarSystem`. --- .../src/com/oracle/svm/core/jdk/CalendarSubstitutions.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/jdk/CalendarSubstitutions.java b/substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/jdk/CalendarSubstitutions.java index cfa31cb71cdf..b4956ba337eb 100644 --- a/substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/jdk/CalendarSubstitutions.java +++ b/substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/jdk/CalendarSubstitutions.java @@ -58,6 +58,8 @@ final class Target_sun_util_calendar_CalendarSystem { private static CalendarSystem forName(String calendarName) { if ("gregorian".equals(calendarName)) { return Util_sun_util_calendar_CalendarSystem.GREGORIAN; + } else if ("japanese".equals(calendarName)) { + return Util_sun_util_calendar_CalendarSystem.JAPANESE; } else if ("julian".equals(calendarName)) { return Util_sun_util_calendar_CalendarSystem.JULIAN; } else { @@ -70,6 +72,7 @@ final class Util_sun_util_calendar_CalendarSystem { // The static fields are initialized during native image generation. static final CalendarSystem GREGORIAN = CalendarSystem.forName("gregorian"); + static final CalendarSystem JAPANESE = CalendarSystem.forName("japanese"); static final CalendarSystem JULIAN = CalendarSystem.forName("julian"); } From e90ea84f0d347d7f05217b98750af075f50989bb Mon Sep 17 00:00:00 2001 From: Fabio Niephaus Date: Tue, 28 Feb 2023 17:26:37 +0100 Subject: [PATCH 3/3] Enable progress reporting for creation stage. --- docs/reference-manual/native-image/BuildOutput.md | 2 +- .../src/com/oracle/svm/hosted/ProgressReporter.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/reference-manual/native-image/BuildOutput.md b/docs/reference-manual/native-image/BuildOutput.md index 4402e7ef2903..22b450aadc00 100644 --- a/docs/reference-manual/native-image/BuildOutput.md +++ b/docs/reference-manual/native-image/BuildOutput.md @@ -37,7 +37,7 @@ GraalVM Native Image: Generating 'helloworld' (executable)... [5/8] Inlining methods... [***] (0.8s @ 0.99GB) [6/8] Compiling methods... [***] (6.4s @ 4.86GB) [7/8] Layouting methods... [**] (4.2s @ 3.98GB) -[8/8] Creating image... (4.0s @ 2.04GB) +[8/8] Creating image... [*] (4.0s @ 2.04GB) 4.52MB (22.97%) for code area: 7,470 compilation units 7.06MB (35.87%) for image heap: 101,764 objects and 5 resources 7.52MB (38.24%) for debug info generated in 1.8s diff --git a/substratevm/src/com.oracle.svm.hosted/src/com/oracle/svm/hosted/ProgressReporter.java b/substratevm/src/com.oracle.svm.hosted/src/com/oracle/svm/hosted/ProgressReporter.java index 501f24ddcd06..143f902374c6 100644 --- a/substratevm/src/com.oracle.svm.hosted/src/com/oracle/svm/hosted/ProgressReporter.java +++ b/substratevm/src/com.oracle.svm.hosted/src/com/oracle/svm/hosted/ProgressReporter.java @@ -150,7 +150,7 @@ private enum BuildStage { INLINING("Inlining methods", true, false), COMPILING("Compiling methods", true, true), LAYOUTING("Layouting methods", true, true), - CREATING("Creating image"); + CREATING("Creating image", true, true); private static final int NUM_STAGES = values().length;