• Home
  • Raw
  • Download

Lines Matching full:request

102 createGlobalRefs(JNIEnv *env, InvokeRequest *request)  in createGlobalRefs()  argument
115 if ( request->argumentCount > 0 ) { in createGlobalRefs()
117 argRefs = jvmtiAllocate((jint)(request->argumentCount*sizeof(jobject))); in createGlobalRefs()
122 (void)memset(argRefs, 0, request->argumentCount*sizeof(jobject)); in createGlobalRefs()
127 saveGlobalRef(env, request->clazz, &clazz); in createGlobalRefs()
133 if ( error == JVMTI_ERROR_NONE && request->instance != NULL ) { in createGlobalRefs()
134 saveGlobalRef(env, request->instance, &instance); in createGlobalRefs()
142 argumentTag = firstArgumentTypeTag(request->methodSignature, &cursor); in createGlobalRefs()
143 argument = request->arguments; in createGlobalRefs()
145 if ( argIndex > request->argumentCount ) { in createGlobalRefs()
167 if ( error == JVMTI_ERROR_NONE && argIndex != request->argumentCount ) { in createGlobalRefs()
172 /* Finally, put the global refs into the request if no errors */ in createGlobalRefs()
174 request->clazz = clazz; in createGlobalRefs()
175 request->instance = instance; in createGlobalRefs()
178 argumentTag = firstArgumentTypeTag(request->methodSignature, &cursor); in createGlobalRefs()
179 argument = request->arguments; in createGlobalRefs()
180 while ( argIndex < request->argumentCount ) { in createGlobalRefs()
202 for ( argIndex=0; argIndex < request->argumentCount; argIndex++ ) { in createGlobalRefs()
222 deletePotentiallySavedGlobalRefs(JNIEnv *env, InvokeRequest *request) in deletePotentiallySavedGlobalRefs() argument
225 if ((request->invokeType == INVOKE_CONSTRUCTOR) || in deletePotentiallySavedGlobalRefs()
226 (returnTypeTag(request->methodSignature) == JDWP_TAG(OBJECT)) || in deletePotentiallySavedGlobalRefs()
227 (returnTypeTag(request->methodSignature) == JDWP_TAG(ARRAY))) { in deletePotentiallySavedGlobalRefs()
228 if (request->returnValue.l != NULL) { in deletePotentiallySavedGlobalRefs()
229 tossGlobalRef(env, &(request->returnValue.l)); in deletePotentiallySavedGlobalRefs()
233 if (request->exception != NULL) { in deletePotentiallySavedGlobalRefs()
234 tossGlobalRef(env, &(request->exception)); in deletePotentiallySavedGlobalRefs()
239 * Delete global argument references from the request which got put there before a
240 * invoke request was carried out. See fillInvokeRequest().
243 deleteGlobalArgumentRefs(JNIEnv *env, InvokeRequest *request) in deleteGlobalArgumentRefs() argument
247 jvalue *argument = request->arguments; in deleteGlobalArgumentRefs()
248 jbyte argumentTag = firstArgumentTypeTag(request->methodSignature, &cursor); in deleteGlobalArgumentRefs()
250 if (request->clazz != NULL) { in deleteGlobalArgumentRefs()
251 tossGlobalRef(env, &(request->clazz)); in deleteGlobalArgumentRefs()
253 if (request->instance != NULL) { in deleteGlobalArgumentRefs()
254 tossGlobalRef(env, &(request->instance)); in deleteGlobalArgumentRefs()
257 while (argIndex < request->argumentCount) { in deleteGlobalArgumentRefs()
271 fillInvokeRequest(JNIEnv *env, InvokeRequest *request, in fillInvokeRequest() argument
278 if (!request->available) { in fillInvokeRequest()
284 if (request->pending) { in fillInvokeRequest()
291 request->invokeType = invokeType; in fillInvokeRequest()
292 request->options = options; in fillInvokeRequest()
293 request->detached = JNI_FALSE; in fillInvokeRequest()
294 request->id = id; in fillInvokeRequest()
295 request->clazz = clazz; in fillInvokeRequest()
296 request->method = method; in fillInvokeRequest()
297 request->instance = instance; in fillInvokeRequest()
298 request->arguments = arguments; in fillInvokeRequest()
299 request->arguments = arguments; in fillInvokeRequest()
300 request->argumentCount = argumentCount; in fillInvokeRequest()
302 request->returnValue.j = 0; in fillInvokeRequest()
303 request->exception = 0; in fillInvokeRequest()
308 error = methodSignature(method, NULL, &request->methodSignature, NULL); in fillInvokeRequest()
318 error = createGlobalRefs(env, request); in fillInvokeRequest()
320 jvmtiDeallocate(request->methodSignature); in fillInvokeRequest()
324 request->pending = JNI_TRUE; in fillInvokeRequest()
325 request->available = JNI_FALSE; in fillInvokeRequest()
332 InvokeRequest *request; in invoker_enableInvokeRequests() local
336 request = threadControl_getInvokeRequest(thread); in invoker_enableInvokeRequests()
337 if (request == NULL) { in invoker_enableInvokeRequests()
338 EXIT_ERROR(AGENT_ERROR_INVALID_THREAD, "getting thread invoke request"); in invoker_enableInvokeRequests()
341 request->available = JNI_TRUE; in invoker_enableInvokeRequests()
351 InvokeRequest *request; in invoker_requestInvoke() local
355 request = threadControl_getInvokeRequest(thread); in invoker_requestInvoke()
356 if (request != NULL) { in invoker_requestInvoke()
357 error = fillInvokeRequest(env, request, invokeType, options, id, in invoker_requestInvoke()
376 invokeConstructor(JNIEnv *env, InvokeRequest *request) in invokeConstructor() argument
380 JDI_ASSERT_MSG(request->clazz, "Request clazz null"); in invokeConstructor()
381 object = JNI_FUNC_PTR(env,NewObjectA)(env, request->clazz, in invokeConstructor()
382 request->method, in invokeConstructor()
383 request->arguments); in invokeConstructor()
384 request->returnValue.l = NULL; in invokeConstructor()
386 saveGlobalRef(env, object, &(request->returnValue.l)); in invokeConstructor()
391 invokeStatic(JNIEnv *env, InvokeRequest *request) in invokeStatic() argument
393 switch(returnTypeTag(request->methodSignature)) { in invokeStatic()
397 JDI_ASSERT_MSG(request->clazz, "Request clazz null"); in invokeStatic()
399 request->clazz, in invokeStatic()
400 request->method, in invokeStatic()
401 request->arguments); in invokeStatic()
402 request->returnValue.l = NULL; in invokeStatic()
404 saveGlobalRef(env, object, &(request->returnValue.l)); in invokeStatic()
411 request->returnValue.b = JNI_FUNC_PTR(env,CallStaticByteMethodA)(env, in invokeStatic()
412 request->clazz, in invokeStatic()
413 request->method, in invokeStatic()
414 request->arguments); in invokeStatic()
418 request->returnValue.c = JNI_FUNC_PTR(env,CallStaticCharMethodA)(env, in invokeStatic()
419 request->clazz, in invokeStatic()
420 request->method, in invokeStatic()
421 request->arguments); in invokeStatic()
425 request->returnValue.f = JNI_FUNC_PTR(env,CallStaticFloatMethodA)(env, in invokeStatic()
426 request->clazz, in invokeStatic()
427 request->method, in invokeStatic()
428 request->arguments); in invokeStatic()
432 request->returnValue.d = JNI_FUNC_PTR(env,CallStaticDoubleMethodA)(env, in invokeStatic()
433 request->clazz, in invokeStatic()
434 request->method, in invokeStatic()
435 request->arguments); in invokeStatic()
439 request->returnValue.i = JNI_FUNC_PTR(env,CallStaticIntMethodA)(env, in invokeStatic()
440 request->clazz, in invokeStatic()
441 request->method, in invokeStatic()
442 request->arguments); in invokeStatic()
446 request->returnValue.j = JNI_FUNC_PTR(env,CallStaticLongMethodA)(env, in invokeStatic()
447 request->clazz, in invokeStatic()
448 request->method, in invokeStatic()
449 request->arguments); in invokeStatic()
453 request->returnValue.s = JNI_FUNC_PTR(env,CallStaticShortMethodA)(env, in invokeStatic()
454 request->clazz, in invokeStatic()
455 request->method, in invokeStatic()
456 request->arguments); in invokeStatic()
460 request->returnValue.z = JNI_FUNC_PTR(env,CallStaticBooleanMethodA)(env, in invokeStatic()
461 request->clazz, in invokeStatic()
462 request->method, in invokeStatic()
463 request->arguments); in invokeStatic()
468 request->clazz, in invokeStatic()
469 request->method, in invokeStatic()
470 request->arguments); in invokeStatic()
480 invokeVirtual(JNIEnv *env, InvokeRequest *request) in invokeVirtual() argument
482 switch(returnTypeTag(request->methodSignature)) { in invokeVirtual()
486 JDI_ASSERT_MSG(request->instance, "Request instance null"); in invokeVirtual()
488 request->instance, in invokeVirtual()
489 request->method, in invokeVirtual()
490 request->arguments); in invokeVirtual()
491 request->returnValue.l = NULL; in invokeVirtual()
493 saveGlobalRef(env, object, &(request->returnValue.l)); in invokeVirtual()
499 request->returnValue.b = JNI_FUNC_PTR(env,CallByteMethodA)(env, in invokeVirtual()
500 request->instance, in invokeVirtual()
501 request->method, in invokeVirtual()
502 request->arguments); in invokeVirtual()
506 request->returnValue.c = JNI_FUNC_PTR(env,CallCharMethodA)(env, in invokeVirtual()
507 request->instance, in invokeVirtual()
508 request->method, in invokeVirtual()
509 request->arguments); in invokeVirtual()
513 request->returnValue.f = JNI_FUNC_PTR(env,CallFloatMethodA)(env, in invokeVirtual()
514 request->instance, in invokeVirtual()
515 request->method, in invokeVirtual()
516 request->arguments); in invokeVirtual()
520 request->returnValue.d = JNI_FUNC_PTR(env,CallDoubleMethodA)(env, in invokeVirtual()
521 request->instance, in invokeVirtual()
522 request->method, in invokeVirtual()
523 request->arguments); in invokeVirtual()
527 request->returnValue.i = JNI_FUNC_PTR(env,CallIntMethodA)(env, in invokeVirtual()
528 request->instance, in invokeVirtual()
529 request->method, in invokeVirtual()
530 request->arguments); in invokeVirtual()
534 request->returnValue.j = JNI_FUNC_PTR(env,CallLongMethodA)(env, in invokeVirtual()
535 request->instance, in invokeVirtual()
536 request->method, in invokeVirtual()
537 request->arguments); in invokeVirtual()
541 request->returnValue.s = JNI_FUNC_PTR(env,CallShortMethodA)(env, in invokeVirtual()
542 request->instance, in invokeVirtual()
543 request->method, in invokeVirtual()
544 request->arguments); in invokeVirtual()
548 request->returnValue.z = JNI_FUNC_PTR(env,CallBooleanMethodA)(env, in invokeVirtual()
549 request->instance, in invokeVirtual()
550 request->method, in invokeVirtual()
551 request->arguments); in invokeVirtual()
556 request->instance, in invokeVirtual()
557 request->method, in invokeVirtual()
558 request->arguments); in invokeVirtual()
568 invokeNonvirtual(JNIEnv *env, InvokeRequest *request) in invokeNonvirtual() argument
570 switch(returnTypeTag(request->methodSignature)) { in invokeNonvirtual()
574 JDI_ASSERT_MSG(request->clazz, "Request clazz null"); in invokeNonvirtual()
575 JDI_ASSERT_MSG(request->instance, "Request instance null"); in invokeNonvirtual()
577 request->instance, in invokeNonvirtual()
578 request->clazz, in invokeNonvirtual()
579 request->method, in invokeNonvirtual()
580 request->arguments); in invokeNonvirtual()
581 request->returnValue.l = NULL; in invokeNonvirtual()
583 saveGlobalRef(env, object, &(request->returnValue.l)); in invokeNonvirtual()
589 request->returnValue.b = JNI_FUNC_PTR(env,CallNonvirtualByteMethodA)(env, in invokeNonvirtual()
590 request->instance, in invokeNonvirtual()
591 request->clazz, in invokeNonvirtual()
592 request->method, in invokeNonvirtual()
593 request->arguments); in invokeNonvirtual()
597 request->returnValue.c = JNI_FUNC_PTR(env,CallNonvirtualCharMethodA)(env, in invokeNonvirtual()
598 request->instance, in invokeNonvirtual()
599 request->clazz, in invokeNonvirtual()
600 request->method, in invokeNonvirtual()
601 request->arguments); in invokeNonvirtual()
605 request->returnValue.f = JNI_FUNC_PTR(env,CallNonvirtualFloatMethodA)(env, in invokeNonvirtual()
606 request->instance, in invokeNonvirtual()
607 request->clazz, in invokeNonvirtual()
608 request->method, in invokeNonvirtual()
609 request->arguments); in invokeNonvirtual()
613 request->returnValue.d = JNI_FUNC_PTR(env,CallNonvirtualDoubleMethodA)(env, in invokeNonvirtual()
614 request->instance, in invokeNonvirtual()
615 request->clazz, in invokeNonvirtual()
616 request->method, in invokeNonvirtual()
617 request->arguments); in invokeNonvirtual()
621 request->returnValue.i = JNI_FUNC_PTR(env,CallNonvirtualIntMethodA)(env, in invokeNonvirtual()
622 request->instance, in invokeNonvirtual()
623 request->clazz, in invokeNonvirtual()
624 request->method, in invokeNonvirtual()
625 request->arguments); in invokeNonvirtual()
629 request->returnValue.j = JNI_FUNC_PTR(env,CallNonvirtualLongMethodA)(env, in invokeNonvirtual()
630 request->instance, in invokeNonvirtual()
631 request->clazz, in invokeNonvirtual()
632 request->method, in invokeNonvirtual()
633 request->arguments); in invokeNonvirtual()
637 request->returnValue.s = JNI_FUNC_PTR(env,CallNonvirtualShortMethodA)(env, in invokeNonvirtual()
638 request->instance, in invokeNonvirtual()
639 request->clazz, in invokeNonvirtual()
640 request->method, in invokeNonvirtual()
641 request->arguments); in invokeNonvirtual()
645 request->returnValue.z = JNI_FUNC_PTR(env,CallNonvirtualBooleanMethodA)(env, in invokeNonvirtual()
646 request->instance, in invokeNonvirtual()
647 request->clazz, in invokeNonvirtual()
648 request->method, in invokeNonvirtual()
649 request->arguments); in invokeNonvirtual()
654 request->instance, in invokeNonvirtual()
655 request->clazz, in invokeNonvirtual()
656 request->method, in invokeNonvirtual()
657 request->arguments); in invokeNonvirtual()
671 InvokeRequest *request; in invoker_doInvoke() local
679 request = threadControl_getInvokeRequest(thread); in invoker_doInvoke()
680 if (request == NULL) { in invoker_doInvoke()
681 EXIT_ERROR(AGENT_ERROR_INVALID_THREAD, "getting thread invoke request"); in invoker_doInvoke()
684 request->available = JNI_FALSE; in invoker_doInvoke()
685 startNow = request->pending && !request->started; in invoker_doInvoke()
688 request->started = JNI_TRUE; in invoker_doInvoke()
690 options = request->options; in invoker_doInvoke()
691 invokeType = request->invokeType; in invoker_doInvoke()
709 invokeConstructor(env, request); in invoker_doInvoke()
712 invokeStatic(env, request); in invoker_doInvoke()
716 invokeNonvirtual(env, request); in invoker_doInvoke()
718 invokeVirtual(env, request); in invoker_doInvoke()
724 request->exception = NULL; in invoker_doInvoke()
728 saveGlobalRef(env, exception, &(request->exception)); in invoker_doInvoke()
745 InvokeRequest *request; in invoker_completeInvokeRequest() local
758 request = threadControl_getInvokeRequest(thread); in invoker_completeInvokeRequest()
759 if (request == NULL) { in invoker_completeInvokeRequest()
760 EXIT_ERROR(AGENT_ERROR_INVALID_THREAD, "getting thread invoke request"); in invoker_completeInvokeRequest()
763 JDI_ASSERT(request->pending); in invoker_completeInvokeRequest()
764 JDI_ASSERT(request->started); in invoker_completeInvokeRequest()
766 request->pending = JNI_FALSE; in invoker_completeInvokeRequest()
767 request->started = JNI_FALSE; in invoker_completeInvokeRequest()
768 request->available = JNI_TRUE; /* For next time around */ in invoker_completeInvokeRequest()
770 detached = request->detached; in invoker_completeInvokeRequest()
772 if (request->options & JDWP_INVOKE_OPTIONS(SINGLE_THREADED)) { in invoker_completeInvokeRequest()
778 if (request->invokeType == INVOKE_CONSTRUCTOR) { in invoker_completeInvokeRequest()
783 tag = specificTypeKey(env, request->returnValue.l); in invoker_completeInvokeRequest()
785 tag = returnTypeTag(request->methodSignature); in invoker_completeInvokeRequest()
787 id = request->id; in invoker_completeInvokeRequest()
788 exc = request->exception; in invoker_completeInvokeRequest()
789 returnValue = request->returnValue; in invoker_completeInvokeRequest()
795 * this request ID anymore, so we must call deleteGlobalArgumentRefs(). in invoker_completeInvokeRequest()
802 deleteGlobalArgumentRefs(env, request); in invoker_completeInvokeRequest()
824 deletePotentiallySavedGlobalRefs(env, request); in invoker_completeInvokeRequest()
832 InvokeRequest *request; in invoker_isPending() local
835 request = threadControl_getInvokeRequest(thread); in invoker_isPending()
836 if (request == NULL) { in invoker_isPending()
837 EXIT_ERROR(AGENT_ERROR_INVALID_THREAD, "getting thread invoke request"); in invoker_isPending()
839 return request->pending; in invoker_isPending()
845 InvokeRequest *request; in invoker_isEnabled() local
848 request = threadControl_getInvokeRequest(thread); in invoker_isEnabled()
849 if (request == NULL) { in invoker_isEnabled()
850 EXIT_ERROR(AGENT_ERROR_INVALID_THREAD, "getting thread invoke request"); in invoker_isEnabled()
852 return request->available; in invoker_isEnabled()
856 invoker_detach(InvokeRequest *request) in invoker_detach() argument
858 JDI_ASSERT(request); in invoker_detach()
860 request->detached = JNI_TRUE; in invoker_detach()