1 /*
2 * Copyright (c) 1998, 2019, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
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
7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
88 void add_non_safepoint(int pc_offset);
89
90 // Describes debugging information for a scope at the given pc_offset.
91 // Calls must be in non-decreasing order of pc_offset.
92 // If there are several calls at a single pc_offset,
93 // then they occur in the same order as they were performed by the JVM,
94 // with the most recent (innermost) call being described last.
95 // For a safepoint, the pc_offset must have been mentioned
96 // previously by add_safepoint.
97 // Otherwise, the pc_offset must have been mentioned previously
98 // by add_non_safepoint, and the locals, expressions, and monitors
99 // must all be null.
100 void describe_scope(int pc_offset,
101 const methodHandle& methodH,
102 ciMethod* method,
103 int bci,
104 bool reexecute,
105 bool rethrow_exception = false,
106 bool is_method_handle_invoke = false,
107 bool return_oop = false,
108 DebugToken* locals = NULL,
109 DebugToken* expressions = NULL,
110 DebugToken* monitors = NULL);
111
112
113 void dump_object_pool(GrowableArray<ScopeValue*>* objects);
114
115 // This call must follow every add_safepoint,
116 // after any intervening describe_scope calls.
117 void end_safepoint(int pc_offset) { end_scopes(pc_offset, true); }
118 void end_non_safepoint(int pc_offset) { end_scopes(pc_offset, false); }
119
120 // helper fuctions for describe_scope to enable sharing
121 DebugToken* create_scope_values(GrowableArray<ScopeValue*>* values);
122 DebugToken* create_monitor_values(GrowableArray<MonitorValue*>* monitors);
123
124 // returns the size of the generated scopeDescs.
125 int data_size();
126 int pcs_size();
127 int oop_size() { return oop_recorder()->oop_size(); }
|
1 /*
2 * Copyright (c) 1998, 2020, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
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
7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
88 void add_non_safepoint(int pc_offset);
89
90 // Describes debugging information for a scope at the given pc_offset.
91 // Calls must be in non-decreasing order of pc_offset.
92 // If there are several calls at a single pc_offset,
93 // then they occur in the same order as they were performed by the JVM,
94 // with the most recent (innermost) call being described last.
95 // For a safepoint, the pc_offset must have been mentioned
96 // previously by add_safepoint.
97 // Otherwise, the pc_offset must have been mentioned previously
98 // by add_non_safepoint, and the locals, expressions, and monitors
99 // must all be null.
100 void describe_scope(int pc_offset,
101 const methodHandle& methodH,
102 ciMethod* method,
103 int bci,
104 bool reexecute,
105 bool rethrow_exception = false,
106 bool is_method_handle_invoke = false,
107 bool return_oop = false,
108 bool has_ea_local_in_scope = false,
109 bool arg_escape = false,
110 DebugToken* locals = NULL,
111 DebugToken* expressions = NULL,
112 DebugToken* monitors = NULL);
113
114
115 void dump_object_pool(GrowableArray<ScopeValue*>* objects);
116
117 // This call must follow every add_safepoint,
118 // after any intervening describe_scope calls.
119 void end_safepoint(int pc_offset) { end_scopes(pc_offset, true); }
120 void end_non_safepoint(int pc_offset) { end_scopes(pc_offset, false); }
121
122 // helper fuctions for describe_scope to enable sharing
123 DebugToken* create_scope_values(GrowableArray<ScopeValue*>* values);
124 DebugToken* create_monitor_values(GrowableArray<MonitorValue*>* monitors);
125
126 // returns the size of the generated scopeDescs.
127 int data_size();
128 int pcs_size();
129 int oop_size() { return oop_recorder()->oop_size(); }
|