|
97 | 97 | #include "utilities/dtrace.hpp" |
98 | 98 | #include "utilities/events.hpp" |
99 | 99 | #include "utilities/macros.hpp" |
100 | | -#include "utilities/stringUtils.hpp" |
| 100 | +#include "utilities/nativeStackPrinter.hpp" |
101 | 101 | #include "utilities/pair.hpp" |
| 102 | +#include "utilities/stringUtils.hpp" |
102 | 103 | #ifdef COMPILER1 |
103 | 104 | #include "c1/c1_Compiler.hpp" |
104 | 105 | #endif |
@@ -4009,14 +4010,9 @@ void InstanceKlass::print_class_load_cause_logging() const { |
4009 | 4010 | stringStream stack_stream; |
4010 | 4011 | char buf[O_BUFLEN]; |
4011 | 4012 | address lastpc = nullptr; |
4012 | | - if (os::platform_print_native_stack(&stack_stream, nullptr, buf, O_BUFLEN, lastpc)) { |
4013 | | - // We have printed the native stack in platform-specific code, |
4014 | | - // so nothing else to do in this case. |
4015 | | - } else { |
4016 | | - frame f = os::current_frame(); |
4017 | | - VMError::print_native_stack(&stack_stream, f, current, true /*print_source_info */, |
4018 | | - -1 /* max stack_stream */, buf, O_BUFLEN); |
4019 | | - } |
| 4013 | + NativeStackPrinter nsp(current); |
| 4014 | + nsp.print_stack(&stack_stream, buf, sizeof(buf), lastpc, |
| 4015 | + true /* print_source_info */, -1 /* max stack */); |
4020 | 4016 |
|
4021 | 4017 | LogMessage(class, load, cause, native) msg; |
4022 | 4018 | NonInterleavingLogStream info_stream{LogLevelType::Info, msg}; |
|
0 commit comments