Mercurial > hg > truffle
comparison src/share/vm/prims/jvmtiTagMap.cpp @ 12316:190899198332
7195622: CheckUnhandledOops has limited usefulness now
Summary: Enable CHECK_UNHANDLED_OOPS in fastdebug builds across all supported platforms.
Reviewed-by: coleenp, hseigel, dholmes, stefank, twisti, ihse, rdurbin
Contributed-by: lois.foltan@oracle.com
author | hseigel |
---|---|
date | Thu, 26 Sep 2013 10:25:02 -0400 |
parents | 92ef81e2f571 |
children | c86519f8d826 2c6ef90f030a |
comparison
equal
deleted
inserted
replaced
12315:c1fbf21c7397 | 12316:190899198332 |
---|---|
163 | 163 |
164 // hash a given key (oop) with the specified size | 164 // hash a given key (oop) with the specified size |
165 static unsigned int hash(oop key, int size) { | 165 static unsigned int hash(oop key, int size) { |
166 // shift right to get better distribution (as these bits will be zero | 166 // shift right to get better distribution (as these bits will be zero |
167 // with aligned addresses) | 167 // with aligned addresses) |
168 unsigned int addr = (unsigned int)((intptr_t)key); | 168 unsigned int addr = (unsigned int)(cast_from_oop<intptr_t>(key)); |
169 #ifdef _LP64 | 169 #ifdef _LP64 |
170 return (addr >> 3) % size; | 170 return (addr >> 3) % size; |
171 #else | 171 #else |
172 return (addr >> 2) % size; | 172 return (addr >> 2) % size; |
173 #endif | 173 #endif |