Neil, See below for my posting.
Guru -----Original Message----- From: Neil Dunn [mailto:[EMAIL PROTECTED] Sent: Monday, February 26, 2007 5:21 AM To: Nagarajan, Guru; TPTP Tracing and Profiling Tools Project developer discussions Subject: TPTP 4.4 APIs Dear Guru (and tptp-dev) I would like to start building a profiling tool for a University project on top of the latest JVMTI profiler in TPTP 4.4. I would like some pointers as to the APIs I will need to use. The project's aim is to create a tool that will allow a programmer to specify rules about a program's resources (such as time, memory, object count etc) and have these rules evaluated during a profiling session of an application. This is a very good tool and a use case. Wish you the best in this. To do this I will need to instrument the application's bytecode to track resources and record program events such as method entry and exits. [Nagarajan, Guru] You can accomplish this in two ways in TPTP. Either you can consume the Java Profiler to use the ProbeKit (BCI toolkit)[Creating Custom Profilers with Probekit: <http://www.eclipse.org/tptp/platform/documents/probekit/probekit_4.3.ht ml> ( 4.3.0 <http://www.eclipse.org/tptp/platform/documents/probekit/probekit_4.3.ht ml> , 4.2.0 <http://www.eclipse.org/tptp/platform/documents/probekit/probekit.html> )]. I need to understand the Agent Controller / TPTP architecture to be able to start creating this tool. I am unsure whether I will be able to this in straight Java, utilising the TPTP SDKs or whether I will need to extend the Agent Controller. [Nagarajan, Guru] The Agent Controller is a basically a decoupler between the Agent and the client and provides a number of client services. Additional documentation is at Decision Guide for Adopting New Technology Agent Controller <http://help.eclipse.org/help32/topic/org.eclipse.tptp.platform.agentcon troller.doc.isv/concepts/ac/c_dc_fmwk_new_ac_dg.html> . Since you are interested in the Target Application - your primary focus will be on the Agent/Application and the client where you capture this information. * How exactly does the current Eclipse JVMTI profiler work? Is there any documentation describing its design and implementation? How much of the profiling logic is specified in the Eclipse plugin? [Nagarajan, Guru] The TPTP architecture is a layered architecture. The Agent collects runtime data and sends it to the client where in it is loaded into a Data Model. The data model services the data to the user interface. The data model specification for Java profiling is available at http://www.eclipse.org/tptp/platform/documents/resources/profilingspec/X ML4Profiling.htm * Can I direct bytecode instrumentation via a Java API which is then relayed to the Agent Controller or does the agent controller decide how to instrument the program? [Nagarajan, Guru] The Agent Controller is not involved in the Instrumentation. The Profiler runtime is responsible for instrumenting the code. The JVMTI profiler instruments the classes specified by the user in the Launch Configuration [http://www.eclipse.org/tptp/platform/documents/tutorials/jvmti/Java_App lication_Profiling_using_TPTP-r4-3.html]. The API enabling the JVMTI Java profiler has been simplified to provide a fairly simple way to write custom profilers. This API is currently "Provisional". The code for the profiler is in the plugin org.eclipse.tptp.platform.jvmti.runtime. The Client is in the plugin org.eclipse.tptp.platform.jvmti.client and org.eclipse.tptp.trace.jvmti.client. Let me know if you are unable to access the CVS repository and pointers to get started when you access the source. * Is there any example code using the TPTP 4.4 APIs that I could learn from? [Nagarajan, Guru] I would recommend you looking at the JVMTI client and Profiler runtime on how to extend and consume the TPTP framework. * Is Javadoc available for the 4.4 public API? I have not found anything currently? [Nagarajan, Guru] There is java doc generated for the plugins with the daily build. * Does anyone have any immediate thoughts about the project? Useful pointers, example code etc? [Nagarajan, Guru] Yes - part of the use case you are attempting was done in TPTP [the Memory use case]- the work is available as Memory Profiler in TPTP. The source for the Memory Profiler is available in Trace project of TPTP. Let me know if you are unable to access the CVS. Meanwhile, I will try and see if we have any design docs we put together for the Code fragment profiling. I appreciate any help. I think this work will be good for TPTP, I may be able to give useful feedback (or even code patches) based on the work which would help the project. Thanks in advance. Neil Dunn (Imperial College London)
_______________________________________________ tptp-tracing-profiling-tools-dev mailing list tptp-tracing-profiling-tools-dev@eclipse.org https://dev.eclipse.org/mailman/listinfo/tptp-tracing-profiling-tools-dev