Update of /cvsroot/javaprofiler/library/src/main
In directory usw-pr-cvs1:/tmp/cvs-serv18629/src/main
Modified Files:
includes.h main.cpp
Removed Files:
main.h
Log Message:
changes in doc
Index: includes.h
===================================================================
RCS file: /cvsroot/javaprofiler/library/src/main/includes.h,v
retrieving revision 1.24
retrieving revision 1.25
diff -C2 -r1.24 -r1.25
*** includes.h 2001/09/02 20:14:21 1.24
--- includes.h 2001/09/18 22:19:28 1.25
***************
*** 107,111 ****
class Setup;
- #include "../main/main.h"
#include "../main/const.h"
#include "../allocator/allocator.h"
--- 107,110 ----
Index: main.cpp
===================================================================
RCS file: /cvsroot/javaprofiler/library/src/main/main.cpp,v
retrieving revision 1.23
retrieving revision 1.24
diff -C2 -r1.23 -r1.24
*** main.cpp 2001/09/02 20:14:21 1.23
--- main.cpp 2001/09/18 22:19:28 1.24
***************
*** 35,74 ****
#include "../main/includes.h"
- /// the one and only instance of Prof class
- static Prof* _prof = NULL;
-
- /** Returns reference to profiler Prof object.
- **
- ** @return reference to Prof object */
-
- Prof& prof() { return *_prof;}
-
- /** Destroy profiler Prof object. It is called
- ** from first Allocator being destroyed. */
-
- void destroyProf() {
-
- Prof* p = _prof;
- _prof = NULL;
-
- if( p) delete p;
- }
-
- /** Universal handler for all JVMPI events. JVM calls this
- ** function for each event it propagates.
- **
- ** Note: the event must be enabled to make this function be called for it.
- **
- ** @param event pointer to JVMPI_Event structure holding the event data
- **
- ** @see JVM_OnLoad(), JVMPI specification
- **
- ** @author Marek Przeczek */
-
- void profNotifyEvent( JVMPI_Event* event) {
-
- if( _prof) _prof->runEvent( event);
- }
-
extern "C" {
--- 35,38 ----
***************
*** 94,101 ****
if( jvm->GetEnv( (void**)&jvmpi_interface, JVMPI_VERSION_1) < 0) return JNI_ERR;
! _prof = new Prof( *(new Setup( options)));
! jvmpi_interface->NotifyEvent = profNotifyEvent;
! _prof->jvmpiInterface = jvmpi_interface;
jvmpi_interface->EnableEvent( JVMPI_EVENT_THREAD_END, NULL);
--- 58,65 ----
if( jvm->GetEnv( (void**)&jvmpi_interface, JVMPI_VERSION_1) < 0) return JNI_ERR;
! Prof* p = Prof::create( options);
! jvmpi_interface->NotifyEvent = Prof::notifyEvent;
! p->jvmpiInterface = jvmpi_interface;
jvmpi_interface->EnableEvent( JVMPI_EVENT_THREAD_END, NULL);
***************
*** 109,113 ****
// jvmpi_interface->EnableEvent( JVMPI_EVENT_COMPILED_METHOD_UNLOAD, NULL);
! if( _prof->setup.cpu.turnedOn && (!_prof->setup.cpu.sampling)) {
jvmpi_interface->EnableEvent( JVMPI_EVENT_METHOD_ENTRY, NULL);
--- 73,77 ----
// jvmpi_interface->EnableEvent( JVMPI_EVENT_COMPILED_METHOD_UNLOAD, NULL);
! if( p->setup.cpu.turnedOn && (!p->setup.cpu.sampling)) {
jvmpi_interface->EnableEvent( JVMPI_EVENT_METHOD_ENTRY, NULL);
***************
*** 116,120 ****
}
! if( _prof->setup.alloc.turnedOn) {
jvmpi_interface->EnableEvent( JVMPI_EVENT_ARENA_DELETE, NULL);
--- 80,84 ----
}
! if( p->setup.alloc.turnedOn) {
jvmpi_interface->EnableEvent( JVMPI_EVENT_ARENA_DELETE, NULL);
***************
*** 131,135 ****
}
! if( _prof->setup.mon.turnedOn) {
jvmpi_interface->EnableEvent( JVMPI_EVENT_MONITOR_CONTENDED_ENTER, NULL);
--- 95,99 ----
}
! if( p->setup.mon.turnedOn) {
jvmpi_interface->EnableEvent( JVMPI_EVENT_MONITOR_CONTENDED_ENTER, NULL);
--- main.h DELETED ---
|