src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/tools/PStack.java
changeset 54955 46409371a691
parent 47216 71c04702a3d5
child 58743 083bbca50d2d
equal deleted inserted replaced
54954:6ec71a88b68e 54955:46409371a691
     1 /*
     1 /*
     2  * Copyright (c) 2003, 2017, 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.
   199    private void initJFrameCache() {
   199    private void initJFrameCache() {
   200       // cache frames for subsequent reference
   200       // cache frames for subsequent reference
   201       jframeCache = new HashMap();
   201       jframeCache = new HashMap();
   202       proxyToThread = new HashMap();
   202       proxyToThread = new HashMap();
   203       Threads threads = VM.getVM().getThreads();
   203       Threads threads = VM.getVM().getThreads();
   204       for (JavaThread cur = threads.first(); cur != null; cur = cur.next()) {
   204       for (int i = 0; i < threads.getNumberOfThreads(); i++) {
       
   205          JavaThread cur = threads.getJavaThreadAt(i);
   205          List tmp = new ArrayList(10);
   206          List tmp = new ArrayList(10);
   206          try {
   207          try {
   207             for (JavaVFrame vf = cur.getLastJavaVFrameDbg(); vf != null; vf = vf.javaSender()) {
   208             for (JavaVFrame vf = cur.getLastJavaVFrameDbg(); vf != null; vf = vf.javaSender()) {
   208                tmp.add(vf);
   209                tmp.add(vf);
   209             }
   210             }