Home | History | Annotate | Download | only in back

Lines Matching refs:command

33  * Event helper thread command commandKinds
41 * Event helper thread command singleKinds
133 commandSize(HelperCommand *command)
136 if (command->commandKind == COMMAND_REPORT_EVENT_COMPOSITE) {
138 * One event is accounted for in the Helper Command. If there are
143 (command->u.reportEventComposite.eventCount - 1));
149 freeCommand(HelperCommand *command)
151 if ( command == NULL )
153 jvmtiDeallocate(command);
157 enqueueCommand(HelperCommand *command,
162 jint size = commandSize(command);
164 command->done = JNI_FALSE;
165 command->waiting = wait;
166 command->next = NULL;
180 queue->head = command;
182 queue->tail->next = command;
184 queue->tail = command;
195 while (!command->done) {
199 freeCommand(command);
205 completeCommand(HelperCommand *command)
207 if (command->waiting) {
209 command->done = JNI_TRUE;
214 freeCommand(command);
221 HelperCommand *command = NULL;
227 while (command == NULL) {
233 command = queue->head;
234 queue->head = command->next;
235 if (queue->tail == command) {
239 log_debugee_location("dequeueCommand(): command being dequeued", NULL, NULL, 0);
241 size = commandSize(command);
246 if (gdata->vmDead || command->sessionID != currentSessionID) {
247 log_debugee_location("dequeueCommand(): command session removal", NULL, NULL, 0);
248 completeCommand(command);
249 command = NULL;
261 return command;
365 /* This runs in a command loop and this thread may not return to java.
404 EventCommandSingle *command)
406 EventInfo *evinfo = &command->info;
409 (void)outStream_writeInt(out, command->id);
453 UnloadCommandSingle *command)
456 (void)outStream_writeInt(out, command->id);
457 (void)outStream_writeString(out, command->classSignature);
458 jvmtiDeallocate(command->classSignature);
459 command->classSignature = NULL;
464 FrameEventCommandSingle *command)
466 if (command->typeKey) {
469 (void)outStream_writeByte(out, eventIndex2jdwp(command->ei));
471 (void)outStream_writeInt(out, command->id);
472 (void)outStream_writeObjectRef(env, out, command->thread);
473 writeCodeLocation(out, command->clazz, command->method, command->location);
474 if (command->typeKey) {
475 (void)outStream_writeValue(env, out, command->typeKey, command->returnValue);
476 if (isObjectTag(command->typeKey) &&
477 command->returnValue.l != NULL) {
478 tossGlobalRef(env, &(command->returnValue.l));
481 tossGlobalRef(env, &(command->thread));
482 tossGlobalRef(env, &(command->clazz));
560 handleReportInvokeDoneCommand(JNIEnv* env, ReportInvokeDoneCommand *command)
562 invoker_completeInvokeRequest(command->thread);
563 tossGlobalRef(env, &(command->thread));
567 handleReportVMInitCommand(JNIEnv* env, ReportVMInitCommand *command)
571 if (command->suspendPolicy == JDWP_SUSPEND_POLICY(ALL)) {
573 } else if (command->suspendPolicy == JDWP_SUSPEND_POLICY(EVENT_THREAD)) {
574 (void)threadControl_suspendThread(command->thread, JNI_FALSE);
580 (void)outStream_writeByte(&out, command->suspendPolicy);
585 (void)outStream_writeObjectRef(env, &out, command->thread);
589 /* Why aren't we tossing this: tossGlobalRef(env, &(command->thread)); */
593 handleSuspendThreadCommand(JNIEnv* env, SuspendThreadCommand *command)
599 (void)threadControl_suspendThread(command->thread, JNI_TRUE);
600 tossGlobalRef(env, &(command->thread));
604 handleCommand(JNIEnv *env, HelperCommand *command)
606 switch (command->commandKind) {
609 &command->u.reportEventComposite);
612 handleReportInvokeDoneCommand(env, &command->u.reportInvokeDone);
615 handleReportVMInitCommand(env, &command->u.reportVMInit);
618 handleSuspendThreadCommand(env, &command->u.suspendThread);
621 EXIT_ERROR(AGENT_ERROR_INVALID_EVENT_TYPE,"Event Helper Command");
631 * into the command queue. For the Classic VM, this was a reasonable
657 * If the command that we are about to execute has a suspend-all
693 LOG_MISC(("Begin command loop thread"));
696 HelperCommand *command = dequeueCommand();
697 if (command != NULL) {
702 jboolean doBlock = needBlockCommandLoop(command);
703 log_debugee_location("commandLoop(): command being handled", NULL, NULL, 0);
704 handleCommand(jni_env, command);
705 completeCommand(command);
889 CommandSingle *command = cv;
893 switch(command->singleKind) {
895 thisPolicy = command->u.eventCommand.suspendPolicy;
898 thisPolicy = command->u.frameEventCommand.suspendPolicy;
924 CommandSingle *command = cv;
927 if (command->singleKind == COMMAND_SINGLE_EVENT) {
928 if (command->u.eventCommand.info.ei == EI_VM_DEATH) {
942 enumForCopyingSingles(void *command, void *tv)
946 command,
960 HelperCommand *command;
973 command = jvmtiAllocate(command_size);
974 (void)memset(command, 0, command_size);
975 command->commandKind = COMMAND_REPORT_EVENT_COMPOSITE;
976 command->sessionID = sessionID;
977 recc = &command->u.reportEventComposite;
991 enqueueCommand(command, wait, reportingVMDeath);
1000 CommandSingle *command = bagAdd(eventBag);
1001 if (command == NULL) {
1005 command->singleKind = COMMAND_SINGLE_EVENT;
1006 command->u.eventCommand.suspendPolicy = suspendPolicy;
1007 command->u.eventCommand.id = id;
1010 * Copy the event into the command so that it can be used
1013 command->u.eventCommand.info, evinfo, sizeof(*evinfo));
1014 saveEventInfoRefs(env, &command->u.eventCommand.info);
1020 CommandSingle *command = bagAdd(eventBag);
1021 if (command == NULL) {
1024 command->singleKind = COMMAND_SINGLE_UNLOAD;
1025 command->u.unloadCommand.id = id;
1026 command->u.unloadCommand.classSignature = signature;
1039 CommandSingle *command = bagAdd(eventBag);
1041 if (command == NULL) {
1045 command->singleKind = COMMAND_SINGLE_FRAME_EVENT;
1046 frameCommand = &command->u.frameEventCommand;
1080 HelperCommand *command = jvmtiAllocate(sizeof(*command));
1081 if (command == NULL) {
1084 (void)memset(command, 0, sizeof(*command));
1085 command->commandKind = COMMAND_REPORT_INVOKE_DONE;
1086 command->sessionID = sessionID;
1087 saveGlobalRef(env, thread, &(command->u.reportInvokeDone.thread));
1088 enqueueCommand(command, JNI_TRUE, JNI_FALSE);
1098 HelperCommand *command = jvmtiAllocate(sizeof(*command));
1099 if (command == NULL) {
1102 (void)memset(command, 0, sizeof(*command));
1103 command->commandKind = COMMAND_REPORT_VM_INIT;
1104 command->sessionID = sessionID;
1105 saveGlobalRef(env, thread, &(command->u.reportVMInit.thread));
1106 command->u.reportVMInit.suspendPolicy = suspendPolicy;
1107 enqueueCommand(command, JNI_TRUE, JNI_FALSE);
1114 HelperCommand *command = jvmtiAllocate(sizeof(*command));
1115 if (command == NULL) {
1118 (void)memset(command, 0, sizeof(*command));
1119 command->commandKind = COMMAND_SUSPEND_THREAD;
1120 command->sessionID = sessionID;
1121 saveGlobalRef(env, thread, &(command->u.suspendThread.thread));
1122 enqueueCommand(command, JNI_TRUE, JNI_FALSE);