src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/tools/StackTrace.java
changeset 54955 46409371a691
parent 48113 af9e4669ca18
equal deleted inserted replaced
54954:6ec71a88b68e 54955:46409371a691
     1 /*
     1 /*
     2  * Copyright (c) 2002, 2017, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2002, 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.
    69             ConcurrentLocksPrinter concLocksPrinter = null;
    69             ConcurrentLocksPrinter concLocksPrinter = null;
    70             if (concurrentLocks) {
    70             if (concurrentLocks) {
    71                 concLocksPrinter = new ConcurrentLocksPrinter();
    71                 concLocksPrinter = new ConcurrentLocksPrinter();
    72             }
    72             }
    73             Threads threads = VM.getVM().getThreads();
    73             Threads threads = VM.getVM().getThreads();
    74             int i = 1;
    74             for (int i = 0; i < threads.getNumberOfThreads(); i++) {
    75             for (JavaThread cur = threads.first(); cur != null; cur = cur.next(), i++) {
    75                 JavaThread cur = threads.getJavaThreadAt(i);
    76                 if (cur.isJavaThread()) {
    76                 if (cur.isJavaThread()) {
    77                     cur.printThreadInfoOn(tty);
    77                     cur.printThreadInfoOn(tty);
    78                     try {
    78                     try {
    79                         int count = 0;
    79                         int count = 0;
    80 
    80