< prev index next >

src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/InterpretedVFrame.java

Print this page


   1 /*
   2  * Copyright (c) 2000, 2009, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   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
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *


  91       // Find stack location
  92       Address addr = addressOfExpressionStackAt(i);
  93 
  94       // Depending on oop/int put it in the right package
  95       StackValue sv;
  96       if (oopMask.isOop(i + nofLocals)) {
  97         // oop value
  98         sv = new StackValue(addr.getOopHandleAt(0), 0);
  99       } else {
 100         // integer
 101         // Fetch a signed integer the size of a stack slot
 102         sv = new StackValue(addr.getCIntegerAt(0, VM.getVM().getAddressSize(), false));
 103       }
 104       result.add(sv);
 105     }
 106 
 107     return result;
 108   }
 109 
 110   /** Returns List<MonitorInfo> */
 111   public List   getMonitors() {
 112     List result = new ArrayList(5);
 113     for (BasicObjectLock current = getFrame().interpreterFrameMonitorEnd();
 114          current.address().lessThan(getFrame().interpreterFrameMonitorBegin().address());
 115          current = getFrame().nextMonitorInInterpreterFrame(current)) {
 116       result.add(new MonitorInfo(current.obj(), current.lock(), false, false));
 117     }
 118     return result;
 119   }
 120 
 121   /** Test operation */
 122   public boolean isInterpretedFrame() { return true; }
 123 
 124   /** Package-internal constructor */
 125   InterpretedVFrame(Frame fr, RegisterMap regMap, JavaThread thread) {
 126     super(fr, regMap, thread);
 127   }
 128 
 129   /** Accessor for Byte Code Index (NOTE: access to BCP is not allowed
 130       in this system; see Frame.java) */
 131   public int getBCI() {
 132     return getFrame().getInterpreterFrameBCI();


   1 /*
   2  * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   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
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *


  91       // Find stack location
  92       Address addr = addressOfExpressionStackAt(i);
  93 
  94       // Depending on oop/int put it in the right package
  95       StackValue sv;
  96       if (oopMask.isOop(i + nofLocals)) {
  97         // oop value
  98         sv = new StackValue(addr.getOopHandleAt(0), 0);
  99       } else {
 100         // integer
 101         // Fetch a signed integer the size of a stack slot
 102         sv = new StackValue(addr.getCIntegerAt(0, VM.getVM().getAddressSize(), false));
 103       }
 104       result.add(sv);
 105     }
 106 
 107     return result;
 108   }
 109 
 110   /** Returns List<MonitorInfo> */
 111   public List<MonitorInfo> getMonitors() {
 112     List<MonitorInfo> result = new ArrayList<>(5);
 113     for (BasicObjectLock current = getFrame().interpreterFrameMonitorEnd();
 114          current.address().lessThan(getFrame().interpreterFrameMonitorBegin().address());
 115          current = getFrame().nextMonitorInInterpreterFrame(current)) {
 116       result.add(new MonitorInfo(current.obj(), current.lock(), false, false));
 117     }
 118     return result;
 119   }
 120 
 121   /** Test operation */
 122   public boolean isInterpretedFrame() { return true; }
 123 
 124   /** Package-internal constructor */
 125   InterpretedVFrame(Frame fr, RegisterMap regMap, JavaThread thread) {
 126     super(fr, regMap, thread);
 127   }
 128 
 129   /** Accessor for Byte Code Index (NOTE: access to BCP is not allowed
 130       in this system; see Frame.java) */
 131   public int getBCI() {
 132     return getFrame().getInterpreterFrameBCI();


< prev index next >