Skip to content

Commit ceba2f8

Browse files
committed
8255696: JDWP debug agent's canSuspendResumeThreadLists() should be removed
Reviewed-by: amenkov, sspitsyn
1 parent a250716 commit ceba2f8

File tree

3 files changed

+4
-33
lines changed

3 files changed

+4
-33
lines changed

src/jdk.jdwp.agent/share/native/libjdwp/threadControl.c

Lines changed: 4 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1516,22 +1516,9 @@ threadControl_suspendAll(void)
15161516
error = AGENT_ERROR_OUT_OF_MEMORY;
15171517
goto err;
15181518
}
1519-
if (canSuspendResumeThreadLists()) {
1520-
error = commonSuspendList(env, count, threads);
1521-
if (error != JVMTI_ERROR_NONE) {
1522-
goto err;
1523-
}
1524-
} else {
1525-
1526-
int i;
1527-
1528-
for (i = 0; i < count; i++) {
1529-
error = commonSuspend(env, threads[i], JNI_FALSE);
1530-
1531-
if (error != JVMTI_ERROR_NONE) {
1532-
goto err;
1533-
}
1534-
}
1519+
error = commonSuspendList(env, count, threads);
1520+
if (error != JVMTI_ERROR_NONE) {
1521+
goto err;
15351522
}
15361523

15371524
/*
@@ -1590,12 +1577,7 @@ threadControl_resumeAll(void)
15901577
* no need to get the whole thread list from JVMTI (unlike
15911578
* suspendAll).
15921579
*/
1593-
if (canSuspendResumeThreadLists()) {
1594-
error = commonResumeList(env);
1595-
} else {
1596-
error = enumerateOverThreadList(env, &runningThreads,
1597-
resumeHelper, NULL);
1598-
}
1580+
error = commonResumeList(env);
15991581
if ((error == JVMTI_ERROR_NONE) && (otherThreads.first != NULL)) {
16001582
error = enumerateOverThreadList(env, &otherThreads,
16011583
resumeHelper, NULL);

src/jdk.jdwp.agent/share/native/libjdwp/util.c

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -962,16 +962,6 @@ jvmtiMicroVersion(void)
962962
>> JVMTI_VERSION_SHIFT_MICRO;
963963
}
964964

965-
jboolean
966-
canSuspendResumeThreadLists(void)
967-
{
968-
jvmtiError error;
969-
jvmtiCapabilities cap;
970-
971-
error = jvmtiGetCapabilities(&cap);
972-
return (error == JVMTI_ERROR_NONE && cap.can_suspend);
973-
}
974-
975965
jvmtiError
976966
getSourceDebugExtension(jclass clazz, char **extensionPtr)
977967
{

src/jdk.jdwp.agent/share/native/libjdwp/util.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,6 @@ jint jvmtiMajorVersion(void);
337337
jint jvmtiMinorVersion(void);
338338
jint jvmtiMicroVersion(void);
339339
jvmtiError getSourceDebugExtension(jclass clazz, char **extensionPtr);
340-
jboolean canSuspendResumeThreadLists(void);
341340

342341
jrawMonitorID debugMonitorCreate(char *name);
343342
void debugMonitorEnter(jrawMonitorID theLock);

0 commit comments

Comments
 (0)