Update of /cvsroot/javaprofiler/library/src/setup
In directory usw-pr-cvs1:/tmp/cvs-serv12170/src/setup
Modified Files:
Makefile.rules dir.info setup.cpp setup.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/setup/Makefile.rules,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** Makefile.rules 2001/07/26 22:44:10 1.1
--- Makefile.rules 2001/11/21 22:31:49 1.2
***************
*** 1,3 ****
setup.o \
! setup.obj: setup.cpp ../main/includes.h
$(CCC) $(CPPFLAGS) setup.cpp
--- 1,3 ----
setup.o \
! setup.obj: setup.cpp
$(CCC) $(CPPFLAGS) setup.cpp
Index: dir.info
===================================================================
RCS file: /cvsroot/javaprofiler/library/src/setup/dir.info,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** dir.info 2001/07/26 22:44:10 1.1
--- dir.info 2001/11/21 22:31:49 1.2
***************
*** 1,3 ****
FILES = setup
-
CLEAN_FILES = *.pdb *.obj *.o
--- 1,2 ----
Index: setup.cpp
===================================================================
RCS file: /cvsroot/javaprofiler/library/src/setup/setup.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** setup.cpp 2001/09/02 20:14:22 1.6
--- setup.cpp 2001/11/21 22:31:49 1.7
***************
*** 33,37 ****
*/
! #include "../main/includes.h"
Setup::Setup( char* options) {
--- 33,38 ----
*/
! #include "../setup/setup.h"
! #include "../main/const.h"
Setup::Setup( char* options) {
***************
*** 230,235 ****
if( !strcmp( name, "commun_type")) {
! if( !strcmp( value, "socket")) com.communType = IProf::COMMUN_SOCKET;
! else if( !strcmp( value, "shmem")) com.communType = IProf::COMMUN_SHMEM;
return;
--- 231,236 ----
if( !strcmp( name, "commun_type")) {
! if( !strcmp( value, "socket")) com.communType = COMMUN_SOCKET;
! else if( !strcmp( value, "shmem")) com.communType = COMMUN_SHMEM;
return;
Index: setup.h
===================================================================
RCS file: /cvsroot/javaprofiler/library/src/setup/setup.h,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -r1.9 -r1.10
*** setup.h 2001/09/23 16:50:15 1.9
--- setup.h 2001/11/21 22:31:49 1.10
***************
*** 36,39 ****
--- 36,42 ----
#define _SETUP_H_
+ #include "../main/includes.h"
+ #include "../string/string.h"
+
/** Profiler setup parameters.
** The parameters are obtained from command line during
***************
*** 45,50 ****
public:
/// profiling granularity levels
! enum LEVEL {
LEVEL_OBJECT,
--- 48,73 ----
public:
+ /// constants
+ enum e {
+
+ /// default TCP port
+ COMMUN_PORT = 25595,
+
+ /// default shared memory size (in bytes)
+ COMMUN_SHMEM_SIZE = 256*1024
+ };
+
+ /// type of communication
+ enum eCommunType {
+
+ /// sockets (TCP/IP)
+ COMMUN_SOCKET,
+
+ /// shared memory
+ COMMUN_SHMEM
+ };
+
/// profiling granularity levels
! enum eLEVEL {
LEVEL_OBJECT,
***************
*** 63,67 ****
** and LEVEL_TRACE. */
! LEVEL level;
/// trace depth
--- 86,90 ----
** and LEVEL_TRACE. */
! eLEVEL level;
/// trace depth
***************
*** 84,88 ****
** Possible values are LEVEL_METHOD and LEVEL_TRACE. */
! LEVEL level;
/// trace depth
--- 107,111 ----
** Possible values are LEVEL_METHOD and LEVEL_TRACE. */
! eLEVEL level;
/// trace depth
***************
*** 102,106 ****
** Possible values are LEVEL_METHOD and LEVEL_TRACE. */
! LEVEL level;
/// trace depth
--- 125,129 ----
** Possible values are LEVEL_METHOD and LEVEL_TRACE. */
! eLEVEL level;
/// trace depth
***************
*** 115,119 ****
/// type of communication
! IProf::eCommunType communType;
/// connect mode (0 = server, 1 = client)
--- 138,142 ----
/// type of communication
! eCommunType communType;
/// connect mode (0 = server, 1 = client)
***************
*** 135,149 ****
Com() :
! communType( IProf::COMMUN_SOCKET),
connectMode( 0),
hostname( "127.0.0.1"),
! port( IProf::COMMUN_PORT),
! shmemSize( IProf::COMMUN_SHMEM_SIZE),
shmemId( "com") // don't change, used in Java IProf, too
! {};
};
/// memory profiling
--- 158,174 ----
Com() :
! communType( COMMUN_SOCKET),
connectMode( 0),
hostname( "127.0.0.1"),
! port( COMMUN_PORT),
! shmemSize( COMMUN_SHMEM_SIZE),
shmemId( "com") // don't change, used in Java IProf, too
! {}
};
+
+ public:
/// memory profiling
|