< prev index next >

src/java.base/solaris/native/libjvm_dtrace/jvm_dtrace.c

Print this page
rev 47483 : [mq]: XXXXXXX-double-trouble-2


 405     /*
 406      * The arguments to the door function are in 'buf' so we now
 407      * do the door call
 408      */
 409     door_args.data_ptr = buf;
 410     door_args.data_size = size;
 411     door_args.desc_ptr = NULL;
 412     door_args.desc_num = 0;
 413     door_args.rbuf = (char*)&res_buffer;
 414     door_args.rsize = sizeof(res_buffer);
 415 
 416     RESTARTABLE(door_call(jvm->door_fd, &door_args), rc);
 417 
 418     /*
 419      * door_call failed
 420      */
 421     if (rc == -1) {
 422         print_debug("door_call failed\n");
 423     } else {
 424         /*
 425          * door_call succeeded but the call didn't return the the expected jint.
 426          */
 427         if (door_args.data_size < sizeof(int)) {
 428             print_debug("Enqueue error - reason unknown as result is truncated!");
 429         } else {
 430             int* res = (int*)(door_args.data_ptr);
 431             if (*res != 0) {
 432                 const char* msg = translate_error(*res);
 433                 if (msg == NULL) {
 434                     print_debug("Unable to enqueue command to target VM: %d\n", *res);
 435                 } else {
 436                     print_debug("Unable to enqueue command to target VM: %s\n", msg);
 437                 }
 438             } else {
 439                 /*
 440                  * The door call should return a file descriptor to one end of
 441                  * a socket pair
 442                  */
 443                 if ((door_args.desc_ptr != NULL) &&
 444                     (door_args.desc_num == 1) &&
 445                     (door_args.desc_ptr->d_attributes & DOOR_DESCRIPTOR)) {




 405     /*
 406      * The arguments to the door function are in 'buf' so we now
 407      * do the door call
 408      */
 409     door_args.data_ptr = buf;
 410     door_args.data_size = size;
 411     door_args.desc_ptr = NULL;
 412     door_args.desc_num = 0;
 413     door_args.rbuf = (char*)&res_buffer;
 414     door_args.rsize = sizeof(res_buffer);
 415 
 416     RESTARTABLE(door_call(jvm->door_fd, &door_args), rc);
 417 
 418     /*
 419      * door_call failed
 420      */
 421     if (rc == -1) {
 422         print_debug("door_call failed\n");
 423     } else {
 424         /*
 425          * door_call succeeded but the call didn't return the expected jint.
 426          */
 427         if (door_args.data_size < sizeof(int)) {
 428             print_debug("Enqueue error - reason unknown as result is truncated!");
 429         } else {
 430             int* res = (int*)(door_args.data_ptr);
 431             if (*res != 0) {
 432                 const char* msg = translate_error(*res);
 433                 if (msg == NULL) {
 434                     print_debug("Unable to enqueue command to target VM: %d\n", *res);
 435                 } else {
 436                     print_debug("Unable to enqueue command to target VM: %s\n", msg);
 437                 }
 438             } else {
 439                 /*
 440                  * The door call should return a file descriptor to one end of
 441                  * a socket pair
 442                  */
 443                 if ((door_args.desc_ptr != NULL) &&
 444                     (door_args.desc_num == 1) &&
 445                     (door_args.desc_ptr->d_attributes & DOOR_DESCRIPTOR)) {


< prev index next >