Java Code Examples for sun.jvm.hotspot.oops.Metadata#instantiateWrapperFor()
The following examples show how to use
sun.jvm.hotspot.oops.Metadata#instantiateWrapperFor() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: RobustOopDeterminator.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 6 votes |
public static boolean oopLooksValid(OopHandle oop) { if (oop == null) { return false; } if (!VM.getVM().getUniverse().isIn(oop)) { return false; } try { // Try to instantiate the Klass if (VM.getVM().isCompressedKlassPointersEnabled()) { Metadata.instantiateWrapperFor(oop.getCompKlassAddressAt(klassField.getOffset())); } else { Metadata.instantiateWrapperFor(klassField.getValue(oop)); } return true; } catch (AddressException e) { return false; } }
Example 2
Source File: RobustOopDeterminator.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
public static boolean oopLooksValid(OopHandle oop) { if (oop == null) { return false; } if (!VM.getVM().getUniverse().isIn(oop)) { return false; } try { // Try to instantiate the Klass if (VM.getVM().isCompressedKlassPointersEnabled()) { Metadata.instantiateWrapperFor(oop.getCompKlassAddressAt(klassField.getOffset())); } else { Metadata.instantiateWrapperFor(klassField.getValue(oop)); } return true; } catch (AddressException e) { return false; } }
Example 3
Source File: RobustOopDeterminator.java From openjdk-8-source with GNU General Public License v2.0 | 6 votes |
public static boolean oopLooksValid(OopHandle oop) { if (oop == null) { return false; } if (!VM.getVM().getUniverse().isIn(oop)) { return false; } try { // Try to instantiate the Klass if (VM.getVM().isCompressedKlassPointersEnabled()) { Metadata.instantiateWrapperFor(oop.getCompKlassAddressAt(klassField.getOffset())); } else { Metadata.instantiateWrapperFor(klassField.getValue(oop)); } return true; } catch (AddressException e) { return false; } }
Example 4
Source File: RobustOopDeterminator.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
public static boolean oopLooksValid(OopHandle oop) { if (oop == null) { return false; } if (!VM.getVM().getUniverse().isIn(oop)) { return false; } try { // Try to instantiate the Klass if (VM.getVM().isCompressedKlassPointersEnabled()) { Metadata.instantiateWrapperFor(oop.getCompKlassAddressAt(klassField.getOffset())); } else { Metadata.instantiateWrapperFor(klassField.getValue(oop)); } return true; } catch (AddressException e) { return false; } }
Example 5
Source File: CommandProcessor.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
public void doit(Tokens t) { int tokens = t.countTokens(); if (tokens != 1) { usage(); return; } Address a = VM.getVM().getDebugger().parseAddress(t.nextToken()); Method m = (Method)Metadata.instantiateWrapperFor(a); HTMLGenerator html = new HTMLGenerator(false); out.println(html.genHTML(m)); }
Example 6
Source File: CommandProcessor.java From hottub with GNU General Public License v2.0 | 5 votes |
public void doit(Tokens t) { int tokens = t.countTokens(); if (tokens != 1) { usage(); return; } Address a = VM.getVM().getDebugger().parseAddress(t.nextToken()); Method m = (Method)Metadata.instantiateWrapperFor(a); HTMLGenerator html = new HTMLGenerator(false); out.println(html.genHTML(m)); }
Example 7
Source File: CommandProcessor.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
public void doit(Tokens t) { int tokens = t.countTokens(); if (tokens != 1) { usage(); return; } Address a = VM.getVM().getDebugger().parseAddress(t.nextToken()); Method m = (Method)Metadata.instantiateWrapperFor(a); HTMLGenerator html = new HTMLGenerator(false); out.println(html.genHTML(m)); }
Example 8
Source File: CommandProcessor.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
public void doit(Tokens t) { int tokens = t.countTokens(); if (tokens != 1) { usage(); return; } Address a = VM.getVM().getDebugger().parseAddress(t.nextToken()); Method m = (Method)Metadata.instantiateWrapperFor(a); HTMLGenerator html = new HTMLGenerator(false); out.println(html.genHTML(m)); }
Example 9
Source File: CommandProcessor.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
public void doit(Tokens t) { int tokens = t.countTokens(); if (tokens != 1) { usage(); return; } Address a = VM.getVM().getDebugger().parseAddress(t.nextToken()); Method m = (Method)Metadata.instantiateWrapperFor(a); HTMLGenerator html = new HTMLGenerator(false); out.println(html.genHTML(m)); }
Example 10
Source File: KlassArray.java From jdk8u60 with GNU General Public License v2.0 | 4 votes |
public Klass getAt(int i) { return (Klass) Metadata.instantiateWrapperFor(getAddressAt(i)); }
Example 11
Source File: CommandProcessor.java From openjdk-8 with GNU General Public License v2.0 | 4 votes |
public void doit(Tokens t) { if (t.countTokens() != 1) { usage(); return; } String name = t.nextToken(); Address a = null; try { a = VM.getVM().getDebugger().parseAddress(name); } catch (NumberFormatException e) { } if (a != null) { // only nmethod, Method, MethodData and InstanceKlass needed to // dump replay data CodeBlob cb = VM.getVM().getCodeCache().findBlob(a); if (cb != null && (cb instanceof NMethod)) { ((NMethod)cb).dumpReplayData(out); return; } // assume it is Metadata Metadata meta = Metadata.instantiateWrapperFor(a); if (meta != null) { meta.dumpReplayData(out); } else { usage(); return; } } // Not an address boolean all = name.equals("-a"); Threads threads = VM.getVM().getThreads(); for (JavaThread thread = threads.first(); thread != null; thread = thread.next()) { ByteArrayOutputStream bos = new ByteArrayOutputStream(); thread.printThreadIDOn(new PrintStream(bos)); if (all || bos.toString().equals(name)) { if (thread instanceof CompilerThread) { CompilerThread ct = (CompilerThread)thread; ciEnv env = ct.env(); if (env != null) { env.dumpReplayData(out); } } } } }
Example 12
Source File: CommandProcessor.java From openjdk-8-source with GNU General Public License v2.0 | 4 votes |
public void doit(Tokens t) { if (t.countTokens() != 1) { usage(); return; } String name = t.nextToken(); Address a = null; try { a = VM.getVM().getDebugger().parseAddress(name); } catch (NumberFormatException e) { } if (a != null) { // only nmethod, Method, MethodData and InstanceKlass needed to // dump replay data CodeBlob cb = VM.getVM().getCodeCache().findBlob(a); if (cb != null && (cb instanceof NMethod)) { ((NMethod)cb).dumpReplayData(out); return; } // assume it is Metadata Metadata meta = Metadata.instantiateWrapperFor(a); if (meta != null) { meta.dumpReplayData(out); } else { usage(); return; } } // Not an address boolean all = name.equals("-a"); Threads threads = VM.getVM().getThreads(); for (JavaThread thread = threads.first(); thread != null; thread = thread.next()) { ByteArrayOutputStream bos = new ByteArrayOutputStream(); thread.printThreadIDOn(new PrintStream(bos)); if (all || bos.toString().equals(name)) { if (thread instanceof CompilerThread) { CompilerThread ct = (CompilerThread)thread; ciEnv env = ct.env(); if (env != null) { env.dumpReplayData(out); } } } } }
Example 13
Source File: MethodArray.java From openjdk-jdk8u with GNU General Public License v2.0 | 4 votes |
public Method at(int i) { return (Method) Metadata.instantiateWrapperFor(getAddressAt(i)); }
Example 14
Source File: MethodArray.java From openjdk-8 with GNU General Public License v2.0 | 4 votes |
public Method at(int i) { return (Method) Metadata.instantiateWrapperFor(getAddressAt(i)); }
Example 15
Source File: KlassArray.java From openjdk-jdk8u with GNU General Public License v2.0 | 4 votes |
public Klass getAt(int i) { return (Klass) Metadata.instantiateWrapperFor(getAddressAt(i)); }
Example 16
Source File: MethodArray.java From openjdk-8-source with GNU General Public License v2.0 | 4 votes |
public Method at(int i) { return (Method) Metadata.instantiateWrapperFor(getAddressAt(i)); }
Example 17
Source File: MethodArray.java From hottub with GNU General Public License v2.0 | 4 votes |
public Method at(int i) { return (Method) Metadata.instantiateWrapperFor(getAddressAt(i)); }
Example 18
Source File: MethodArray.java From openjdk-jdk9 with GNU General Public License v2.0 | 4 votes |
public Method at(int i) { return (Method) Metadata.instantiateWrapperFor(getAddressAt(i)); }
Example 19
Source File: CommandProcessor.java From TencentKona-8 with GNU General Public License v2.0 | 4 votes |
public void doit(Tokens t) { if (t.countTokens() != 1) { usage(); return; } String name = t.nextToken(); Address a = null; try { a = VM.getVM().getDebugger().parseAddress(name); } catch (NumberFormatException e) { } if (a != null) { // only nmethod, Method, MethodData and InstanceKlass needed to // dump replay data CodeBlob cb = VM.getVM().getCodeCache().findBlob(a); if (cb != null && (cb instanceof NMethod)) { ((NMethod)cb).dumpReplayData(out); return; } // assume it is Metadata Metadata meta = Metadata.instantiateWrapperFor(a); if (meta != null) { meta.dumpReplayData(out); } else { usage(); return; } } // Not an address boolean all = name.equals("-a"); Threads threads = VM.getVM().getThreads(); for (JavaThread thread = threads.first(); thread != null; thread = thread.next()) { ByteArrayOutputStream bos = new ByteArrayOutputStream(); thread.printThreadIDOn(new PrintStream(bos)); if (all || bos.toString().equals(name)) { if (thread instanceof CompilerThread) { CompilerThread ct = (CompilerThread)thread; ciEnv env = ct.env(); if (env != null) { env.dumpReplayData(out); } } } } }
Example 20
Source File: KlassArray.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 4 votes |
public Klass getAt(int i) { return (Klass) Metadata.instantiateWrapperFor(getAddressAt(i)); }