src/hotspot/share/services/dtraceAttacher.cpp
changeset 57876 30db6422848b
parent 55479 80b27dc96ca3
child 58226 408c445d04e8
--- a/src/hotspot/share/services/dtraceAttacher.cpp	Mon Aug 26 09:13:38 2019 +0200
+++ b/src/hotspot/share/services/dtraceAttacher.cpp	Mon Aug 26 09:15:43 2019 +0200
@@ -50,9 +50,9 @@
   }
 };
 
-static void set_bool_flag(const char* flag, bool value) {
-  JVMFlag::boolAtPut((char*)flag, strlen(flag), &value,
-                              JVMFlag::ATTACH_ON_DEMAND);
+static void set_bool_flag(const char* name, bool value) {
+  JVMFlag* flag = JVMFlag::find_flag(name);
+  JVMFlag::boolAtPut(flag, &value, JVMFlag::ATTACH_ON_DEMAND);
 }
 
 // Enable only the "fine grained" flags. Do *not* touch