mirror of
https://github.com/openjdk/jdk.git
synced 2026-04-13 08:30:45 +00:00
8252754: Hash code calculation of JfrStackTrace is inconsistent
Reviewed-by: egahlin
This commit is contained in:
parent
35ea00085f
commit
43d36857d0
@ -180,6 +180,7 @@ bool JfrStackTrace::record_thread(JavaThread& thread, frame& frame) {
|
||||
u4 count = 0;
|
||||
_reached_root = true;
|
||||
|
||||
_hash = 1;
|
||||
while (!st.at_end()) {
|
||||
if (count >= _max_frames) {
|
||||
_reached_root = false;
|
||||
@ -201,7 +202,9 @@ bool JfrStackTrace::record_thread(JavaThread& thread, frame& frame) {
|
||||
}
|
||||
const int lineno = method->line_number_from_bci(bci);
|
||||
// Can we determine if it's inlined?
|
||||
_hash = (_hash << 2) + (unsigned int)(((size_t)mid >> 2) + (bci << 4) + type);
|
||||
_hash = (_hash * 31) + mid;
|
||||
_hash = (_hash * 31) + bci;
|
||||
_hash = (_hash * 31) + type;
|
||||
_frames[count] = JfrStackFrame(mid, bci, type, lineno, method->method_holder());
|
||||
st.samples_next();
|
||||
count++;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user