src/hotspot/share/services/management.cpp
changeset 53463 b2d1c3b0bd31
parent 53103 67e3a8b3449c
child 53507 44a9dd4e4d96
equal deleted inserted replaced
53462:091ed8f2e7d7 53463:b2d1c3b0bd31
     1 /*
     1 /*
     2  * Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2003, 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.
  1095     // Since we never do the VM op here we must set the threads list.
  1095     // Since we never do the VM op here we must set the threads list.
  1096     dump_result.set_t_list();
  1096     dump_result.set_t_list();
  1097     for (int i = 0; i < num_threads; i++) {
  1097     for (int i = 0; i < num_threads; i++) {
  1098       jlong tid = ids_ah->long_at(i);
  1098       jlong tid = ids_ah->long_at(i);
  1099       JavaThread* jt = dump_result.t_list()->find_JavaThread_from_java_tid(tid);
  1099       JavaThread* jt = dump_result.t_list()->find_JavaThread_from_java_tid(tid);
  1100       ThreadSnapshot* ts;
       
  1101       if (jt == NULL) {
  1100       if (jt == NULL) {
  1102         // if the thread does not exist or now it is terminated,
  1101         // if the thread does not exist or now it is terminated,
  1103         // create dummy snapshot
  1102         // create dummy snapshot
  1104         ts = new ThreadSnapshot();
  1103         dump_result.add_thread_snapshot();
  1105       } else {
  1104       } else {
  1106         ts = new ThreadSnapshot(dump_result.t_list(), jt);
  1105         dump_result.add_thread_snapshot(jt);
  1107       }
  1106       }
  1108       dump_result.add_thread_snapshot(ts);
       
  1109     }
  1107     }
  1110   } else {
  1108   } else {
  1111     // obtain thread dump with the specific list of threads with stack trace
  1109     // obtain thread dump with the specific list of threads with stack trace
  1112     do_thread_dump(&dump_result,
  1110     do_thread_dump(&dump_result,
  1113                    ids_ah,
  1111                    ids_ah,