src/hotspot/share/services/heapDumper.cpp
changeset 48105 8d15b1369c7a
parent 47765 b7c7428eaab9
child 48787 7638bf98a312
equal deleted inserted replaced
48096:513e0b467a92 48105:8d15b1369c7a
    37 #include "oops/oop.inline.hpp"
    37 #include "oops/oop.inline.hpp"
    38 #include "runtime/javaCalls.hpp"
    38 #include "runtime/javaCalls.hpp"
    39 #include "runtime/jniHandles.hpp"
    39 #include "runtime/jniHandles.hpp"
    40 #include "runtime/os.hpp"
    40 #include "runtime/os.hpp"
    41 #include "runtime/reflectionUtils.hpp"
    41 #include "runtime/reflectionUtils.hpp"
       
    42 #include "runtime/thread.inline.hpp"
       
    43 #include "runtime/threadSMR.hpp"
    42 #include "runtime/vframe.hpp"
    44 #include "runtime/vframe.hpp"
    43 #include "runtime/vmThread.hpp"
    45 #include "runtime/vmThread.hpp"
    44 #include "runtime/vm_operations.hpp"
    46 #include "runtime/vm_operations.hpp"
    45 #include "services/heapDumper.hpp"
    47 #include "services/heapDumper.hpp"
    46 #include "services/threadService.hpp"
    48 #include "services/threadService.hpp"
  1893   writer()->write_u4(0);                    // thread number
  1895   writer()->write_u4(0);                    // thread number
  1894   writer()->write_u4(0);                    // frame count
  1896   writer()->write_u4(0);                    // frame count
  1895 
  1897 
  1896   _stack_traces = NEW_C_HEAP_ARRAY(ThreadStackTrace*, Threads::number_of_threads(), mtInternal);
  1898   _stack_traces = NEW_C_HEAP_ARRAY(ThreadStackTrace*, Threads::number_of_threads(), mtInternal);
  1897   int frame_serial_num = 0;
  1899   int frame_serial_num = 0;
  1898   for (JavaThread* thread = Threads::first(); thread != NULL ; thread = thread->next()) {
  1900   for (JavaThreadIteratorWithHandle jtiwh; JavaThread *thread = jtiwh.next(); ) {
  1899     oop threadObj = thread->threadObj();
  1901     oop threadObj = thread->threadObj();
  1900     if (threadObj != NULL && !thread->is_exiting() && !thread->is_hidden_from_external_view()) {
  1902     if (threadObj != NULL && !thread->is_exiting() && !thread->is_hidden_from_external_view()) {
  1901       // dump thread stack trace
  1903       // dump thread stack trace
  1902       ThreadStackTrace* stack_trace = new ThreadStackTrace(thread, false);
  1904       ThreadStackTrace* stack_trace = new ThreadStackTrace(thread, false);
  1903       stack_trace->dump_stack_at_safepoint(-1);
  1905       stack_trace->dump_stack_at_safepoint(-1);