sun.jvm.hotspot.memory.SystemDictionary Java Examples

The following examples show how to use sun.jvm.hotspot.memory.SystemDictionary. 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: CommandProcessor.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
public void doit(Tokens t) {
    if (t.countTokens() != 0) {
        usage();
    } else {
        SystemDictionary sysDict = VM.getVM().getSystemDictionary();
        sysDict.allClassesDo(new SystemDictionary.ClassVisitor() {
                public void visit(Klass k) {
                    if (k instanceof InstanceKlass && ((InstanceKlass)k).getConstants().getCache() != null) {
                        MethodArray methods = ((InstanceKlass)k).getMethods();
                        for (int i = 0; i < methods.length(); i++) {
                            Method m = methods.at(i);
                            HTMLGenerator gen = new HTMLGenerator(false);
                            out.println(gen.genHTML(m));
                        }
                    }
                }
            }
            );
    }
}
 
Example #2
Source File: CommandProcessor.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
public void doit(Tokens t) {
    if (t.countTokens() != 0) {
        usage();
    } else {
        SystemDictionary sysDict = VM.getVM().getSystemDictionary();
        sysDict.allClassesDo(new SystemDictionary.ClassVisitor() {
                public void visit(Klass k) {
                    if (k instanceof InstanceKlass && ((InstanceKlass)k).getConstants().getCache() != null) {
                        MethodArray methods = ((InstanceKlass)k).getMethods();
                        for (int i = 0; i < methods.length(); i++) {
                            Method m = methods.at(i);
                            HTMLGenerator gen = new HTMLGenerator(false);
                            out.println(gen.genHTML(m));
                        }
                    }
                }
            }
            );
    }
}
 
Example #3
Source File: CommandProcessor.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
public void doit(Tokens t) {
    if (t.countTokens() != 0) {
        usage();
    } else {
        SystemDictionary sysDict = VM.getVM().getSystemDictionary();
        sysDict.allClassesDo(new SystemDictionary.ClassVisitor() {
                public void visit(Klass k) {
                    if (k instanceof InstanceKlass && ((InstanceKlass)k).getConstants().getCache() != null) {
                        MethodArray methods = ((InstanceKlass)k).getMethods();
                        for (int i = 0; i < methods.length(); i++) {
                            Method m = methods.at(i);
                            HTMLGenerator gen = new HTMLGenerator(false);
                            out.println(gen.genHTML(m));
                        }
                    }
                }
            }
            );
    }
}
 
Example #4
Source File: CommandProcessor.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
public void doit(Tokens t) {
    if (t.countTokens() != 0) {
        usage();
    } else {
        SystemDictionary sysDict = VM.getVM().getSystemDictionary();
        sysDict.allClassesDo(new SystemDictionary.ClassVisitor() {
                public void visit(Klass k) {
                    if (k instanceof InstanceKlass && ((InstanceKlass)k).getConstants().getCache() != null) {
                        MethodArray methods = ((InstanceKlass)k).getMethods();
                        for (int i = 0; i < methods.length(); i++) {
                            Method m = methods.at(i);
                            HTMLGenerator gen = new HTMLGenerator(false);
                            out.println(gen.genHTML(m));
                        }
                    }
                }
            }
            );
    }
}
 
Example #5
Source File: CommandProcessor.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
public void doit(Tokens t) {
    if (t.countTokens() != 0) {
        usage();
    } else {
        SystemDictionary sysDict = VM.getVM().getSystemDictionary();
        sysDict.allClassesDo(new SystemDictionary.ClassVisitor() {
                public void visit(Klass k) {
                    if (k instanceof InstanceKlass && ((InstanceKlass)k).getConstants().getCache() != null) {
                        MethodArray methods = ((InstanceKlass)k).getMethods();
                        for (int i = 0; i < methods.length(); i++) {
                            Method m = methods.at(i);
                            HTMLGenerator gen = new HTMLGenerator(false);
                            out.println(gen.genHTML(m));
                        }
                    }
                }
            }
            );
    }
}
 
Example #6
Source File: CommandProcessor.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
public void doit(Tokens t) {
    if (t.countTokens() != 0) {
        usage();
    } else {
        SystemDictionary sysDict = VM.getVM().getSystemDictionary();
        sysDict.allClassesDo(new SystemDictionary.ClassVisitor() {
                public void visit(Klass k) {
                    if (k instanceof InstanceKlass && ((InstanceKlass)k).getConstants().getCache() != null) {
                        MethodArray methods = ((InstanceKlass)k).getMethods();
                        for (int i = 0; i < methods.length(); i++) {
                            Method m = methods.at(i);
                            HTMLGenerator gen = new HTMLGenerator(false);
                            out.println(gen.genHTML(m));
                        }
                    }
                }
            }
            );
    }
}
 
Example #7
Source File: CommandProcessor.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
public void doit(Tokens t) {
    if (t.countTokens() != 0) {
        usage();
    } else {
        SystemDictionary sysDict = VM.getVM().getSystemDictionary();
        sysDict.allClassesDo(new SystemDictionary.ClassVisitor() {
                public void visit(Klass k) {
                    if (k instanceof InstanceKlass && ((InstanceKlass)k).getConstants().getCache() != null) {
                        MethodArray methods = ((InstanceKlass)k).getMethods();
                        for (int i = 0; i < methods.length(); i++) {
                            Method m = methods.at(i);
                            HTMLGenerator gen = new HTMLGenerator(false);
                            out.println(gen.genHTML(m));
                        }
                    }
                }
            }
            );
    }
}
 
Example #8
Source File: CommandProcessor.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
public void doit(Tokens t) {
    if (t.countTokens() != 0) {
        usage();
    } else {
        SystemDictionary sysDict = VM.getVM().getSystemDictionary();
        sysDict.allClassesDo(new SystemDictionary.ClassVisitor() {
                public void visit(Klass k) {
                    if (k instanceof InstanceKlass && ((InstanceKlass)k).getConstants().getCache() != null) {
                        MethodArray methods = ((InstanceKlass)k).getMethods();
                        for (int i = 0; i < methods.length(); i++) {
                            Method m = methods.at(i);
                            HTMLGenerator gen = new HTMLGenerator(false);
                            out.println(gen.genHTML(m));
                        }
                    }
                }
            }
            );
    }
}
 
Example #9
Source File: ClassLoaderReferenceImpl.java    From openjdk-8-source with GNU General Public License v2.0 4 votes vote down vote up
private SystemDictionary getSystemDictionary() {
    return vm.saSystemDictionary();
}
 
Example #10
Source File: ClassLoaderReferenceImpl.java    From hottub with GNU General Public License v2.0 4 votes vote down vote up
private SystemDictionary getSystemDictionary() {
    return vm.saSystemDictionary();
}
 
Example #11
Source File: VirtualMachineImpl.java    From hottub with GNU General Public License v2.0 4 votes vote down vote up
SystemDictionary saSystemDictionary() {
    return saSystemDictionary;
}
 
Example #12
Source File: VirtualMachineImpl.java    From hottub with GNU General Public License v2.0 4 votes vote down vote up
private void retrieveAllClasses() {
    final List saKlasses = new ArrayList();
    SystemDictionary.ClassVisitor visitor = new SystemDictionary.ClassVisitor() {
            public void visit(Klass k) {
                for (Klass l = k; l != null; l = l.arrayKlassOrNull()) {
                    // for non-array classes filter out un-prepared classes
                    // refer to 'allClasses' in share/back/VirtualMachineImpl.c
                    if (l instanceof ArrayKlass) {
                       saKlasses.add(l);
                    } else {
                       int status = l.getClassStatus();
                       if ((status & JVMDIClassStatus.PREPARED) != 0) {
                           saKlasses.add(l);
                       }
                    }
                }
            }
    };

    // refer to jvmtiGetLoadedClasses.cpp - getLoadedClasses in VM code.

    // classes from SystemDictionary
    saSystemDictionary.classesDo(visitor);

    // From SystemDictionary we do not get primitive single
    // dimensional array classes. add primitive single dimensional array
    // klasses from Universe.
    saVM.getUniverse().basicTypeClassesDo(visitor);

    // Hold lock during processing to improve performance
    // and to have safe check/set of retrievedAllTypes
    synchronized (this) {
        if (!retrievedAllTypes) {
            // Number of classes
            int count = saKlasses.size();
            for (int ii = 0; ii < count; ii++) {
                Klass kk = (Klass)saKlasses.get(ii);
                ReferenceTypeImpl type = referenceType(kk);
            }
            retrievedAllTypes = true;
        }
    }
}
 
Example #13
Source File: VirtualMachineImpl.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
SystemDictionary saSystemDictionary() {
    return saSystemDictionary;
}
 
Example #14
Source File: VirtualMachineImpl.java    From openjdk-8-source with GNU General Public License v2.0 4 votes vote down vote up
SystemDictionary saSystemDictionary() {
    return saSystemDictionary;
}
 
Example #15
Source File: VirtualMachineImpl.java    From openjdk-8-source with GNU General Public License v2.0 4 votes vote down vote up
private void retrieveAllClasses() {
    final List saKlasses = new ArrayList();
    SystemDictionary.ClassVisitor visitor = new SystemDictionary.ClassVisitor() {
            public void visit(Klass k) {
                for (Klass l = k; l != null; l = l.arrayKlassOrNull()) {
                    // for non-array classes filter out un-prepared classes
                    // refer to 'allClasses' in share/back/VirtualMachineImpl.c
                    if (l instanceof ArrayKlass) {
                       saKlasses.add(l);
                    } else {
                       int status = l.getClassStatus();
                       if ((status & JVMDIClassStatus.PREPARED) != 0) {
                           saKlasses.add(l);
                       }
                    }
                }
            }
    };

    // refer to jvmtiGetLoadedClasses.cpp - getLoadedClasses in VM code.

    // classes from SystemDictionary
    saSystemDictionary.classesDo(visitor);

    // From SystemDictionary we do not get primitive single
    // dimensional array classes. add primitive single dimensional array
    // klasses from Universe.
    saVM.getUniverse().basicTypeClassesDo(visitor);

    // Hold lock during processing to improve performance
    // and to have safe check/set of retrievedAllTypes
    synchronized (this) {
        if (!retrievedAllTypes) {
            // Number of classes
            int count = saKlasses.size();
            for (int ii = 0; ii < count; ii++) {
                Klass kk = (Klass)saKlasses.get(ii);
                ReferenceTypeImpl type = referenceType(kk);
            }
            retrievedAllTypes = true;
        }
    }
}
 
Example #16
Source File: ClassLoaderReferenceImpl.java    From openjdk-8 with GNU General Public License v2.0 4 votes vote down vote up
private SystemDictionary getSystemDictionary() {
    return vm.saSystemDictionary();
}
 
Example #17
Source File: VirtualMachineImpl.java    From openjdk-8 with GNU General Public License v2.0 4 votes vote down vote up
SystemDictionary saSystemDictionary() {
    return saSystemDictionary;
}
 
Example #18
Source File: VirtualMachineImpl.java    From openjdk-8 with GNU General Public License v2.0 4 votes vote down vote up
private void retrieveAllClasses() {
    final List saKlasses = new ArrayList();
    SystemDictionary.ClassVisitor visitor = new SystemDictionary.ClassVisitor() {
            public void visit(Klass k) {
                for (Klass l = k; l != null; l = l.arrayKlassOrNull()) {
                    // for non-array classes filter out un-prepared classes
                    // refer to 'allClasses' in share/back/VirtualMachineImpl.c
                    if (l instanceof ArrayKlass) {
                       saKlasses.add(l);
                    } else {
                       int status = l.getClassStatus();
                       if ((status & JVMDIClassStatus.PREPARED) != 0) {
                           saKlasses.add(l);
                       }
                    }
                }
            }
    };

    // refer to jvmtiGetLoadedClasses.cpp - getLoadedClasses in VM code.

    // classes from SystemDictionary
    saSystemDictionary.classesDo(visitor);

    // From SystemDictionary we do not get primitive single
    // dimensional array classes. add primitive single dimensional array
    // klasses from Universe.
    saVM.getUniverse().basicTypeClassesDo(visitor);

    // Hold lock during processing to improve performance
    // and to have safe check/set of retrievedAllTypes
    synchronized (this) {
        if (!retrievedAllTypes) {
            // Number of classes
            int count = saKlasses.size();
            for (int ii = 0; ii < count; ii++) {
                Klass kk = (Klass)saKlasses.get(ii);
                ReferenceTypeImpl type = referenceType(kk);
            }
            retrievedAllTypes = true;
        }
    }
}
 
Example #19
Source File: VirtualMachineImpl.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
private void retrieveAllClasses() {
    final List saKlasses = new ArrayList();
    SystemDictionary.ClassVisitor visitor = new SystemDictionary.ClassVisitor() {
            public void visit(Klass k) {
                for (Klass l = k; l != null; l = l.arrayKlassOrNull()) {
                    // for non-array classes filter out un-prepared classes
                    // refer to 'allClasses' in share/back/VirtualMachineImpl.c
                    if (l instanceof ArrayKlass) {
                       saKlasses.add(l);
                    } else {
                       int status = l.getClassStatus();
                       if ((status & JVMDIClassStatus.PREPARED) != 0) {
                           saKlasses.add(l);
                       }
                    }
                }
            }
    };

    // refer to jvmtiGetLoadedClasses.cpp - getLoadedClasses in VM code.

    // classes from SystemDictionary
    saSystemDictionary.classesDo(visitor);

    // From SystemDictionary we do not get primitive single
    // dimensional array classes. add primitive single dimensional array
    // klasses from Universe.
    saVM.getUniverse().basicTypeClassesDo(visitor);

    // Hold lock during processing to improve performance
    // and to have safe check/set of retrievedAllTypes
    synchronized (this) {
        if (!retrievedAllTypes) {
            // Number of classes
            int count = saKlasses.size();
            for (int ii = 0; ii < count; ii++) {
                Klass kk = (Klass)saKlasses.get(ii);
                ReferenceTypeImpl type = referenceType(kk);
            }
            retrievedAllTypes = true;
        }
    }
}
 
Example #20
Source File: ClassLoaderReferenceImpl.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
private SystemDictionary getSystemDictionary() {
    return vm.saSystemDictionary();
}
 
Example #21
Source File: VirtualMachineImpl.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
private void retrieveAllClasses() {
    final List saKlasses = new ArrayList();
    SystemDictionary.ClassVisitor visitor = new SystemDictionary.ClassVisitor() {
            public void visit(Klass k) {
                for (Klass l = k; l != null; l = l.arrayKlassOrNull()) {
                    // for non-array classes filter out un-prepared classes
                    // refer to 'allClasses' in share/back/VirtualMachineImpl.c
                    if (l instanceof ArrayKlass) {
                       saKlasses.add(l);
                    } else {
                       int status = l.getClassStatus();
                       if ((status & JVMDIClassStatus.PREPARED) != 0) {
                           saKlasses.add(l);
                       }
                    }
                }
            }
    };

    // refer to jvmtiGetLoadedClasses.cpp - getLoadedClasses in VM code.

    // classes from SystemDictionary
    saSystemDictionary.classesDo(visitor);

    // From SystemDictionary we do not get primitive single
    // dimensional array classes. add primitive single dimensional array
    // klasses from Universe.
    saVM.getUniverse().basicTypeClassesDo(visitor);

    // Hold lock during processing to improve performance
    // and to have safe check/set of retrievedAllTypes
    synchronized (this) {
        if (!retrievedAllTypes) {
            // Number of classes
            int count = saKlasses.size();
            for (int ii = 0; ii < count; ii++) {
                Klass kk = (Klass)saKlasses.get(ii);
                ReferenceTypeImpl type = referenceType(kk);
            }
            retrievedAllTypes = true;
        }
    }
}
 
Example #22
Source File: VirtualMachineImpl.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
SystemDictionary saSystemDictionary() {
    return saSystemDictionary;
}
 
Example #23
Source File: ClassLoaderReferenceImpl.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
private SystemDictionary getSystemDictionary() {
    return vm.saSystemDictionary();
}
 
Example #24
Source File: VirtualMachineImpl.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
private void retrieveAllClasses() {
    final List saKlasses = new ArrayList();
    SystemDictionary.ClassVisitor visitor = new SystemDictionary.ClassVisitor() {
            public void visit(Klass k) {
                for (Klass l = k; l != null; l = l.arrayKlassOrNull()) {
                    // for non-array classes filter out un-prepared classes
                    // refer to 'allClasses' in share/back/VirtualMachineImpl.c
                    if (l instanceof ArrayKlass) {
                       saKlasses.add(l);
                    } else {
                       int status = l.getClassStatus();
                       if ((status & JVMDIClassStatus.PREPARED) != 0) {
                           saKlasses.add(l);
                       }
                    }
                }
            }
    };

    // refer to jvmtiGetLoadedClasses.cpp - getLoadedClasses in VM code.

    // classes from SystemDictionary
    saSystemDictionary.classesDo(visitor);

    // From SystemDictionary we do not get primitive single
    // dimensional array classes. add primitive single dimensional array
    // klasses from Universe.
    saVM.getUniverse().basicTypeClassesDo(visitor);

    // Hold lock during processing to improve performance
    // and to have safe check/set of retrievedAllTypes
    synchronized (this) {
        if (!retrievedAllTypes) {
            // Number of classes
            int count = saKlasses.size();
            for (int ii = 0; ii < count; ii++) {
                Klass kk = (Klass)saKlasses.get(ii);
                ReferenceTypeImpl type = referenceType(kk);
            }
            retrievedAllTypes = true;
        }
    }
}
 
Example #25
Source File: VirtualMachineImpl.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
SystemDictionary saSystemDictionary() {
    return saSystemDictionary;
}
 
Example #26
Source File: ClassLoaderReferenceImpl.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
private SystemDictionary getSystemDictionary() {
    return vm.saSystemDictionary();
}
 
Example #27
Source File: VirtualMachineImpl.java    From TencentKona-8 with GNU General Public License v2.0 4 votes vote down vote up
private void retrieveAllClasses() {
    final List saKlasses = new ArrayList();
    SystemDictionary.ClassVisitor visitor = new SystemDictionary.ClassVisitor() {
            public void visit(Klass k) {
                for (Klass l = k; l != null; l = l.arrayKlassOrNull()) {
                    // for non-array classes filter out un-prepared classes
                    // refer to 'allClasses' in share/back/VirtualMachineImpl.c
                    if (l instanceof ArrayKlass) {
                       saKlasses.add(l);
                    } else {
                       int status = l.getClassStatus();
                       if ((status & JVMDIClassStatus.PREPARED) != 0) {
                           saKlasses.add(l);
                       }
                    }
                }
            }
    };

    // refer to jvmtiGetLoadedClasses.cpp - getLoadedClasses in VM code.

    // classes from SystemDictionary
    saSystemDictionary.classesDo(visitor);

    // From SystemDictionary we do not get primitive single
    // dimensional array classes. add primitive single dimensional array
    // klasses from Universe.
    saVM.getUniverse().basicTypeClassesDo(visitor);

    // Hold lock during processing to improve performance
    // and to have safe check/set of retrievedAllTypes
    synchronized (this) {
        if (!retrievedAllTypes) {
            // Number of classes
            int count = saKlasses.size();
            for (int ii = 0; ii < count; ii++) {
                Klass kk = (Klass)saKlasses.get(ii);
                ReferenceTypeImpl type = referenceType(kk);
            }
            retrievedAllTypes = true;
        }
    }
}
 
Example #28
Source File: VirtualMachineImpl.java    From TencentKona-8 with GNU General Public License v2.0 4 votes vote down vote up
SystemDictionary saSystemDictionary() {
    return saSystemDictionary;
}
 
Example #29
Source File: ClassLoaderReferenceImpl.java    From TencentKona-8 with GNU General Public License v2.0 4 votes vote down vote up
private SystemDictionary getSystemDictionary() {
    return vm.saSystemDictionary();
}