jvmtiEnvThreadState.cpp revision 3863
0N/A * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. 0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 0N/A * This code is free software; you can redistribute it and/or modify it 0N/A * under the terms of the GNU General Public License version 2 only, as 0N/A * published by the Free Software Foundation. 0N/A * This code is distributed in the hope that it will be useful, but WITHOUT 0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 0N/A * version 2 for more details (a copy is included in the LICENSE file that 0N/A * accompanied this code). 0N/A * You should have received a copy of the GNU General Public License version 0N/A * 2 along with this work; if not, write to the Free Software Foundation, 0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 873N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 1083N/A/////////////////////////////////////////////////////////////// 1083N/A/////////////////////////////////////////////////////////////// 1083N/A// class JvmtiFramePops - private methods 2046N/A/////////////////////////////////////////////////////////////// 675N/A// class JvmtiFramePops - public methods 422N/A // return memory to c_heap. 902N/A for (
int i=0; i<n; i++) {
233N/A/////////////////////////////////////////////////////////////// 730N/A// class JvmtiEnvThreadState 730N/A// Instances of JvmtiEnvThreadState hang off of each JvmtiThreadState, 3646N/A// Given that a new (potential) event has come in, 3646N/A// maintain the current JVMTI location on a per-thread per-env basis 2086N/A// and use it to filter out duplicate events: 1177N/A// - breakpoint followed by single step 3980N/A// - single step at a breakpoint 3349N/A // The method is identified and stored as a jmethodID which is safe in this 3349N/A // case because the class cannot be unloaded while a method is executing. 3349N/A // the last breakpoint or single step was at this same location 3349N/A // Repeat breakpoint is complicated. If we previously posted a breakpoint 5713N/A // event at this location and if we also single stepped at this location 5713N/A // then we skip the duplicate breakpoint. 5713N/A // Repeat single step is easy: just don't post it again. 3381N/A // If step is pending for popframe then it may not be 0N/A // a repeat step. The new_bci and method_id is same as current_bci 0N/A // and current method_id after pop and step for recursive calls. 0N/A // This has been handled by clearing the location 3853N/A "frame pop data only accessible from same thread or while suspended");
0N/A "frame pop data only accessible from same thread or while suspended");
2086N/A "frame pop data only accessible from same thread or while suspended");
2086N/A "frame pop data only accessible from same thread or while suspended");
2086N/A "frame pop data only accessible from same thread or while suspended");
2086N/A "must be single-step or breakpoint event");
2086N/A // Current location is used to detect the following: 2086N/A // 1) a breakpoint event followed by single-stepping to the same bci 2086N/A // 2) single-step to a bytecode that will be transformed to a fast version 2086N/A // We skip to avoid posting the duplicate single-stepping event. 2086N/A // If single-stepping is disabled, clear current location so that 3034N/A // single-stepping to the same method and bcp at a later time will be 3034N/A // detected if single-stepping is enabled at that time (see 4388912). 4156N/A // If single-stepping is enabled, set the current location to the 4156N/A // current method and bcp. This covers the following type of case, 0N/A // e.g., the debugger stepi command: 0N/A // - bytecode single stepped 3853N/A // - SINGLE_STEP event posted and SINGLE_STEP event disabled 0N/A // - SINGLE_STEP event reenabled 0N/A // - bytecode rewritten to fast version 1008N/A // If breakpoint event is disabled, clear current location only if 1008N/A // single-stepping is not enabled. Otherwise, keep the thread location 1008N/A // to detect any duplicate events. 0N/A // If enabling breakpoint, no need to reset. 0N/A // Can't do anything if empty stack. 1177N/A // The java thread stack may not be walkable for a running thread 1177N/A // so get current location at safepoint. 5178N/A // If this is to disable breakpoint, also check if single-step is not enabled