debugInfoRec.hpp revision 948
* Copyright 1998-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, * CA 95054 USA or visit www.sun.com if you need additional information or //** The DebugInformationRecorder collects debugging information // for a compiled method. // Debugging information is used for: // - garbage collecting compiled frames // - stack tracing across compiled frames // - deoptimizating compiled frames // The implementation requires the compiler to use the recorder // in the following order: // 1) Describe debug information for safepoints at increasing addresses. // a) Add safepoint entry (use add_safepoint or add_non_safepoint) // b) Describe scopes for that safepoint // - create locals if needed (use create_scope_values) // - create expressions if needed (use create_scope_values) // - create monitor stack if needed (use create_monitor_values) // - describe scope (use describe_scope) // "repeat last four steps for all scopes" // "outer most scope first and inner most scope last" // NB: nodes from create_scope_values and create_locations // can be reused for simple sharing. // - mark the end of the scopes (end_safepoint or end_non_safepoint) // 2) Use oop_size, data_size, pcs_size to create the nmethod and // finally migrate the debugging information into the nmethod // - GrowableArray<ScopeValue*> // - GrowableArray<MonitorValue*> // Alias for InvocationEntryBci. // Both constants are used for a pseudo-BCI which refers // to the state just _before_ a method is entered. // SynchronizationEntryBCI is used where the emphasis // is on the implicit monitorenter of a synchronized method. class DIR_Chunk;
// private class, a nugget of collected information // adds an oopmap at a specific offset // adds a jvm mapping at pc-offset, for a safepoint only // adds a jvm mapping at pc-offset, for a non-safepoint (profile point) // Describes debugging information for a scope at the given pc_offset. // Calls must be in non-decreasing order of pc_offset. // If there are several calls at a single pc_offset, // then they occur in the same order as they were performed by the JVM, // with the most recent (innermost) call being described last. // For a safepoint, the pc_offset must have been mentioned // previously by add_safepoint. // Otherwise, the pc_offset must have been mentioned previously // by add_non_safepoint, and the locals, expressions, and monitors // This call must follow every add_safepoint, // after any intervening describe_scope calls. // helper fuctions for describe_scope to enable sharing // returns the size of the generated scopeDescs. // copy the generated debugging information to nmethod // verifies the debug information // Method for setting oopmaps to temporarily preserve old handling of oopmaps // True if we are recording non-safepoint scopes. // This flag is set if DebugNonSafepoints is true, or if // JVMTI post_compiled_method_load events are enabled. // Scopes that have been described so far. // Note: Would use GrowableArray<PcDesc>, but structs are not supported. // PC of most recent real safepoint before the current one, // updated after end_scopes.