Mercurial > hg > graal-jvmci-8
comparison src/share/vm/prims/jvmtiImpl.cpp @ 628:7bb995fbd3c0
Merge
author | trims |
---|---|
date | Thu, 12 Mar 2009 18:16:36 -0700 |
parents | 2f716c0acb64 |
children | c18cbe5936b8 |
comparison
equal
deleted
inserted
replaced
580:ce2272390558 | 628:7bb995fbd3c0 |
---|---|
236 #endif | 236 #endif |
237 _magic = 0; | 237 _magic = 0; |
238 } | 238 } |
239 | 239 |
240 | 240 |
241 bool | |
242 JvmtiRawMonitor::is_valid() { | |
243 int value = 0; | |
244 | |
245 // This object might not be a JvmtiRawMonitor so we can't assume | |
246 // the _magic field is properly aligned. Get the value in a safe | |
247 // way and then check against JVMTI_RM_MAGIC. | |
248 | |
249 switch (sizeof(_magic)) { | |
250 case 2: | |
251 value = Bytes::get_native_u2((address)&_magic); | |
252 break; | |
253 | |
254 case 4: | |
255 value = Bytes::get_native_u4((address)&_magic); | |
256 break; | |
257 | |
258 case 8: | |
259 value = Bytes::get_native_u8((address)&_magic); | |
260 break; | |
261 | |
262 default: | |
263 guarantee(false, "_magic field is an unexpected size"); | |
264 } | |
265 | |
266 return value == JVMTI_RM_MAGIC; | |
267 } | |
268 | |
269 | |
241 // | 270 // |
242 // class JvmtiBreakpoint | 271 // class JvmtiBreakpoint |
243 // | 272 // |
244 | 273 |
245 JvmtiBreakpoint::JvmtiBreakpoint() { | 274 JvmtiBreakpoint::JvmtiBreakpoint() { |