Java Doc for ProfilerClient.java in  » IDE-Netbeans » cvsclient » org » netbeans » lib » profiler » 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 » IDE Netbeans » cvsclient » org.netbeans.lib.profiler 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.netbeans.lib.profiler.ProfilerClient

ProfilerClient
public class ProfilerClient implements CommonConstants(Code)
The interface between the tool and the profiling back end.
author:
   Tomas Hurka
author:
   Misha Dmitriev
author:
   Adrian Mos
author:
   Ian Formanek



Constructor Summary
public  ProfilerClient(ProfilerEngineSettings settings, ProfilingSessionStatus status, AppStatusHandler ash, AppStatusHandler.ServerCommandHandler sch)
    

Method Summary
public synchronized  booleancpuResultsExist()
    
public  booleancurrentInstrTypeIsMemoryProfiling()
    
public  booleancurrentInstrTypeIsRecursiveCPUProfiling()
    
public  voiddeinstrumentMemoryProfiledClasses(boolean[] unprofiledClassStatusArray)
     Removes instrumentation for classes with ids such that unprofiledClassStatusArray[id] == false.
public synchronized  voiddetachFromTargetJVM()
    
public  booleanestablishConnectionWithServer(int attachMode, boolean calibrationOnlyRun)
    
public  booleanforceObtainedResultsDump()
     Tells the server to send the contents of its data buffer to the tool immediately, no matter whether it's full or not.
public  booleanforceObtainedResultsDump(boolean liveResults, int retries)
    
public  booleanforceObtainedResultsDump(boolean liveResults)
     Tells the server to send the contents of its data buffer to the tool immediately, no matter whether it's full or not.
public synchronized  int[]getAllocatedObjectsCountResults()
     Returns the array where element at index I is the total number of allocated objects for the class with I id.
public synchronized  CPUResultsSnapshotgetCPUProfilingResultsSnapshot()
    
public synchronized  CPUResultsSnapshotgetCPUProfilingResultsSnapshot(boolean dump)
    
public synchronized  CodeRegionResultsSnapshotgetCodeRegionProfilingResultsSnapshot()
    
public  intgetCurrentAgentId()
    
public  intgetCurrentInstrType()
    
public synchronized  byte[]getCurrentThreadsLivenessStatus()
     Determine which of the currently tracked threads are dead or alive.
public synchronized  intgetDefiningClassLoaderId(String className, int initiatingLoaderId)
     For the class with the given name and the initiating class loader (see Java Language/JVM Spec for definitions), find out and return the defining class loader.
public  FlatProfileProvidergetFlatProfileProvider()
    
public  longgetInstrProcessingTime()
    
public synchronized  InternalStatsResponsegetInternalStats()
    
public  CCTResultsFiltergetMarkFilter()
    
public  MemoryCCTProvidergetMemoryCCTProvider()
    
public synchronized  MemoryResultsSnapshotgetMemoryProfilingResultsSnapshot()
    
public synchronized  MemoryResultsSnapshotgetMemoryProfilingResultsSnapshot(boolean dump)
    
public  MarkergetMethodMarker()
    
public synchronized  String[][]getMethodNamesForJMethodIds(int[] methodIds)
     Called to obtain method names for jMethodIds, that we do not know method names of.
public synchronized  MonitoredDatagetMonitoredData()
    
public  ProfilerEngineSettingsgetSettings()
    
public  ObjectInputStreamgetSocketInputStream()
     We are using this essentially to let user know when the longest part of what happens after hitting e.g. "Instrument Object Allocation", is complete.
public  ProfilingSessionStatusgetStatus()
    
public  TimeCollectorgetTimeCollector()
    
public  voidinitiateCodeRegionInstrumentation(ClientUtils.SourceCodeSelection[] s)
     This should be called to initiate code region instrumentation for specified code region. The data is remembered or sent to the server immediately if TA is already running.
public  voidinitiateMemoryProfInstrumentation(int instrType)
     This should be called to initiate memory profiling instrumentation of specified type (object allocation or object liveness). The data is remembered or sent to the server immediately if TA is already running.
public  voidinitiateRecursiveCPUProfInstrumentation(ClientUtils.SourceCodeSelection[] s)
     This should be called to initiate CPU profiling instrumentation starting from specified root method(s). The data is remembered or sent to the server immediately if TA is already running.
public synchronized  booleanmemoryResultsExist()
    
public  voidregisterCPUCCTProvider(CPUCCTProvider provider)
    
public  voidregisterFlatProfileProvider(FlatProfileProvider provider)
    
public  voidregisterMarkFilter(CCTResultsFilter filter)
    
public  voidregisterMemoryCCTProvider(MemoryCCTProvider provider)
    
public  voidregisterTimeCollector(TimeCollector collector)
    
public  voidremoveAllInstrumentation(boolean cleanupClient)
    
public  voidremoveAllInstrumentation()
    
public  voidresetClientData()
     If the target VM is terminated, cleans up all localy cached data so that they can be GCd from the memory.
public synchronized  voidresetProfilerCollectors()
    
public synchronized  voidresumeTargetAppThreads()
    
public synchronized  voidrunGC()
    
public  voidsendSetInstrumentationParamsCmd(boolean changeableOnly)
    
public  voidsetCurrentInstrType(int type)
    
public  booleanstartTargetApp(boolean sendExplicitStartCommand)
     This method is called both when the application is started by the tool, and when the tool attaches to a running application.
public synchronized  voidsuspendTargetAppThreads()
    
public synchronized  booleantakeHeapDump(String outputFile)
    
public  booleantargetAppIsRunning()
    
public  booleantargetJVMIsAlive()
    
public synchronized  voidterminateTargetJVM()
    


Constructor Detail
ProfilerClient
public ProfilerClient(ProfilerEngineSettings settings, ProfilingSessionStatus status, AppStatusHandler ash, AppStatusHandler.ServerCommandHandler sch)(Code)




Method Detail
cpuResultsExist
public synchronized boolean cpuResultsExist() throws ClientUtils.TargetAppOrVMTerminated(Code)



currentInstrTypeIsMemoryProfiling
public boolean currentInstrTypeIsMemoryProfiling()(Code)



currentInstrTypeIsRecursiveCPUProfiling
public boolean currentInstrTypeIsRecursiveCPUProfiling()(Code)



deinstrumentMemoryProfiledClasses
public void deinstrumentMemoryProfiledClasses(boolean[] unprofiledClassStatusArray) throws InstrumentationException, ClientUtils.TargetAppOrVMTerminated(Code)
Removes instrumentation for classes with ids such that unprofiledClassStatusArray[id] == false. For these classes, no memory profiling data will be generated anymore.



detachFromTargetJVM
public synchronized void detachFromTargetJVM() throws ClientUtils.TargetAppOrVMTerminated(Code)



establishConnectionWithServer
public boolean establishConnectionWithServer(int attachMode, boolean calibrationOnlyRun)(Code)
This is called in all modes, direct invoke or attachment, to establish connection with the target VM
Parameters:
  attachMode - 0 = no attach, 1 = direct attach, 2 = dynamic attach



forceObtainedResultsDump
public boolean forceObtainedResultsDump() throws ClientUtils.TargetAppOrVMTerminated(Code)
Tells the server to send the contents of its data buffer to the tool immediately, no matter whether it's full or not.



forceObtainedResultsDump
public boolean forceObtainedResultsDump(boolean liveResults, int retries) throws ClientUtils.TargetAppOrVMTerminated(Code)



forceObtainedResultsDump
public boolean forceObtainedResultsDump(boolean liveResults) throws ClientUtils.TargetAppOrVMTerminated(Code)
Tells the server to send the contents of its data buffer to the tool immediately, no matter whether it's full or not.



getAllocatedObjectsCountResults
public synchronized int[] getAllocatedObjectsCountResults() throws ClientUtils.TargetAppOrVMTerminated(Code)
Returns the array where element at index I is the total number of allocated objects for the class with I id. The relevant counters are kept at the server side and returned to the tool on demand, here.



getCPUProfilingResultsSnapshot
public synchronized CPUResultsSnapshot getCPUProfilingResultsSnapshot() throws ClientUtils.TargetAppOrVMTerminated, CPUResultsSnapshot.NoDataAvailableException(Code)
Returns the snapshot of current multi-method CPU profiling results CPU Results snapshot
throws:
  ClientUtils.TargetAppOrVMTerminated - In case the profiled application has already terminated
throws:
  CPUResultsSnapshot.NoDataAvailableException - If no data are available yet



getCPUProfilingResultsSnapshot
public synchronized CPUResultsSnapshot getCPUProfilingResultsSnapshot(boolean dump) throws ClientUtils.TargetAppOrVMTerminated, CPUResultsSnapshot.NoDataAvailableException(Code)
Returns the snapshot of current multi-method CPU profiling results
Parameters:
  dump - true to fetch latest events from server, false otherwise (use only available data) CPU Results snapshot
throws:
  ClientUtils.TargetAppOrVMTerminated - In case the profiled application has already terminated
throws:
  CPUResultsSnapshot.NoDataAvailableException - If no data are available yet



getCodeRegionProfilingResultsSnapshot
public synchronized CodeRegionResultsSnapshot getCodeRegionProfilingResultsSnapshot() throws ClientUtils.TargetAppOrVMTerminated(Code)
Returns the snapshot of current code region profiling results



getCurrentAgentId
public int getCurrentAgentId()(Code)



getCurrentInstrType
public int getCurrentInstrType()(Code)



getCurrentThreadsLivenessStatus
public synchronized byte[] getCurrentThreadsLivenessStatus()(Code)
Determine which of the currently tracked threads are dead or alive. If the VM is not running, just returns null - it's clear that all threads are dead then.



getDefiningClassLoaderId
public synchronized int getDefiningClassLoaderId(String className, int initiatingLoaderId) throws ClientUtils.TargetAppOrVMTerminated(Code)
For the class with the given name and the initiating class loader (see Java Language/JVM Spec for definitions), find out and return the defining class loader. Both class loaders are internal class loader ids.



getFlatProfileProvider
public FlatProfileProvider getFlatProfileProvider()(Code)



getInstrProcessingTime
public long getInstrProcessingTime()(Code)



getInternalStats
public synchronized InternalStatsResponse getInternalStats() throws ClientUtils.TargetAppOrVMTerminated(Code)



getMarkFilter
public CCTResultsFilter getMarkFilter()(Code)



getMemoryCCTProvider
public MemoryCCTProvider getMemoryCCTProvider()(Code)



getMemoryProfilingResultsSnapshot
public synchronized MemoryResultsSnapshot getMemoryProfilingResultsSnapshot() throws ClientUtils.TargetAppOrVMTerminated(Code)
Returns the snapshot of current Memory profiling results Memory Results snapshot
throws:
  ClientUtils.TargetAppOrVMTerminated - In case the profiled application has already terminated



getMemoryProfilingResultsSnapshot
public synchronized MemoryResultsSnapshot getMemoryProfilingResultsSnapshot(boolean dump) throws ClientUtils.TargetAppOrVMTerminated(Code)
Returns the snapshot of current Memory profiling results
Parameters:
  dump - true to fetch latest events from server, false otherwise (use only available data) Memory Results snapshot
throws:
  ClientUtils.TargetAppOrVMTerminated - In case the profiled application has already terminated



getMethodMarker
public Marker getMethodMarker()(Code)



getMethodNamesForJMethodIds
public synchronized String[][] getMethodNamesForJMethodIds(int[] methodIds) throws ClientUtils.TargetAppOrVMTerminated(Code)
Called to obtain method names for jMethodIds, that we do not know method names of. This method is typically called when results are to be displayed, but also in case some classes are unloaded in the profiled application, as in this case we would lost method names for already accumulated results.

Assumption is that jMethodId is never reused inside the JVM.
Parameters:
  methodIds - array of jMethodIds that we do not have names for the 3xn array, containing triplets of {class name, method name, method signature} strings forgiven jmethodIds




getMonitoredData
public synchronized MonitoredData getMonitoredData()(Code)



getSettings
public ProfilerEngineSettings getSettings()(Code)
ProfilerEngineSettings current profiler engine settings



getSocketInputStream
public ObjectInputStream getSocketInputStream()(Code)
We are using this essentially to let user know when the longest part of what happens after hitting e.g. "Instrument Object Allocation", is complete. Otherwise it might be difficult to figure out what's going on



getStatus
public ProfilingSessionStatus getStatus()(Code)



getTimeCollector
public TimeCollector getTimeCollector()(Code)



initiateCodeRegionInstrumentation
public void initiateCodeRegionInstrumentation(ClientUtils.SourceCodeSelection[] s) throws ClassNotFoundException, BadLocationException, InstrumentationException, IOException, ClassFormatError, ClientUtils.TargetAppOrVMTerminated(Code)
This should be called to initiate code region instrumentation for specified code region. The data is remembered or sent to the server immediately if TA is already running. The actual instrumentation starts when server informs the tool that the class to be instrumented is loaded.



initiateMemoryProfInstrumentation
public void initiateMemoryProfInstrumentation(int instrType) throws ClientUtils.TargetAppOrVMTerminated, InstrumentationException(Code)
This should be called to initiate memory profiling instrumentation of specified type (object allocation or object liveness). The data is remembered or sent to the server immediately if TA is already running. The actual instrumentation starts when the TA is started and the first class of this app is loaded, or immediately if TA is already running.



initiateRecursiveCPUProfInstrumentation
public void initiateRecursiveCPUProfInstrumentation(ClientUtils.SourceCodeSelection[] s) throws ClassNotFoundException, BadLocationException, InstrumentationException, IOException, ClassFormatError, ClientUtils.TargetAppOrVMTerminated(Code)
This should be called to initiate CPU profiling instrumentation starting from specified root method(s). The data is remembered or sent to the server immediately if TA is already running. The actual instrumentation starts when server informs the tool that one of the classes to be instrumented is loaded.



memoryResultsExist
public synchronized boolean memoryResultsExist()(Code)



registerCPUCCTProvider
public void registerCPUCCTProvider(CPUCCTProvider provider)(Code)



registerFlatProfileProvider
public void registerFlatProfileProvider(FlatProfileProvider provider)(Code)



registerMarkFilter
public void registerMarkFilter(CCTResultsFilter filter)(Code)



registerMemoryCCTProvider
public void registerMemoryCCTProvider(MemoryCCTProvider provider)(Code)



registerTimeCollector
public void registerTimeCollector(TimeCollector collector)(Code)



removeAllInstrumentation
public void removeAllInstrumentation(boolean cleanupClient) throws InstrumentationException(Code)



removeAllInstrumentation
public void removeAllInstrumentation() throws InstrumentationException(Code)



resetClientData
public void resetClientData()(Code)
If the target VM is terminated, cleans up all localy cached data so that they can be GCd from the memory. If the TA is running, this method does nothing.



resetProfilerCollectors
public synchronized void resetProfilerCollectors() throws ClientUtils.TargetAppOrVMTerminated(Code)



resumeTargetAppThreads
public synchronized void resumeTargetAppThreads() throws ClientUtils.TargetAppOrVMTerminated(Code)



runGC
public synchronized void runGC() throws ClientUtils.TargetAppOrVMTerminated(Code)



sendSetInstrumentationParamsCmd
public void sendSetInstrumentationParamsCmd(boolean changeableOnly) throws ClientUtils.TargetAppOrVMTerminated(Code)



setCurrentInstrType
public void setCurrentInstrType(int type)(Code)



startTargetApp
public boolean startTargetApp(boolean sendExplicitStartCommand) throws ClientUtils.TargetAppOrVMTerminated, ClientUtils.TargetAppFailedToStart(Code)
This method is called both when the application is started by the tool, and when the tool attaches to a running application. It's called *after* the establishConnectionWithServer() above. sendExplicitStartCommand actually determines the mode - it's true if we really start the VM as opposed to attaching.



suspendTargetAppThreads
public synchronized void suspendTargetAppThreads() throws ClientUtils.TargetAppOrVMTerminated(Code)



takeHeapDump
public synchronized boolean takeHeapDump(String outputFile) throws ClientUtils.TargetAppOrVMTerminated(Code)



targetAppIsRunning
public boolean targetAppIsRunning()(Code)



targetJVMIsAlive
public boolean targetJVMIsAlive()(Code)



terminateTargetJVM
public synchronized void terminateTargetJVM() throws ClientUtils.TargetAppOrVMTerminated(Code)



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.