comparison agent/src/share/classes/sun/jvm/hotspot/code/NMethod.java @ 3939:f6f3bb0ee072

7088955: add C2 IR support to the SA Reviewed-by: kvn
author never
date Sun, 11 Sep 2011 14:48:24 -0700
parents 7588156f5cf9
children da91efe96a93
comparison
equal deleted inserted replaced
3938:e6b1331a51d2 3939:f6f3bb0ee072
1 /* 1 /*
2 * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 2000, 2011, 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.
188 public boolean scopesDataContains (Address addr) { return scopesDataBegin() .lessThanOrEqual(addr) && scopesDataEnd() .greaterThan(addr); } 188 public boolean scopesDataContains (Address addr) { return scopesDataBegin() .lessThanOrEqual(addr) && scopesDataEnd() .greaterThan(addr); }
189 public boolean scopesPCsContains (Address addr) { return scopesPCsBegin() .lessThanOrEqual(addr) && scopesPCsEnd() .greaterThan(addr); } 189 public boolean scopesPCsContains (Address addr) { return scopesPCsBegin() .lessThanOrEqual(addr) && scopesPCsEnd() .greaterThan(addr); }
190 public boolean handlerTableContains(Address addr) { return handlerTableBegin().lessThanOrEqual(addr) && handlerTableEnd().greaterThan(addr); } 190 public boolean handlerTableContains(Address addr) { return handlerTableBegin().lessThanOrEqual(addr) && handlerTableEnd().greaterThan(addr); }
191 public boolean nulChkTableContains (Address addr) { return nulChkTableBegin() .lessThanOrEqual(addr) && nulChkTableEnd() .greaterThan(addr); } 191 public boolean nulChkTableContains (Address addr) { return nulChkTableBegin() .lessThanOrEqual(addr) && nulChkTableEnd() .greaterThan(addr); }
192 192
193 public int getOopsLength() { return (int) (oopsSize() / VM.getVM().getOopSize()); }
194
193 /** Entry points */ 195 /** Entry points */
194 public Address getEntryPoint() { return entryPointField.getValue(addr); } 196 public Address getEntryPoint() { return entryPointField.getValue(addr); }
195 public Address getVerifiedEntryPoint() { return verifiedEntryPointField.getValue(addr); } 197 public Address getVerifiedEntryPoint() { return verifiedEntryPointField.getValue(addr); }
196 198
197 /** Support for oops in scopes and relocs. Note: index 0 is reserved for null. */ 199 /** Support for oops in scopes and relocs. Note: index 0 is reserved for null. */
198 public OopHandle getOopAt(int index) { 200 public OopHandle getOopAt(int index) {
199 if (index == 0) return null; 201 if (index == 0) return null;
200 if (Assert.ASSERTS_ENABLED) { 202 if (Assert.ASSERTS_ENABLED) {
201 Assert.that(index > 0 && index <= oopsSize(), "must be a valid non-zero index"); 203 Assert.that(index > 0 && index <= getOopsLength(), "must be a valid non-zero index");
202 } 204 }
203 return oopsBegin().getOopHandleAt((index - 1) * VM.getVM().getOopSize()); 205 return oopsBegin().getOopHandleAt((index - 1) * VM.getVM().getOopSize());
204 } 206 }
205 207
206 // FIXME: add interpreter_entry_point() 208 // FIXME: add interpreter_entry_point()