Skip to content

Commit 59b18db

Browse files
committed
Use JavaThread::print_vthread_stack_on
1 parent 76e6e58 commit 59b18db

File tree

1 file changed

+1
-18
lines changed

1 file changed

+1
-18
lines changed

src/hotspot/share/runtime/threads.cpp

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@
5656
#include "nmt/memTracker.hpp"
5757
#include "oops/instanceKlass.hpp"
5858
#include "oops/klass.inline.hpp"
59-
#include "oops/method.inline.hpp"
6059
#include "oops/oop.inline.hpp"
6160
#include "oops/symbol.hpp"
6261
#include "prims/jvm_misc.hpp"
@@ -71,7 +70,6 @@
7170
#include "runtime/java.hpp"
7271
#include "runtime/javaCalls.hpp"
7372
#include "runtime/javaThread.inline.hpp"
74-
#include "runtime/vframe.inline.hpp"
7573
#include "runtime/jniHandles.inline.hpp"
7674
#include "runtime/jniPeriodicChecker.hpp"
7775
#include "runtime/lockStack.inline.hpp"
@@ -1335,22 +1333,7 @@ void Threads::print_on(outputStream* st, bool print_stacks,
13351333
oop vt = p->vthread();
13361334
assert(vt != nullptr, "");
13371335
st->print_cr(" \tCarrying virtual thread #" INT64_FORMAT, (int64_t)java_lang_Thread::thread_id(vt));
1338-
// Very slightly modified copy of what GetStackTraceClosure does
1339-
const int max_depth = MaxJavaStackTraceDepth;
1340-
const bool skip_hidden = !ShowHiddenFrames;
1341-
int total_count = 0;
1342-
for (vframeStream vfst(p, false, false, false); // we don't process frames as we don't care about oops
1343-
!vfst.at_end() && (max_depth == 0 || max_depth != total_count);
1344-
vfst.next()) {
1345-
1346-
if (skip_hidden && (vfst.method()->is_hidden() ||
1347-
vfst.method()->is_continuation_enter_intrinsic())) {
1348-
continue;
1349-
}
1350-
st->print("\t"); // Indent
1351-
java_lang_Throwable::print_stack_element(st, vfst.method(), vfst.bci());
1352-
total_count++;
1353-
}
1336+
p->print_vthread_stack_on(st);
13541337
}
13551338
}
13561339
p->print_stack_on(st);

0 commit comments

Comments
 (0)