RFR: 8292016: Rework JLI_ReportErrorMessageSys [v10]

Thomas Stuefe stuefe at openjdk.org
Thu Aug 18 13:26:07 UTC 2022


On Thu, 18 Aug 2022 11:23:00 GMT, Julian Waters <jwaters at openjdk.org> wrote:

> I don't quite get what you mean?

The only thing JLI_ReportErrorMessageSys has above JLI_ReportErrorMessage is that it prints the error code for you, and that is a very slim win. It turns into a loss quickly if it does that one thing wrong, e.g. by printing unrelated error codes that confuse the analyst. And if that causes us and you to burn cycles with this discussion that could be spent much better elsewhere.

Therefore, what I meant to suggest is to fix whatever you originally wanted to fix with your original JBS issue https://bugs.openjdk.org/browse/JDK-8291917 by calling JLI_ReportErrorMessage directly.

e.g. 

p = VirtualAlloc(...) or whatever win32 API you want to cover
if (p == NULL) {
  JLI_ReportErrorMessage("Failed to allocate xxx (%u)", GetLastError());
}

-------------

PR: https://git.openjdk.org/jdk/pull/9870


More information about the hotspot-dev mailing list