comparison src/share/vm/jvmci/jvmciCodeInstaller.hpp @ 22773:9273bb6ba33e

Simplify code installation interface: Use CompiledCode class instead of CompilationResult and DataSection.
author Roland Schatz <roland.schatz@oracle.com>
date Fri, 15 Jan 2016 16:50:19 +0100
parents f41ed1d87d68
children 805d58f2cd8c
comparison
equal deleted inserted replaced
22772:f16c1266b0de 22773:9273bb6ba33e
1 /* 1 /*
2 * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 2011, 2016, 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.
56 Arena _arena; 56 Arena _arena;
57 57
58 jobject _data_section_handle; 58 jobject _data_section_handle;
59 jobject _data_section_patches_handle; 59 jobject _data_section_patches_handle;
60 jobject _sites_handle; 60 jobject _sites_handle;
61 jobject _exception_handlers_handle;
62 CodeOffsets _offsets; 61 CodeOffsets _offsets;
63 62
64 jobject _code_handle; 63 jobject _code_handle;
65 jint _code_size; 64 jint _code_size;
66 jint _total_frame_size; 65 jint _total_frame_size;
102 101
103 objArrayOop sites() { return (objArrayOop) JNIHandles::resolve(_sites_handle); } 102 objArrayOop sites() { return (objArrayOop) JNIHandles::resolve(_sites_handle); }
104 arrayOop code() { return (arrayOop) JNIHandles::resolve(_code_handle); } 103 arrayOop code() { return (arrayOop) JNIHandles::resolve(_code_handle); }
105 arrayOop data_section() { return (arrayOop) JNIHandles::resolve(_data_section_handle); } 104 arrayOop data_section() { return (arrayOop) JNIHandles::resolve(_data_section_handle); }
106 objArrayOop data_section_patches() { return (objArrayOop) JNIHandles::resolve(_data_section_patches_handle); } 105 objArrayOop data_section_patches() { return (objArrayOop) JNIHandles::resolve(_data_section_patches_handle); }
107 objArrayOop exception_handlers() { return (objArrayOop) JNIHandles::resolve(_exception_handlers_handle); }
108 #ifndef PRODUCT 106 #ifndef PRODUCT
109 objArrayOop comments() { return (objArrayOop) JNIHandles::resolve(_comments_handle); } 107 objArrayOop comments() { return (objArrayOop) JNIHandles::resolve(_comments_handle); }
110 #endif 108 #endif
111 109
112 oop word_kind() { return (oop) JNIHandles::resolve(_word_kind_handle); } 110 oop word_kind() { return (oop) JNIHandles::resolve(_word_kind_handle); }
128 Metadata* record_metadata_reference(Handle constant, TRAPS); 126 Metadata* record_metadata_reference(Handle constant, TRAPS);
129 #ifdef _LP64 127 #ifdef _LP64
130 narrowKlass record_narrow_metadata_reference(Handle constant, TRAPS); 128 narrowKlass record_narrow_metadata_reference(Handle constant, TRAPS);
131 #endif 129 #endif
132 130
133 // extract the fields of the CompilationResult 131 // extract the fields of the HotSpotCompiledCode
134 void initialize_fields(oop target, oop target_method, TRAPS); 132 void initialize_fields(oop target, oop target_method, TRAPS);
135 void initialize_dependencies(oop target_method, TRAPS); 133 void initialize_dependencies(oop target_method, TRAPS);
136 134
137 int estimate_stubs_size(TRAPS); 135 int estimate_stubs_size(TRAPS);
138 136
148 void site_Safepoint(CodeBuffer& buffer, jint pc_offset, Handle site, TRAPS); 146 void site_Safepoint(CodeBuffer& buffer, jint pc_offset, Handle site, TRAPS);
149 void site_Infopoint(CodeBuffer& buffer, jint pc_offset, Handle site, TRAPS); 147 void site_Infopoint(CodeBuffer& buffer, jint pc_offset, Handle site, TRAPS);
150 void site_Call(CodeBuffer& buffer, jint pc_offset, Handle site, TRAPS); 148 void site_Call(CodeBuffer& buffer, jint pc_offset, Handle site, TRAPS);
151 void site_DataPatch(CodeBuffer& buffer, jint pc_offset, Handle site, TRAPS); 149 void site_DataPatch(CodeBuffer& buffer, jint pc_offset, Handle site, TRAPS);
152 void site_Mark(CodeBuffer& buffer, jint pc_offset, Handle site, TRAPS); 150 void site_Mark(CodeBuffer& buffer, jint pc_offset, Handle site, TRAPS);
151 void site_ExceptionHandler(jint pc_offset, Handle site);
153 152
154 OopMap* create_oop_map(Handle debug_info, TRAPS); 153 OopMap* create_oop_map(Handle debug_info, TRAPS);
155 154
156 /** 155 /**
157 * Specifies the level of detail to record for a scope. 156 * Specifies the level of detail to record for a scope.
167 void record_scope(jint pc_offset, Handle position, ScopeMode scope_mode, GrowableArray<ScopeValue*>* objects, TRAPS); 166 void record_scope(jint pc_offset, Handle position, ScopeMode scope_mode, GrowableArray<ScopeValue*>* objects, TRAPS);
168 void record_object_value(ObjectValue* sv, Handle value, GrowableArray<ScopeValue*>* objects, TRAPS); 167 void record_object_value(ObjectValue* sv, Handle value, GrowableArray<ScopeValue*>* objects, TRAPS);
169 168
170 GrowableArray<ScopeValue*>* record_virtual_objects(Handle debug_info, TRAPS); 169 GrowableArray<ScopeValue*>* record_virtual_objects(Handle debug_info, TRAPS);
171 170
172 void process_exception_handlers();
173 int estimateStubSpace(int static_call_stubs); 171 int estimateStubSpace(int static_call_stubs);
174 }; 172 };
175 173
176 /** 174 /**
177 * Gets the Method metaspace object from a HotSpotResolvedJavaMethodImpl Java object. 175 * Gets the Method metaspace object from a HotSpotResolvedJavaMethodImpl Java object.