On Fri, 20 Nov 2026 09:14:46 GMT, Alan Bateman <[email protected]> wrote:
>>> As a much simpler alternative, do you think it would be worthwhile to just >>> document -XX:TieredStopAtLevel=1 in the java / javac man page, noting that >>> -J-XX:TieredStopAtLevel=1 can help speed up short-lived javac tool calls? >> >> This way, the LLM might be able to infer from the Java documentation that it >> should add the `-XX:TieredStopAtLevel=1` option when invoking the javac tool. > > @erifan Can you say if there was any previous discussion about this on the > OpenJDK mailing lists? I think there are several concerns with this proposal. > The heuristic seems very ad hoc. javac innovations are all over the map when > it comes to complexity and not clear that the compilation cost can be > represented by the total size of explicitly listed source files. There is > also the modularity concern as it couples the java launcher to javac in a way > that makes it hard to find and maintainer. The interesting thing, at least > in my view, is your use of source launcher beyond what JEP 330 might have > originally expected. Of the 375 projects, do they actually run like this or > is this benchmark just skipping their build tests. Hi @AlanBateman @lahodaj Thanks for the feedback. **About prior discussion**: No, I didn't discuss this in any mailing lists before—my mistake. The closest related thread is the [2016 jigsaw-dev discussion on -XX:TieredStopAtLevel=1 for jmod](https://mail.openjdk.org/pipermail/jigsaw-dev/2016-May/007593.html), which led to JDK-8155824. **JEP 330 / benchmark**: To clarify, this PR targeted the javac launcher, not the JEP 330 source-file launcher. In the 375-project benchmark, 186 were built with Maven originally and the other 189 were Maven Central artifacts, we compiled the sources directly with javac to derive a good threshold. **Build tools**: Even with build tools like Maven, many invocations (e.g. agent workflows) are still short-lived JVM processes where tiered compilation overhead matters. Of course, this PR doesn’t address cases where build tools are used, but the underlying issue still exists. Any way I agree the launcher heuristic isn't the right approach due to coupling and maintenance issues, so I've closed the PR. Any suggestions on how we should proceed with this issue?—discussing this on the mailing list first, or a small doc-only update to the java/javac man pages? As far as I can see, documenting `-XX:TieredStopAtLevel=1` for short-lived compilations seems like the most practical option for now, users and LLM agents may apply it if they see the suggestion. ------------- PR Comment: https://git.openjdk.org/jdk/pull/33991#issuecomment-7123365683
