Java Doc for JVMTIInterface.java in  » Profiler » jboss-profiler » org » jboss » profiler » jvmti » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Profiler » jboss profiler » org.jboss.profiler.jvmti 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.jboss.profiler.jvmti.JVMTIInterface

JVMTIInterface
public class JVMTIInterface implements JVMTIInterfaceMBean(Code)

author:
   Clebert Suconic

Inner Class :static class ClassSorterByClassLoader implements Comparator
Inner Class :static class ClassSorterByClassName implements Comparator
Inner Class :static class Dummy implements Serializable
Inner Class :static class InnerCallBack implements JVMTICallBack



Method Summary
public  booleancompareInventories(PrintStream reportOutput, Map map1, Map map2, Class[] ignoredClasses, String[] prefixesToIgnore, InventoryDataPoint[] expectedIncreases)
     It will return true if the comparisson didn't represent any changes. This can be used by JUnitTests to validate the consumption of the memory is on the expected results.
Parameters:
  reportOutput - You could set System.out here.
public  HashMapcreateIndexMatrix()
     This method tags the JVM and return an index.
public  StringexploreClassReferences(String className, int maxLevel, boolean solveReferencesOnClasses, boolean solveReferencesOnClassLoaders, boolean useToString, boolean weakAndSoft, boolean printObjects)
     Show the reference holders tree of an object
Parameters:
  className - The name of the class to explore
Parameters:
  maxLevel - The number of levels to explode.
public  StringexploreClassReferences(String className, int maxLevel, boolean solveReferencesOnClasses, boolean solveReferencesOnClassLoaders, boolean useToString, boolean weakAndSoft, boolean printObjects, HashMap referencesMap)
    
public  StringexploreObjectReferences(String className, int maxLevel, boolean useToString)
     Show the reference holders tree of an object.
public  StringexploreObjectReferences(HashMap referencesMap, Object thatObject, int maxLevel, boolean useToString)
     Show the reference holders tree of an object.
native public  voidforceGC()
     Force a GC.
public  voidforceReleaseOnSoftReferences()
     Forces an OutOfMemoryError and releases the memory immediatly.
native public  Object[]getAllObjects(Class clazz)
     Will return all methods of a give class.
public  Object[]getAllObjects(String clazz)
     Return every single object on a give class by its name.
public  ClassgetClassByName(String className)
    
native public  Class[]getLoadedClasses()
    
native public  ClassgetMethodClass(long methodId)
    
native public  StringgetMethodName(long methodId)
    
native public  StringgetMethodSignature(long methodId)
    
public  FieldgetObjectField(Class clazz, int fieldId)
     Returns the field represted by the FieldId.
native public  ObjectgetObjectOnTag(long tag)
    
native public  Object[]getReferenceHolders(Object[] objects)
     Will get all the objects holding references to these objects passed by parameter.
native public  longgetTagOnObject(Object obj)
    
native protected static  voidheapSnapshot(String classesFileName, String referencesFileName, String objectsFileName)
    
public  voidheapSnapshot(String basicFileName, String suffix)
    
public  StringinventoryReport()
     Will list the current memory inventory.
public  booleanisActive()
    
public  StringlistClassesHTMLReport()
     Will show a report of every class loaded on this JVM.
native public  voidnotifyInventory(boolean notifyOnClasses, String temporaryFileReferences, String temporaryFileObjects, JVMTICallBack callback)
     This method will keep every object tagged for later usage.
public  voidnotifyOnReferences(String temporaryFile, JVMTICallBack callback)
    
public  StringprintObjects(String className)
     Will print a report of every instance of the class passed by parameter.
public  MapproduceInventory()
     Returns a WeakHashMap summarizing the current JVM's inventory.
native public  voidreleaseTags()
     Will release internal tags used by previous methods.
public  Field[]retrieveAllFields(Class clazz)
    
public  Class[]retrieveLoadedClasses()
    
public  CollectionretrieveLoadedClassesByClassLoader()
    
public  CollectionretrieveLoadedClassesByClassName()
    
public  ObjecttreatReference(String level, PrintWriter out, ReferenceDataPoint point, boolean useToString)
     This is used by JSPs to have access to internal features formating results according to the navigations.



Method Detail
compareInventories
public boolean compareInventories(PrintStream reportOutput, Map map1, Map map2, Class[] ignoredClasses, String[] prefixesToIgnore, InventoryDataPoint[] expectedIncreases)(Code)
It will return true if the comparisson didn't represent any changes. This can be used by JUnitTests to validate the consumption of the memory is on the expected results.
Parameters:
  reportOutput - You could set System.out here. The location where logging information is going to be sent.
Parameters:
  map1 - The first snapshot.
Parameters:
  map2 - The second snapshot.
Parameters:
  ignoredClasses - Classes you want to ignore on the comparisson. Used to ignore things you know are going to be produced and you don't have control over the testcase.
Parameters:
  prefixesToIgnore - Same thing as classes, but every classes starting with these prefixes are going to be ignored.
Parameters:
  expectedIncreases - An array of InventoryDataPoint with the maximum number of instances each class could be generating. true if the assertion is okay



createIndexMatrix
public HashMap createIndexMatrix() throws IOException(Code)
This method tags the JVM and return an index. You can navigate through references using this returned HashMap. This method can't be exposed through JMX as it would serialize a huge amount of data. HashMap referencees>



exploreClassReferences
public String exploreClassReferences(String className, int maxLevel, boolean solveReferencesOnClasses, boolean solveReferencesOnClassLoaders, boolean useToString, boolean weakAndSoft, boolean printObjects)(Code)
Show the reference holders tree of an object
Parameters:
  className - The name of the class to explore
Parameters:
  maxLevel - The number of levels to explode. Be careful as if you put this number too high, you migh endup in a forever loop, specially if your object is referencing something too generic
Parameters:
  solveReferencesOnClass - Will expose the tree on the class
Parameters:
  solveReferencesOnClassLoader - Will expode the tree on the classLoader (I mostly recommend to only look for classLoader's references)
Parameters:
  useToString - If true, will use toString when an object is printed. If False will use className@
Parameters:
  weakAndSoft - If false, won't detail references on Weak and Soft References
Parameters:
  printObject - If true, Will print (with toString) every single instance of the object passed as parameter



exploreClassReferences
public String exploreClassReferences(String className, int maxLevel, boolean solveReferencesOnClasses, boolean solveReferencesOnClassLoaders, boolean useToString, boolean weakAndSoft, boolean printObjects, HashMap referencesMap)(Code)
This is an overload to reuse the matrix index in case you already have indexed the JVM



exploreObjectReferences
public String exploreObjectReferences(String className, int maxLevel, boolean useToString)(Code)
Show the reference holders tree of an object. This method is also exposed through MBean.



exploreObjectReferences
public String exploreObjectReferences(HashMap referencesMap, Object thatObject, int maxLevel, boolean useToString)(Code)
Show the reference holders tree of an object. This returns a report you can visualize through MBean.



forceGC
native public void forceGC()(Code)
Force a GC. This method doesn't use System.gc. If JVMTI is enabled this will really cause a FullGC by calling a JVMTI function.



forceReleaseOnSoftReferences
public void forceReleaseOnSoftReferences()(Code)
Forces an OutOfMemoryError and releases the memory immediatly. This will force SoftReferences to go away.



getAllObjects
native public Object[] getAllObjects(Class clazz)(Code)
Will return all methods of a give class. This will change tags, be careful if you are on the middle of navitations.



getAllObjects
public Object[] getAllObjects(String clazz)(Code)
Return every single object on a give class by its name. This method will look for every single class with this name, and if more than one classLoader is loading a class with this name, this method will return objects for all the respective classes. For example if you look for a Structs Action Form, this will return every ActionForm defined on the current JVM.



getClassByName
public Class getClassByName(String className)(Code)
returns the first class found with a given name



getLoadedClasses
native public Class[] getLoadedClasses()(Code)



getMethodClass
native public Class getMethodClass(long methodId)(Code)



getMethodName
native public String getMethodName(long methodId)(Code)



getMethodSignature
native public String getMethodSignature(long methodId)(Code)



getObjectField
public Field getObjectField(Class clazz, int fieldId)(Code)
Returns the field represted by the FieldId. This is used on field relationships according to the rule determined by JVMTI documentation.



getObjectOnTag
native public Object getObjectOnTag(long tag)(Code)
Will return the object on a tag



getReferenceHolders
native public Object[] getReferenceHolders(Object[] objects)(Code)
Will get all the objects holding references to these objects passed by parameter. This method is going to release tags, be careful if you are on the middle of navigations.



getTagOnObject
native public long getTagOnObject(Object obj)(Code)
Will return the tag of an object



heapSnapshot
native protected static void heapSnapshot(String classesFileName, String referencesFileName, String objectsFileName)(Code)



heapSnapshot
public void heapSnapshot(String basicFileName, String suffix)(Code)
Will call JVMTIInterface.heapSnapshot(String,String,String) passing "_classes, _references, _objects in the name of the files



inventoryReport
public String inventoryReport() throws Exception(Code)
Will list the current memory inventory. Exposed through JMX.



isActive
public boolean isActive()(Code)
Returns true if -agentlib:jbossAgent was configured properly



listClassesHTMLReport
public String listClassesHTMLReport() throws Exception(Code)
Will show a report of every class loaded on this JVM. At the beggining of the report you will see duplicated classes (classes loaded in more than one classLoader)



notifyInventory
native public void notifyInventory(boolean notifyOnClasses, String temporaryFileReferences, String temporaryFileObjects, JVMTICallBack callback)(Code)
This method will keep every object tagged for later usage. This method is going to tag objects.



notifyOnReferences
public void notifyOnReferences(String temporaryFile, JVMTICallBack callback)(Code)



printObjects
public String printObjects(String className) throws Exception(Code)
Will print a report of every instance of the class passed by parameter. Exposed through JMX .



produceInventory
public Map produceInventory() throws IOException(Code)
Returns a WeakHashMap summarizing the current JVM's inventory.



releaseTags
native public void releaseTags()(Code)
Will release internal tags used by previous methods. All the navigations through JVMTI are done through tagging. Calling this method will release any tagging done by previous methods.



retrieveAllFields
public Field[] retrieveAllFields(Class clazz)(Code)



retrieveLoadedClasses
public Class[] retrieveLoadedClasses()(Code)



retrieveLoadedClassesByClassLoader
public Collection retrieveLoadedClassesByClassLoader()(Code)
Used by JSPs and JMX to report



retrieveLoadedClassesByClassName
public Collection retrieveLoadedClassesByClassName()(Code)
Used by JSPs and JMX to report



treatReference
public Object treatReference(String level, PrintWriter out, ReferenceDataPoint point, boolean useToString)(Code)
This is used by JSPs to have access to internal features formating results according to the navigations. That's the only reason this method is public. This is not intended to be used as part of the public API.



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.