RFR: JDK-8319307: DCmds should not assert on truncation and should report truncation [v2]

David Holmes dholmes at openjdk.org
Tue Nov 28 23:02:05 UTC 2023


On Tue, 28 Nov 2023 09:27:55 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:

>> Okay, so it isn't clear to me that all of these situations are such that the caller is always a DCmd and that it always reports the truncation due to the attach code changes.
>
> But we also truncate today, we just don't tell anyone! All this code does is:
> - in some cases, where we truncated silently before, we now - equally silently - stop printing since its pointless to print to a full buffer
> - if we truncated while feeding a Dcmd, tell the end user.
> 
> Yes, there are more instances where we use bufferedStream, and there may be more instances where this buffer does not flush but silently truncates. Even after this PR. But this PR never claimed to fix those. What it does, beyond the immediate dcmd fix, is to offer a sensible way to sense truncation, and to act on it if desired.

Okay.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/16474#discussion_r1408517437


More information about the hotspot-runtime-dev mailing list