< prev index next >

src/share/vm/utilities/nativeCallStack.cpp

Print this page
rev 7876 : [mq]: nmtfix

*** 53,62 **** --- 53,63 ---- _stack[index] = pc[index]; } for (; index < NMT_TrackingStackDepth; index ++) { _stack[index] = NULL; } + _hash_value = 0; } // number of stack frames captured int NativeCallStack::frames() const { int index;
*** 67,77 **** } return index; } // Hash code. Any better algorithm? ! int NativeCallStack::hash() const { long hash_val = _hash_value; if (hash_val == 0) { long pc; int index; for (index = 0; index < NMT_TrackingStackDepth; index ++) { --- 68,78 ---- } return index; } // Hash code. Any better algorithm? ! unsigned int NativeCallStack::hash() const { long hash_val = _hash_value; if (hash_val == 0) { long pc; int index; for (index = 0; index < NMT_TrackingStackDepth; index ++) {
*** 79,89 **** if (pc == 0) break; hash_val += pc; } NativeCallStack* p = const_cast<NativeCallStack*>(this); ! p->_hash_value = (int)(hash_val & 0xFFFFFFFF); } return _hash_value; } void NativeCallStack::print_on(outputStream* out) const { --- 80,90 ---- if (pc == 0) break; hash_val += pc; } NativeCallStack* p = const_cast<NativeCallStack*>(this); ! p->_hash_value = (unsigned int)(hash_val & 0xFFFFFFFF); } return _hash_value; } void NativeCallStack::print_on(outputStream* out) const {
< prev index next >