From 082cc0b915cb3e1825291260fe2b092d654fd448 Mon Sep 17 00:00:00 2001 From: Colin Alworth Date: Thu, 9 Apr 2026 08:18:36 -0500 Subject: [PATCH 1/5] rough draft --- .../google/gwt/dev/codeserver/CodeServer.java | 2 ++ dev/core/src/com/google/gwt/dev/About.java | 2 +- .../google/gwt/dev/CompilePermsServer.java | 2 ++ dev/core/src/com/google/gwt/dev/Compiler.java | 2 ++ dev/core/src/com/google/gwt/dev/DevMode.java | 2 ++ .../dev/util/log/perf/GwtStartupEvent.java | 32 +++++++++++++++++++ .../test/com/google/gwt/dev/AboutTest.java | 5 +++ user/src/com/google/gwt/junit/JUnitShell.java | 3 ++ 8 files changed, 49 insertions(+), 1 deletion(-) create mode 100644 dev/core/src/com/google/gwt/dev/util/log/perf/GwtStartupEvent.java diff --git a/dev/codeserver/java/com/google/gwt/dev/codeserver/CodeServer.java b/dev/codeserver/java/com/google/gwt/dev/codeserver/CodeServer.java index e46b49a532c..1f23fedd332 100644 --- a/dev/codeserver/java/com/google/gwt/dev/codeserver/CodeServer.java +++ b/dev/codeserver/java/com/google/gwt/dev/codeserver/CodeServer.java @@ -24,6 +24,7 @@ import com.google.gwt.dev.javac.UnitCacheSingleton; import com.google.gwt.dev.util.DiskCachingUtil; import com.google.gwt.dev.util.log.PrintWriterTreeLogger; +import com.google.gwt.dev.util.log.perf.GwtStartupEvent; import com.google.gwt.thirdparty.guava.common.collect.ImmutableMap; import java.io.File; @@ -51,6 +52,7 @@ public static void main(String[] args) throws Exception { if (!options.parseArgs(args)) { System.exit(1); } + new GwtStartupEvent(CodeServer.class, args); main(options); } diff --git a/dev/core/src/com/google/gwt/dev/About.java b/dev/core/src/com/google/gwt/dev/About.java index 6b70efd04d6..5b20043b11f 100644 --- a/dev/core/src/com/google/gwt/dev/About.java +++ b/dev/core/src/com/google/gwt/dev/About.java @@ -35,7 +35,7 @@ public class About { */ private static final String GWT_VERSION_TAG = "@GWT_" + "VERSION@"; - private static final String gwtName = "Google Web Toolkit"; + private static final String gwtName = "GWT Web Toolkit"; private static final String gwtGitRev; private static final GwtVersion gwtVersion; diff --git a/dev/core/src/com/google/gwt/dev/CompilePermsServer.java b/dev/core/src/com/google/gwt/dev/CompilePermsServer.java index fe7889fdb0e..fdf001db1ca 100644 --- a/dev/core/src/com/google/gwt/dev/CompilePermsServer.java +++ b/dev/core/src/com/google/gwt/dev/CompilePermsServer.java @@ -26,6 +26,7 @@ import com.google.gwt.dev.util.arg.ArgHandlerLogLevel; import com.google.gwt.dev.util.arg.OptionLogLevel; import com.google.gwt.dev.util.log.PrintWriterTreeLogger; +import com.google.gwt.dev.util.log.perf.GwtStartupEvent; import com.google.gwt.util.tools.ArgHandlerString; import java.io.File; @@ -234,6 +235,7 @@ public static void main(String[] args) { int exitCode = -1; final CompileServerOptions options = new CompileServerOptionsImpl(); if (new ArgProcessor(options).processArgs(args)) { + new GwtStartupEvent(CompilePermsServer.class, args); PrintWriterTreeLogger logger = new PrintWriterTreeLogger(); logger.setMaxDetail(options.getLogLevel()); if (run(options, logger)) { diff --git a/dev/core/src/com/google/gwt/dev/Compiler.java b/dev/core/src/com/google/gwt/dev/Compiler.java index d8fe2da8871..4ddd9b21631 100644 --- a/dev/core/src/com/google/gwt/dev/Compiler.java +++ b/dev/core/src/com/google/gwt/dev/Compiler.java @@ -35,6 +35,7 @@ import com.google.gwt.dev.util.arg.ArgHandlerWarDir; import com.google.gwt.dev.util.arg.ArgHandlerWorkDirOptional; import com.google.gwt.dev.util.arg.OptionOptimize; +import com.google.gwt.dev.util.log.perf.GwtStartupEvent; import com.google.gwt.dev.util.log.perf.SimpleEvent; import com.google.gwt.thirdparty.guava.common.collect.Sets; import com.google.gwt.thirdparty.guava.common.io.MoreFiles; @@ -101,6 +102,7 @@ public static void main(String[] args) { */ final CompilerOptions options = new CompilerOptionsImpl(); if (new ArgProcessor(options).processArgs(args)) { + new GwtStartupEvent(Compiler.class, args); CompileTask task = new CompileTask() { @Override public boolean run(TreeLogger logger) throws UnableToCompleteException { diff --git a/dev/core/src/com/google/gwt/dev/DevMode.java b/dev/core/src/com/google/gwt/dev/DevMode.java index db802d36d63..7c02af1eb53 100644 --- a/dev/core/src/com/google/gwt/dev/DevMode.java +++ b/dev/core/src/com/google/gwt/dev/DevMode.java @@ -46,6 +46,7 @@ import com.google.gwt.dev.util.arg.ArgHandlerWarDir; import com.google.gwt.dev.util.arg.ArgHandlerWorkDirOptional; import com.google.gwt.dev.util.arg.OptionModulePathPrefix; +import com.google.gwt.dev.util.log.perf.GwtStartupEvent; import com.google.gwt.dev.util.log.perf.SimpleEvent; import com.google.gwt.thirdparty.guava.common.io.MoreFiles; import com.google.gwt.thirdparty.guava.common.io.RecursiveDeleteOption; @@ -473,6 +474,7 @@ public static void main(String[] args) { */ DevMode hostedMode = new DevMode(); if (new ArgProcessor(hostedMode.options).processArgs(args)) { + new GwtStartupEvent(DevMode.class, args); hostedMode.run(); // Exit w/ success code. System.exit(0); diff --git a/dev/core/src/com/google/gwt/dev/util/log/perf/GwtStartupEvent.java b/dev/core/src/com/google/gwt/dev/util/log/perf/GwtStartupEvent.java new file mode 100644 index 00000000000..e77300a0152 --- /dev/null +++ b/dev/core/src/com/google/gwt/dev/util/log/perf/GwtStartupEvent.java @@ -0,0 +1,32 @@ +package com.google.gwt.dev.util.log.perf; + +import com.google.gwt.dev.About; +import jdk.jfr.Category; +import jdk.jfr.Description; +import jdk.jfr.Event; +import jdk.jfr.StackTrace; + +import java.util.Arrays; + +@Description("Basic startup info about the current GWT process") +@Category("GWT") +@StackTrace(false) +public class GwtStartupEvent extends Event { + @Description("GWT compiler version") + final String gwtVersion = About.getGwtVersion(); + + @Description("Git revision of the GWT compiler build") + final String gwtCommit = About.getGwtGitRev(); + + @Description("Class being invoked to start the compiler") + final String main; + + @Description("String created from options built from command line arguments and defaults") + final String options; + + public GwtStartupEvent(Class main, String... options) { + this.main = main.getCanonicalName(); + this.options = Arrays.toString(options); + commit(); + } +} diff --git a/dev/core/test/com/google/gwt/dev/AboutTest.java b/dev/core/test/com/google/gwt/dev/AboutTest.java index 52e33e5a3c9..05d18a1e3cf 100644 --- a/dev/core/test/com/google/gwt/dev/AboutTest.java +++ b/dev/core/test/com/google/gwt/dev/AboutTest.java @@ -32,6 +32,11 @@ public void testGwtSvnRev() { assertFalse(result.length() == 0); } + public void testGwtGitRev() { + String result = About.getGwtGitRev(); + assertFalse(result.length() == 0); + } + public void testGwtVersion() { String result = About.getGwtVersion(); assertFalse(result.length() == 0); diff --git a/user/src/com/google/gwt/junit/JUnitShell.java b/user/src/com/google/gwt/junit/JUnitShell.java index 842c1ad9794..cceb2e00e3c 100644 --- a/user/src/com/google/gwt/junit/JUnitShell.java +++ b/user/src/com/google/gwt/junit/JUnitShell.java @@ -63,6 +63,7 @@ import com.google.gwt.dev.util.arg.ArgHandlerStrict; import com.google.gwt.dev.util.arg.ArgHandlerWarDir; import com.google.gwt.dev.util.arg.ArgHandlerWorkDirOptional; +import com.google.gwt.dev.util.log.perf.GwtStartupEvent; import com.google.gwt.junit.JUnitMessageQueue.ClientStatus; import com.google.gwt.junit.client.GWTTestCase; import com.google.gwt.junit.client.TimeoutException; @@ -694,6 +695,8 @@ static JUnitShell getUnitTestShell() { if (!argProcessor.processArgs(args)) { throw new JUnitFatalLaunchException("Error processing shell arguments"); } + new GwtStartupEvent(JUnitShell.class, args); + // Always bind to the wildcard address and substitute the host address in // URLs. Note that connectAddress isn't actually used here, as we // override it from the runsStyle in getModuleUrl, but we set it to match From 7f4ba6dcededfb0b44ddda06e271a4627d67286c Mon Sep 17 00:00:00 2001 From: Colin Alworth Date: Wed, 22 Apr 2026 14:44:10 -0500 Subject: [PATCH 2/5] Remove args, fix style/output issues --- .../google/gwt/dev/codeserver/CodeServer.java | 2 +- .../google/gwt/dev/CompilePermsServer.java | 2 +- dev/core/src/com/google/gwt/dev/Compiler.java | 2 +- dev/core/src/com/google/gwt/dev/DevMode.java | 2 +- .../dev/util/log/perf/GwtStartupEvent.java | 32 +++++++++++++------ user/src/com/google/gwt/junit/JUnitShell.java | 2 +- 6 files changed, 28 insertions(+), 14 deletions(-) diff --git a/dev/codeserver/java/com/google/gwt/dev/codeserver/CodeServer.java b/dev/codeserver/java/com/google/gwt/dev/codeserver/CodeServer.java index 1f23fedd332..91db45b2099 100644 --- a/dev/codeserver/java/com/google/gwt/dev/codeserver/CodeServer.java +++ b/dev/codeserver/java/com/google/gwt/dev/codeserver/CodeServer.java @@ -52,7 +52,7 @@ public static void main(String[] args) throws Exception { if (!options.parseArgs(args)) { System.exit(1); } - new GwtStartupEvent(CodeServer.class, args); + new GwtStartupEvent(CodeServer.class); main(options); } diff --git a/dev/core/src/com/google/gwt/dev/CompilePermsServer.java b/dev/core/src/com/google/gwt/dev/CompilePermsServer.java index fdf001db1ca..bfcd54a711e 100644 --- a/dev/core/src/com/google/gwt/dev/CompilePermsServer.java +++ b/dev/core/src/com/google/gwt/dev/CompilePermsServer.java @@ -235,7 +235,7 @@ public static void main(String[] args) { int exitCode = -1; final CompileServerOptions options = new CompileServerOptionsImpl(); if (new ArgProcessor(options).processArgs(args)) { - new GwtStartupEvent(CompilePermsServer.class, args); + new GwtStartupEvent(CompilePermsServer.class); PrintWriterTreeLogger logger = new PrintWriterTreeLogger(); logger.setMaxDetail(options.getLogLevel()); if (run(options, logger)) { diff --git a/dev/core/src/com/google/gwt/dev/Compiler.java b/dev/core/src/com/google/gwt/dev/Compiler.java index 4ddd9b21631..4b1c9300fcc 100644 --- a/dev/core/src/com/google/gwt/dev/Compiler.java +++ b/dev/core/src/com/google/gwt/dev/Compiler.java @@ -102,7 +102,7 @@ public static void main(String[] args) { */ final CompilerOptions options = new CompilerOptionsImpl(); if (new ArgProcessor(options).processArgs(args)) { - new GwtStartupEvent(Compiler.class, args); + new GwtStartupEvent(Compiler.class); CompileTask task = new CompileTask() { @Override public boolean run(TreeLogger logger) throws UnableToCompleteException { diff --git a/dev/core/src/com/google/gwt/dev/DevMode.java b/dev/core/src/com/google/gwt/dev/DevMode.java index 7c02af1eb53..3134cc41d4b 100644 --- a/dev/core/src/com/google/gwt/dev/DevMode.java +++ b/dev/core/src/com/google/gwt/dev/DevMode.java @@ -474,7 +474,7 @@ public static void main(String[] args) { */ DevMode hostedMode = new DevMode(); if (new ArgProcessor(hostedMode.options).processArgs(args)) { - new GwtStartupEvent(DevMode.class, args); + new GwtStartupEvent(DevMode.class); hostedMode.run(); // Exit w/ success code. System.exit(0); diff --git a/dev/core/src/com/google/gwt/dev/util/log/perf/GwtStartupEvent.java b/dev/core/src/com/google/gwt/dev/util/log/perf/GwtStartupEvent.java index e77300a0152..660644d9f53 100644 --- a/dev/core/src/com/google/gwt/dev/util/log/perf/GwtStartupEvent.java +++ b/dev/core/src/com/google/gwt/dev/util/log/perf/GwtStartupEvent.java @@ -1,13 +1,31 @@ +/* + * Copyright 2026 GWT Project Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ package com.google.gwt.dev.util.log.perf; import com.google.gwt.dev.About; import jdk.jfr.Category; import jdk.jfr.Description; import jdk.jfr.Event; +import jdk.jfr.Name; import jdk.jfr.StackTrace; -import java.util.Arrays; - +/** + * Logs the class that was used to run GWT and the GWT build in use. + */ +@Name("gwt.Startup") @Description("Basic startup info about the current GWT process") @Category("GWT") @StackTrace(false) @@ -19,14 +37,10 @@ public class GwtStartupEvent extends Event { final String gwtCommit = About.getGwtGitRev(); @Description("Class being invoked to start the compiler") - final String main; - - @Description("String created from options built from command line arguments and defaults") - final String options; + final Class main; - public GwtStartupEvent(Class main, String... options) { - this.main = main.getCanonicalName(); - this.options = Arrays.toString(options); + public GwtStartupEvent(Class main) { + this.main = main; commit(); } } diff --git a/user/src/com/google/gwt/junit/JUnitShell.java b/user/src/com/google/gwt/junit/JUnitShell.java index cceb2e00e3c..bf79cccabca 100644 --- a/user/src/com/google/gwt/junit/JUnitShell.java +++ b/user/src/com/google/gwt/junit/JUnitShell.java @@ -695,7 +695,7 @@ static JUnitShell getUnitTestShell() { if (!argProcessor.processArgs(args)) { throw new JUnitFatalLaunchException("Error processing shell arguments"); } - new GwtStartupEvent(JUnitShell.class, args); + new GwtStartupEvent(JUnitShell.class); // Always bind to the wildcard address and substitute the host address in // URLs. Note that connectAddress isn't actually used here, as we From 4acd1f4481862943929b2e884d0e916617571f2d Mon Sep 17 00:00:00 2001 From: Colin Alworth Date: Wed, 22 Apr 2026 15:45:05 -0500 Subject: [PATCH 3/5] Update dev/core/src/com/google/gwt/dev/About.java Co-authored-by: Zbynek Konecny --- dev/core/src/com/google/gwt/dev/About.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev/core/src/com/google/gwt/dev/About.java b/dev/core/src/com/google/gwt/dev/About.java index 5b20043b11f..ce9f4ca7f1f 100644 --- a/dev/core/src/com/google/gwt/dev/About.java +++ b/dev/core/src/com/google/gwt/dev/About.java @@ -24,7 +24,7 @@ */ public class About { /** - * Tag used for text replacement of the SVN version (split up to avoid + * Tag used for text replacement of the Git version (split up to avoid * replacing it here). */ private static final String GWT_GITREV_TAG = "@GWT_" + "GITREV@"; From 90f67d8b7468e9fce8ebd427da02205e1603d995 Mon Sep 17 00:00:00 2001 From: Colin Alworth Date: Wed, 29 Apr 2026 08:21:37 -0500 Subject: [PATCH 4/5] checkstyle --- .../src/com/google/gwt/dev/util/log/perf/GwtStartupEvent.java | 1 + 1 file changed, 1 insertion(+) diff --git a/dev/core/src/com/google/gwt/dev/util/log/perf/GwtStartupEvent.java b/dev/core/src/com/google/gwt/dev/util/log/perf/GwtStartupEvent.java index 660644d9f53..bbaed7fc5bc 100644 --- a/dev/core/src/com/google/gwt/dev/util/log/perf/GwtStartupEvent.java +++ b/dev/core/src/com/google/gwt/dev/util/log/perf/GwtStartupEvent.java @@ -16,6 +16,7 @@ package com.google.gwt.dev.util.log.perf; import com.google.gwt.dev.About; + import jdk.jfr.Category; import jdk.jfr.Description; import jdk.jfr.Event; From 427695d292f9d13c7f971881ef54d24d3440f474 Mon Sep 17 00:00:00 2001 From: Colin Alworth Date: Sat, 2 May 2026 20:22:55 -0500 Subject: [PATCH 5/5] Correct test to refer to GWT --- dev/core/test/com/google/gwt/dev/AboutTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev/core/test/com/google/gwt/dev/AboutTest.java b/dev/core/test/com/google/gwt/dev/AboutTest.java index 05d18a1e3cf..66eb094e198 100644 --- a/dev/core/test/com/google/gwt/dev/AboutTest.java +++ b/dev/core/test/com/google/gwt/dev/AboutTest.java @@ -24,7 +24,7 @@ public class AboutTest extends TestCase { public void testGwtName() { String result = About.getGwtName(); - assertTrue("Google Web Toolkit".equals(result)); + assertTrue("GWT Web Toolkit".equals(result)); } public void testGwtSvnRev() {