Skip to content

Commit 4c2663d

Browse files
async-profiler#1174: code cleanup & fix failure on macos due to thread_name length
1 parent ca560cb commit 4c2663d

File tree

3 files changed

+2
-3
lines changed

3 files changed

+2
-3
lines changed

src/vmEntry.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ static void* resolveMethodIdEnd() {
109109
// Work around for JDK-8308341, as JNI might return a none initialized VM so we check for the existence of certain VM threads
110110
// "VM Thread" and "Service Thread" in this case are used as indication that the VM is in a good enough state to be used
111111
bool VM::checkJvmThreads() {
112-
char thread_name[20];
112+
char thread_name[30];
113113
int thread_name_offset = 0;
114114
bool vm_thread = false, service_thread = false;
115115

test/one/profiler/test/Runner.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ private static Jvm detectJvm() {
9191
return Jvm.HOTSPOT;
9292
}
9393

94-
protected static int detectJvmVersion() {
94+
private static int detectJvmVersion() {
9595
String prop = System.getProperty("java.vm.specification.version");
9696
if (prop.startsWith("1.")) {
9797
prop = prop.substring(2);

test/test/nonjava/non_java_app.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,6 @@ void startJvm() {
121121
// Start JVM
122122
JavaVMInitArgs vm_args;
123123
JavaVMOption options[1];
124-
int pid = getpid();
125124

126125
options[0].optionString = const_cast<char*>("-Djava.class.path=build/test");
127126
//options[1].optionString = const_cast<char*>("-Xcheck:jni");

0 commit comments

Comments
 (0)