comparison src/share/vm/prims/jvmtiEnvBase.hpp @ 14909:4ca6dc0799b6

Backout jdk9 merge
author Gilles Duboscq <duboscq@ssw.jku.at>
date Tue, 01 Apr 2014 13:57:07 +0200
parents 402677ca28ed
children 89152779163c
comparison
equal deleted inserted replaced
14908:8db6e76cb658 14909:4ca6dc0799b6
1 /* 1 /*
2 * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 * 4 *
5 * This code is free software; you can redistribute it and/or modify it 5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as 6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
354 _owned_monitors_list = owned_monitor_list; 354 _owned_monitors_list = owned_monitor_list;
355 _result = JVMTI_ERROR_NONE; 355 _result = JVMTI_ERROR_NONE;
356 } 356 }
357 VMOp_Type type() const { return VMOp_GetOwnedMonitorInfo; } 357 VMOp_Type type() const { return VMOp_GetOwnedMonitorInfo; }
358 void doit() { 358 void doit() {
359 _result = JVMTI_ERROR_THREAD_NOT_ALIVE; 359 ((JvmtiEnvBase *)_env)->get_owned_monitors(_calling_thread, _java_thread,
360 if (Threads::includes(_java_thread) && !_java_thread->is_exiting() 360 _owned_monitors_list);
361 && _java_thread->threadObj() != NULL) {
362 _result = ((JvmtiEnvBase *)_env)->get_owned_monitors(_calling_thread, _java_thread,
363 _owned_monitors_list);
364 }
365 } 361 }
366 jvmtiError result() { return _result; } 362 jvmtiError result() { return _result; }
367 }; 363 };
368 364
369 365
441 _count_ptr = count_ptr; 437 _count_ptr = count_ptr;
442 } 438 }
443 jvmtiError result() { return _result; } 439 jvmtiError result() { return _result; }
444 VMOp_Type type() const { return VMOp_GetStackTrace; } 440 VMOp_Type type() const { return VMOp_GetStackTrace; }
445 void doit() { 441 void doit() {
446 _result = JVMTI_ERROR_THREAD_NOT_ALIVE; 442 _result = ((JvmtiEnvBase *)_env)->get_stack_trace(_java_thread,
447 if (Threads::includes(_java_thread) && !_java_thread->is_exiting() 443 _start_depth, _max_count,
448 && _java_thread->threadObj() != NULL) { 444 _frame_buffer, _count_ptr);
449 _result = ((JvmtiEnvBase *)_env)->get_stack_trace(_java_thread,
450 _start_depth, _max_count,
451 _frame_buffer, _count_ptr);
452 }
453 } 445 }
454 }; 446 };
455 447
456 // forward declaration 448 // forward declaration
457 struct StackInfoNode; 449 struct StackInfoNode;
539 _count_ptr = count_ptr; 531 _count_ptr = count_ptr;
540 } 532 }
541 VMOp_Type type() const { return VMOp_GetFrameCount; } 533 VMOp_Type type() const { return VMOp_GetFrameCount; }
542 jvmtiError result() { return _result; } 534 jvmtiError result() { return _result; }
543 void doit() { 535 void doit() {
544 _result = JVMTI_ERROR_THREAD_NOT_ALIVE; 536 _result = ((JvmtiEnvBase*)_env)->get_frame_count(_state, _count_ptr);
545 JavaThread* jt = _state->get_thread();
546 if (Threads::includes(jt) && !jt->is_exiting() && jt->threadObj() != NULL) {
547 _result = ((JvmtiEnvBase*)_env)->get_frame_count(_state, _count_ptr);
548 }
549 } 537 }
550 }; 538 };
551 539
552 // VM operation to frame location at safepoint. 540 // VM operation to frame location at safepoint.
553 class VM_GetFrameLocation : public VM_Operation { 541 class VM_GetFrameLocation : public VM_Operation {
569 _location_ptr = location_ptr; 557 _location_ptr = location_ptr;
570 } 558 }
571 VMOp_Type type() const { return VMOp_GetFrameLocation; } 559 VMOp_Type type() const { return VMOp_GetFrameLocation; }
572 jvmtiError result() { return _result; } 560 jvmtiError result() { return _result; }
573 void doit() { 561 void doit() {
574 _result = JVMTI_ERROR_THREAD_NOT_ALIVE; 562 _result = ((JvmtiEnvBase*)_env)->get_frame_location(_java_thread, _depth,
575 if (Threads::includes(_java_thread) && !_java_thread->is_exiting() && 563 _method_ptr, _location_ptr);
576 _java_thread->threadObj() != NULL) {
577 _result = ((JvmtiEnvBase*)_env)->get_frame_location(_java_thread, _depth,
578 _method_ptr, _location_ptr);
579 }
580 } 564 }
581 }; 565 };
582 566
583 567
584 // ResourceTracker 568 // ResourceTracker