Skip to content
Permalink
Browse files
Get rid of outer WITH_LOCAL_REFS/END_WITH_LOCAL_REFS blocks and filed…
… JDK-8262494 to do this correctly in the jdk repo someday.
  • Loading branch information
plummercj committed Feb 27, 2021
1 parent bcc3993 commit f29945b6a39eb4446a075a6cf6c91af93dd7d496
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 21 deletions.
@@ -83,7 +83,6 @@ debugLoop_run(void)
jboolean shouldListen;
jdwpPacket p;
jvmtiStartFunction func;
JNIEnv *env = getEnv();

/* Initialize all statics */
/* We may be starting a new connection after an error */
@@ -158,15 +157,8 @@ debugLoop_run(void)
*/
outStream_setError(&out, JDWP_ERROR(VM_DEAD));
} else {
/* Provide 64 localrefs by default. */
/* vthread fixme: Now that this default set of localrefs is in place, we can remove a
* bunch of WITH_LOCAL_REFS/END_WITH_LOCAL_REFS blocks. The only ones needed are
* ones that could potentially go over 64, likes ones within loops. Note this only
* refers to command handlers called from here, not all uses of WITH_LOCAL_REFS. */
WITH_LOCAL_REFS(env, 64) {
/* Call the command handler */
replyToSender = func(&in, &out);
} END_WITH_LOCAL_REFS(env);
/* Call the command handler */
replyToSender = func(&in, &out);
}

/* Reply to the sender */
@@ -675,7 +675,7 @@ filterAndAddVThread(JNIEnv *env, EventInfo *evinfo, EventIndex ei, jbyte eventSe
* consumes the event.
*/
static void
event_callback_helper(JNIEnv *env, EventInfo *evinfo)
event_callback(JNIEnv *env, EventInfo *evinfo)
{
struct bag *eventBag;
jbyte eventSessionID = currentSessionID; /* session could change */
@@ -828,16 +828,6 @@ event_callback_helper(JNIEnv *env, EventInfo *evinfo)
}
}

static void
event_callback(JNIEnv *env, EventInfo *evinfo)
{
/* vthread fixme: There are a bunch of WITH_LOCAL_REFS that we can remove now that
* we are doing one here. */
WITH_LOCAL_REFS(env, 64) {
event_callback_helper(env, evinfo);
} END_WITH_LOCAL_REFS(env);
}

/* Returns a local ref to the declaring class for an object. */
static jclass
getObjectClass(jobject object)

0 comments on commit f29945b

Please sign in to comment.