comparison src/share/vm/shark/sharkCacheDecache.cpp @ 7195:2cd5e15048e6

8003868: fix shark for latest HotSpot and LLVM Reviewed-by: twisti Contributed-by: Roman Kennke <rkennke@redhat.com>
author twisti
date Tue, 27 Nov 2012 12:48:52 -0800
parents da91efe96a93
children 291ffc492eb6
comparison
equal deleted inserted replaced
7194:beebba0acc11 7195:2cd5e15048e6
105 } 105 }
106 106
107 void SharkDecacher::process_method_slot(Value** value, int offset) { 107 void SharkDecacher::process_method_slot(Value** value, int offset) {
108 // Decache the method pointer 108 // Decache the method pointer
109 write_value_to_frame( 109 write_value_to_frame(
110 SharkType::Method*_type(), 110 SharkType::Method_type(),
111 *value, 111 *value,
112 offset); 112 offset);
113 113
114 oopmap()->set_oop(slot2reg(offset));
115 } 114 }
116 115
117 void SharkDecacher::process_pc_slot(int offset) { 116 void SharkDecacher::process_pc_slot(int offset) {
118 // Record the PC 117 // Record the PC
119 builder()->CreateStore( 118 builder()->CreateStore(
203 *value = read_value_from_frame(SharkType::oop_type(), offset); 202 *value = read_value_from_frame(SharkType::oop_type(), offset);
204 } 203 }
205 204
206 void SharkCacher::process_method_slot(Value** value, int offset) { 205 void SharkCacher::process_method_slot(Value** value, int offset) {
207 // Cache the method pointer 206 // Cache the method pointer
208 *value = read_value_from_frame(SharkType::Method*_type(), offset); 207 *value = read_value_from_frame(SharkType::Method_type(), offset);
209 } 208 }
210 209
211 void SharkFunctionEntryCacher::process_method_slot(Value** value, int offset) { 210 void SharkFunctionEntryCacher::process_method_slot(Value** value, int offset) {
212 // "Cache" the method pointer 211 // "Cache" the method pointer
213 *value = method(); 212 *value = method();
228 value->zero_checked()); 227 value->zero_checked());
229 } 228 }
230 } 229 }
231 230
232 Value* SharkOSREntryCacher::CreateAddressOfOSRBufEntry(int offset, 231 Value* SharkOSREntryCacher::CreateAddressOfOSRBufEntry(int offset,
233 const Type* type) { 232 Type* type) {
234 Value *result = builder()->CreateStructGEP(osr_buf(), offset); 233 Value *result = builder()->CreateStructGEP(osr_buf(), offset);
235 if (type != SharkType::intptr_type()) 234 if (type != SharkType::intptr_type())
236 result = builder()->CreateBitCast(result, PointerType::getUnqual(type)); 235 result = builder()->CreateBitCast(result, PointerType::getUnqual(type));
237 return result; 236 return result;
238 } 237 }
252 SharkType::to_stackType(value->basic_type()))), 251 SharkType::to_stackType(value->basic_type()))),
253 value->zero_checked()); 252 value->zero_checked());
254 } 253 }
255 } 254 }
256 255
257 void SharkDecacher::write_value_to_frame(const Type* type, 256 void SharkDecacher::write_value_to_frame(Type* type,
258 Value* value, 257 Value* value,
259 int offset) { 258 int offset) {
260 builder()->CreateStore(value, stack()->slot_addr(offset, type)); 259 builder()->CreateStore(value, stack()->slot_addr(offset, type));
261 } 260 }
262 261
263 Value* SharkCacher::read_value_from_frame(const Type* type, int offset) { 262 Value* SharkCacher::read_value_from_frame(Type* type, int offset) {
264 return builder()->CreateLoad(stack()->slot_addr(offset, type)); 263 return builder()->CreateLoad(stack()->slot_addr(offset, type));
265 } 264 }