Skip to content

Commit da49fa5

Browse files
author
Alex Menkov
committed
8354460: Streaming output for attach API should be turned on by default
Reviewed-by: sspitsyn, kevinw
1 parent 704b599 commit da49fa5

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

src/hotspot/share/services/attachListener.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,8 +172,8 @@ volatile AttachListenerState AttachListener::_state = AL_NOT_INITIALIZED;
172172

173173
AttachAPIVersion AttachListener::_supported_version = ATTACH_API_V1;
174174

175-
// Default is false (if jdk.attach.vm.streaming property is not set).
176-
bool AttachListener::_default_streaming_output = false;
175+
// Default is true (if jdk.attach.vm.streaming property is not set).
176+
bool AttachListener::_default_streaming_output = true;
177177

178178
static bool get_bool_sys_prop(const char* name, bool default_value, TRAPS) {
179179
ResourceMark rm(THREAD);

src/jdk.attach/share/classes/sun/tools/attach/HotSpotVirtualMachine.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,8 @@ private static long pid() {
6363
static {
6464
String s = VM.getSavedProperty("jdk.attach.allowAttachSelf");
6565
ALLOW_ATTACH_SELF = "".equals(s) || Boolean.parseBoolean(s);
66-
// For now the default is false.
6766
String s2 = VM.getSavedProperty("jdk.attach.allowStreamingOutput");
68-
ALLOW_STREAMING_OUTPUT = "".equals(s2) || Boolean.parseBoolean(s2);
67+
ALLOW_STREAMING_OUTPUT = !("false".equals(s2));
6968
}
7069

7170
private final boolean selfAttach;

0 commit comments

Comments
 (0)