Update of /cvsroot/javaprofiler/library/src/gc
In directory usw-pr-cvs1:/tmp/cvs-serv12170/src/gc
Modified Files:
Makefile.rules dir.info gc.cpp gc.h
Log Message:
some parts completely rewritten;
changes in communication interface to make it faster;
ported to linux
Index: Makefile.rules
===================================================================
RCS file: /cvsroot/javaprofiler/library/src/gc/Makefile.rules,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** Makefile.rules 2001/07/28 04:11:17 1.1
--- Makefile.rules 2001/11/21 22:31:43 1.2
***************
*** 1,3 ****
gc.o \
! gc.obj: gc.cpp ../main/includes.h
$(CCC) $(CPPFLAGS) gc.cpp
--- 1,3 ----
gc.o \
! gc.obj: gc.cpp
$(CCC) $(CPPFLAGS) gc.cpp
Index: dir.info
===================================================================
RCS file: /cvsroot/javaprofiler/library/src/gc/dir.info,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** dir.info 2001/07/28 04:11:17 1.1
--- dir.info 2001/11/21 22:31:43 1.2
***************
*** 1,3 ****
FILES = gc
-
CLEAN_FILES = *.pdb *.obj *.o
--- 1,2 ----
Index: gc.cpp
===================================================================
RCS file: /cvsroot/javaprofiler/library/src/gc/gc.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** gc.cpp 2001/09/02 20:14:21 1.2
--- gc.cpp 2001/11/21 22:31:43 1.3
***************
*** 33,37 ****
*/
! #include "../main/includes.h"
! Allocator GC::_allocator( sizeof( GC));
--- 33,50 ----
*/
! #include "../gc/gc.h"
! #ifdef USE_ALLOCATOR
! Allocator GC::_allocator;
! #endif
!
! Buffer& GC::infoToBin( Buffer& b) {
!
! b += usedObjects;
! b += usedObjectSpace;
! b += totalObjectSpace;
! b += (jlong)startTime;
! b += (jlong)endTime;
!
! return b;
! }
Index: gc.h
===================================================================
RCS file: /cvsroot/javaprofiler/library/src/gc/gc.h,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -r1.11 -r1.12
*** gc.h 2001/09/02 20:14:21 1.11
--- gc.h 2001/11/21 22:31:43 1.12
***************
*** 36,39 ****
--- 36,46 ----
#define _GC_H_
+ #include "../main/includes.h"
+ #include "../list/listItem.h"
+ #include "../commun2/idObject.h"
+ #include "../commun/binaryFormat.h"
+ #include "../commun/buffer.h"
+ #include "../allocator/allocator.h"
+
/** Garbage collector profiling data. This class contains
** Java heap statistic data gained by receiving
***************
*** 42,47 ****
** @author Marek Przeczek */
! class GC: public LI1, public IdObject,
! public InfoBinaryFormat {
public:
--- 49,55 ----
** @author Marek Przeczek */
! class GC: public LI1,
! public IdObject,
! public InfoBinaryFormat {
public:
***************
*** 71,76 ****
startTime( 0),
endTime( 0)
! {};
/** Convert info to binary. This method converts information
--- 79,87 ----
startTime( 0),
endTime( 0)
+
+ {}
! /// Destructor.
! virtual ~GC() {}
/** Convert info to binary. This method converts information
***************
*** 81,96 ****
**
** @return reference to same Buffer object as argument 'b' */
-
- virtual Buffer& infoToBin( Buffer& b) {
-
- b += usedObjects;
- b += usedObjectSpace;
- b += totalObjectSpace;
- b += (jlong)startTime;
- b += (jlong)endTime;
! return b;
! }
private:
--- 92,99 ----
**
** @return reference to same Buffer object as argument 'b' */
! virtual Buffer& infoToBin( Buffer& b);
+ #ifdef USE_ALLOCATOR
private:
***************
*** 102,110 ****
/** Overloaded new() operator. */
! void* operator new( size_t) { return _allocator.get();}
/** Overloaded delete() operator. */
void operator delete( void* unit) { _allocator.put( unit);}
public:
--- 105,114 ----
/** Overloaded new() operator. */
! void* operator new( size_t sz) { return _allocator.get( sz);}
/** Overloaded delete() operator. */
void operator delete( void* unit) { _allocator.put( unit);}
+ #endif
public:
|