equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. |
7 * published by the Free Software Foundation. |
364 while (result.is_runtime_frame() || |
364 while (result.is_runtime_frame() || |
365 result.is_ignored_frame()) { |
365 result.is_ignored_frame()) { |
366 result = result.sender(map); |
366 result = result.sender(map); |
367 } |
367 } |
368 return result; |
368 return result; |
369 } |
|
370 |
|
371 // Note: called by profiler - NOT for current thread |
|
372 frame frame::profile_find_Java_sender_frame(JavaThread *thread) { |
|
373 // If we don't recognize this frame, walk back up the stack until we do |
|
374 RegisterMap map(thread, false); |
|
375 frame first_java_frame = frame(); |
|
376 |
|
377 // Find the first Java frame on the stack starting with input frame |
|
378 if (is_java_frame()) { |
|
379 // top frame is compiled frame or deoptimized frame |
|
380 first_java_frame = *this; |
|
381 } else if (safe_for_sender(thread)) { |
|
382 for (frame sender_frame = sender(&map); |
|
383 sender_frame.safe_for_sender(thread) && !sender_frame.is_first_frame(); |
|
384 sender_frame = sender_frame.sender(&map)) { |
|
385 if (sender_frame.is_java_frame()) { |
|
386 first_java_frame = sender_frame; |
|
387 break; |
|
388 } |
|
389 } |
|
390 } |
|
391 return first_java_frame; |
|
392 } |
369 } |
393 |
370 |
394 // Interpreter frames |
371 // Interpreter frames |
395 |
372 |
396 |
373 |