You can subscribe to this list here.
2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(73) |
Sep
(92) |
Oct
(9) |
Nov
(80) |
Dec
(60) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
(92) |
Feb
(52) |
Mar
(71) |
Apr
(64) |
May
(53) |
Jun
(10) |
Jul
(111) |
Aug
(93) |
Sep
(134) |
Oct
|
Nov
|
Dec
|
From: Marek P. <ma...@us...> - 2002-01-26 22:50:30
|
Update of /cvsroot/javaprofiler/library/demo/04 In directory usw-pr-cvs1:/tmp/cvs-serv26803/demo/04 Modified Files: Test.java Log Message: fixes of shared memory communication for win32 Index: Test.java =================================================================== RCS file: /cvsroot/javaprofiler/library/demo/04/Test.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** Test.java 2002/01/26 10:19:44 1.2 --- Test.java 2002/01/26 22:50:27 1.3 *************** *** 118,122 **** // initialize and start communication // sockets are used by default ! iprof = new IProf(); iprof.run(); --- 118,122 ---- // initialize and start communication // sockets are used by default ! iprof = new IProf(); iprof.run(); *************** *** 124,134 **** // til profiled program is going, do nothing ! while( !iprof.isShutdowned()) { System.out.println( "waiting..."); Thread.sleep( 1000); ! } ! // profiled program has finished, so ask for all classes askForClasses(); --- 124,134 ---- // til profiled program is going, do nothing ! while( !iprof.isShutdowned()) { System.out.println( "waiting..."); Thread.sleep( 1000); ! } ! // profiled program has finished, so ask for all classes askForClasses(); |
From: Marek P. <ma...@us...> - 2002-01-26 22:50:30
|
Update of /cvsroot/javaprofiler/library/config In directory usw-pr-cvs1:/tmp/cvs-serv26803/config Modified Files: config_x86_linux_gcc302.mk config_x86_win32_vc98.mk Log Message: fixes of shared memory communication for win32 Index: config_x86_linux_gcc302.mk =================================================================== RCS file: /cvsroot/javaprofiler/library/config/config_x86_linux_gcc302.mk,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** config_x86_linux_gcc302.mk 2001/11/25 22:33:47 1.2 --- config_x86_linux_gcc302.mk 2002/01/26 22:50:27 1.3 *************** *** 16,20 **** COMPILER_PATH = /opt/gcc-3.0.2 ! JAVA_PATH = /opt/j2sdk1.4.0-beta3 DOXYGEN_PATH = /opt/doxygen-1.2.12 --- 16,20 ---- COMPILER_PATH = /opt/gcc-3.0.2 ! JAVA_PATH = /opt/j2sdk1.4.0-rc DOXYGEN_PATH = /opt/doxygen-1.2.12 Index: config_x86_win32_vc98.mk =================================================================== RCS file: /cvsroot/javaprofiler/library/config/config_x86_win32_vc98.mk,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** config_x86_win32_vc98.mk 2001/11/25 22:33:47 1.1 --- config_x86_win32_vc98.mk 2002/01/26 22:50:27 1.2 *************** *** 16,20 **** COMPILER_PATH = C:\Program Files\Microsoft Visual Studio\VC98 ! JAVA_PATH = C:\Program Files\j2sdk1.4.0-beta3 DOXYGEN_PATH = C:\Program Files\doxygen-1.2.12 --- 16,20 ---- COMPILER_PATH = C:\Program Files\Microsoft Visual Studio\VC98 ! JAVA_PATH = C:\Program Files\j2sdk1.4.0-rc DOXYGEN_PATH = C:\Program Files\doxygen-1.2.12 *************** *** 51,55 **** LDFLAGS2 = /NOLOGO /DLL /OUT:$(NATIVE_LIBRARY_NAME) ! LDLIBS2 = wsock32.lib CPPFLAGS = /nologo /c $(FLAGS) $(DEFINES) $(INCLUDES) --- 51,55 ---- LDFLAGS2 = /NOLOGO /DLL /OUT:$(NATIVE_LIBRARY_NAME) ! LDLIBS2 = CPPFLAGS = /nologo /c $(FLAGS) $(DEFINES) $(INCLUDES) |
From: Marek P. <ma...@us...> - 2002-01-26 22:50:30
|
Update of /cvsroot/javaprofiler/library/src/commun In directory usw-pr-cvs1:/tmp/cvs-serv26803/src/commun Modified Files: communSocket.cpp Log Message: fixes of shared memory communication for win32 Index: communSocket.cpp =================================================================== RCS file: /cvsroot/javaprofiler/library/src/commun/communSocket.cpp,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -r1.11 -r1.12 *** communSocket.cpp 2001/12/09 16:49:32 1.11 --- communSocket.cpp 2002/01/26 22:50:27 1.12 *************** *** 138,142 **** if( _failed = (h == NULL)) return 0; ! cin.sin_addr.s_addr = (unsigned)atol( h->h_addr_list[0]); #ifdef WIN32 --- 138,142 ---- if( _failed = (h == NULL)) return 0; ! cin.sin_addr.s_addr = *(unsigned long*)h->h_addr_list[0]; #ifdef WIN32 *************** *** 153,156 **** --- 153,157 ---- } else if( _connectMode) { // failed and is client + #ifdef WIN32 shutdown( _csock, SD_BOTH); |
From: Marek P. <ma...@us...> - 2002-01-26 22:50:30
|
Update of /cvsroot/javaprofiler/library In directory usw-pr-cvs1:/tmp/cvs-serv26803 Modified Files: config.mk Log Message: fixes of shared memory communication for win32 Index: config.mk =================================================================== RCS file: /cvsroot/javaprofiler/library/config.mk,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -r1.28 -r1.29 *** config.mk 2001/11/25 23:32:03 1.28 --- config.mk 2002/01/26 22:50:27 1.29 *************** *** 1,12 **** ################################################################ # configuration file ! # Linux, x86, GNU C/C++ 3.0.2 # # author: Marek Przeczek ! PROF_LIBRARY_NAME = profiler/libprofiler.so PROF_JAVA_INTERF_PACKAGE = IProf.jar ! NATIVE_LIBRARY_NAME = libCommunShMem.so ################################################################ --- 1,12 ---- ################################################################ # configuration file ! # Microsoft Windows 9x/NT4.0/2000, x86, Visual C/C++ 6.0 # # author: Marek Przeczek ! PROF_LIBRARY_NAME = profiler\profiler.dll PROF_JAVA_INTERF_PACKAGE = IProf.jar ! NATIVE_LIBRARY_NAME = CommunShMem.dll ################################################################ *************** *** 15,28 **** # do not use "\" as a last character in path definition ! COMPILER_PATH = /home2/mm/gcc-3.0.2 ! JAVA_PATH = /home2/mm/j2sdk1.4.0 ! DOXYGEN_PATH = /home2/mm/ ! ! CCC = "$(COMPILER_PATH)/bin/g++" ! LD = "$(COMPILER_PATH)/bin/g++" ! JAVAC = "$(JAVA_PATH)/bin/javac" ! JAVAH = "$(JAVA_PATH)/bin/javah" ! JAR = "$(JAVA_PATH)/bin/jar" ! DOXYGEN = "$(DOXYGEN_PATH)/bin/doxygen" ################################################################ --- 15,28 ---- # do not use "\" as a last character in path definition ! COMPILER_PATH = E:\Program Files\Microsoft Visual Studio\VC98 ! JAVA_PATH = E:\j2sdk1.4.0-rc ! DOXYGEN_PATH = E:\Program Files\doxygen-1.2.12 ! ! CCC = "$(COMPILER_PATH)\Bin\cl" ! LD = "$(COMPILER_PATH)\Bin\link" ! JAVAC = "$(JAVA_PATH)\bin\javac" ! JAVAH = "$(JAVA_PATH)\bin\javah" ! JAR = "$(JAVA_PATH)\bin\jar" ! DOXYGEN = "$(DOXYGEN_PATH)\bin\doxygen" ################################################################ *************** *** 31,35 **** DOXYGENFLAGS = ! JAVACFLAGS = -classpath ../../src2/$(PROF_JAVA_INTERF_PACKAGE) ################################################################ --- 31,35 ---- DOXYGENFLAGS = ! JAVACFLAGS = -classpath ..\..\src2\$(PROF_JAVA_INTERF_PACKAGE) ################################################################ *************** *** 37,68 **** # modify as needed ! DEFINES = -DLINUX -DUSE_RAW_MONITORS -DUSE_ALLOCATOR -fpic ! INCLUDES = -I$(JAVA_PATH)/include -I$(JAVA_PATH)/include/linux # debug or not ? # choose one of following two possibilities ! FLAGS = -O0 -D_DEBUG ! #FLAGS = -O3 -DNDEBUG -fno-rtti -fno-exceptions ! LDFLAGS = $(DEFINES) -shared -o $(PROF_LIBRARY_NAME) ! LDLIBS = ! LDFLAGS2 = $(DEFINES) -shared -o $(NATIVE_LIBRARY_NAME) LDLIBS2 = ! CPPFLAGS = -c $(FLAGS) $(DEFINES) $(INCLUDES) ################################################################ # MAKEFILE ! MFLAGS = -f Makefile -C include dir.info ! all: $(addsuffix .dir.2, $(DIRS)) $(addsuffix .o, $(FILES)) ! ! clean: $(addsuffix .clean.2, $(DIRS)) ! rm -Rf $(CLEAN_FILES) ! --- 37,70 ---- # modify as needed ! DEFINES = /DWIN32 /DUSE_RAW_MONITORS /DUSE_ALLOCATOR ! INCLUDES = /I "$(JAVA_PATH)\include" /I "$(JAVA_PATH)\include\win32" # debug or not ? # choose one of following two possibilities ! FLAGS = /Od /Zi /D_DEBUG /MDd /LDd ! #FLAGS = /O2 /Og /Oi /Ot /Ox /DNDEBUG /MD /LD /G6 /GD ! LDFLAGS = /NOLOGO /DLL /OUT:$(PROF_LIBRARY_NAME) ! LDLIBS = wsock32.lib winmm.lib ! LDFLAGS2 = /NOLOGO /DLL /OUT:$(NATIVE_LIBRARY_NAME) LDLIBS2 = ! CPPFLAGS = /nologo /c $(FLAGS) $(DEFINES) $(INCLUDES) ################################################################ # MAKEFILE ! MFLAGS = /NOLOGO /f Makefile.mak include dir.info ! all: ! for %i in (xxx $(DIRS)) do if not %%i == xxx $(MAKE) $(MFLAGS) %%i.dir ! for %i in (xxx $(FILES)) do if not %%i == xxx $(MAKE) $(MFLAGS) %%i.obj ! ! clean: ! for %i in (xxx $(CLEAN_FILES)) do if exist %%i del %%i ! for %i in (xxx $(DIRS)) do if not %%i == xxx $(MAKE) $(MFLAGS) %%i.clean |
From: Pavel V. <va...@us...> - 2002-01-26 20:57:01
|
Update of /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/data In directory usw-pr-cvs1:/tmp/cvs-serv2071 Modified Files: ClassData.java Log Message: fix getmethods(), get..instaces() returns null Index: ClassData.java =================================================================== RCS file: /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/data/ClassData.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -r1.7 -r1.8 *** ClassData.java 2001/12/27 14:14:33 1.7 --- ClassData.java 2002/01/26 20:56:59 1.8 *************** *** 68,72 **** * @param sourceName name of the source file that defines the class. * @param numInterfaces number of interfaces implemented by this class. - * @param numMethods number of methods defined in this class. * @param numStaticFields number of static fields defined in this class. * @param staticFields Static fields defined in this class. It should be --- 68,71 ---- *************** *** 77,82 **** * @param active determines whether the class is active. */ ClassData(int ID, String name, String sourceName, int numInterfaces, ! int numMethods, int numStaticFields, List staticFields, int numInstanceFields, List instanceFields, boolean active) { super(ID); --- 76,82 ---- * @param active determines whether the class is active. */ + // * @param numMethods number of methods defined in this class. ClassData(int ID, String name, String sourceName, int numInterfaces, ! /*int numMethods,*/ int numStaticFields, List staticFields, int numInstanceFields, List instanceFields, boolean active) { super(ID); *************** *** 84,88 **** this.sourceName=sourceName; this.numInterfaces=numInterfaces; ! this.numMethods=numMethods; this.numStaticFields=numStaticFields; this.staticFields=staticFields; --- 84,88 ---- this.sourceName=sourceName; this.numInterfaces=numInterfaces; ! this.numMethods=0;//numMethods; this.numStaticFields=numStaticFields; this.staticFields=staticFields; *************** *** 90,93 **** --- 90,95 ---- this.instanceFields=instanceFields; this.active=active; + + this.methods= new LinkedList(); } *************** *** 96,99 **** --- 98,107 ---- * * @param sid data returned by communication layer + * @param numStaticFields number of static fields defined in this class. + * @param staticFields Static fields defined in this class. It should be + * <code>List</code> of {@link ClassFieldData} objects. + * @param numInstanceFields number of instance fields defined in this class. + * @param instanceFields Instance fields defined in this class. It should be + * <code>List</code> of {@link ClassFieldData} objects. */ ClassData( IProf.sID sid, int numStaticFields, List staticFields, *************** *** 101,105 **** this(sid.objId, ((IProf.sClassInfo)sid.info).className, ((IProf.sClassInfo)sid.info).sourceName, ! ((IProf.sClassInfo)sid.info).numInterfaces, 0, //pending numStaticFields, staticFields, numInstanceFields, instanceFields, --- 109,113 ---- this(sid.objId, ((IProf.sClassInfo)sid.info).className, ((IProf.sClassInfo)sid.info).sourceName, ! ((IProf.sClassInfo)sid.info).numInterfaces,// 0, numStaticFields, staticFields, numInstanceFields, instanceFields, *************** *** 115,121 **** this(sid.objId, ((IProf.sClassInfo)sid.info).className, ((IProf.sClassInfo)sid.info).sourceName, ! ((IProf.sClassInfo)sid.info).numInterfaces, 0, //pending ! 0, null, ! 0, null, sid.active); } --- 123,129 ---- this(sid.objId, ((IProf.sClassInfo)sid.info).className, ((IProf.sClassInfo)sid.info).sourceName, ! ((IProf.sClassInfo)sid.info).numInterfaces,// 0, ! 0, new LinkedList(), ! 0, new LinkedList(), sid.active); } *************** *** 138,143 **** */ void addMethod(MethodData method) { - if (methods == null) - methods = new LinkedList(); methods.add( method ); numMethods++; --- 146,149 ---- *************** *** 262,265 **** --- 268,274 ---- /* * $Log$ + * Revision 1.8 2002/01/26 20:56:59 vachis + * fix getmethods(), get..instaces() returns null + * * Revision 1.7 2001/12/27 14:14:33 vachis * new methods for setting fields lists |
From: Pavel V. <va...@us...> - 2002-01-26 20:56:06
|
Update of /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/data In directory usw-pr-cvs1:/tmp/cvs-serv1880 Modified Files: SnapshotImpl.java Log Message: methods gcs(), arenas() added Index: SnapshotImpl.java =================================================================== RCS file: /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/data/SnapshotImpl.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -r1.8 -r1.9 *** SnapshotImpl.java 2002/01/11 22:24:02 1.8 --- SnapshotImpl.java 2002/01/26 20:56:02 1.9 *************** *** 19,23 **** * Lukas Petru and Marek Przeczek. */ ! package net.sourceforge.javaprofiler.jpiimpl.data; --- 19,23 ---- * Lukas Petru and Marek Przeczek. */ ! package net.sourceforge.javaprofiler.jpiimpl.data; *************** *** 47,51 **** private LinkedList threads = new LinkedList(); private LinkedList allocObjects = new LinkedList(); ! //private LinkedList arenas = new LinkedList(); private LinkedList gcs = new LinkedList(); --- 47,51 ---- private LinkedList threads = new LinkedList(); private LinkedList allocObjects = new LinkedList(); ! private LinkedList arenas = new LinkedList(); private LinkedList gcs = new LinkedList(); *************** *** 54,61 **** private boolean withAlloc = true; private boolean withMon = true; - //boolean withArenas = true; - private boolean withGC = true; private boolean withTraces = true; private boolean withThreads = true; //only traces with more hits than this will be extracted private int CPUTraces_MinVal = IProf.NO_OPTIONAL_ARG; //2; --- 54,61 ---- private boolean withAlloc = true; private boolean withMon = true; private boolean withTraces = true; private boolean withThreads = true; + private boolean withArenas = true; + private boolean withGC = true; //only traces with more hits than this will be extracted private int CPUTraces_MinVal = IProf.NO_OPTIONAL_ARG; //2; *************** *** 87,90 **** --- 87,91 ---- *@param withAlloc Whether include snapshot of allocations. *@param withMon Whether include snapshot of monitors. + *@param withArenas Whether inlucde snapshot of arenas. *@param withGC Whether inlucde snapshot of garbage collector. * *************** *** 101,106 **** //maybe use some configuration object public SnapshotImpl( IProf iprof, boolean withCPU, boolean withAlloc, ! boolean withMon, boolean withGC, boolean withTraces, ! boolean withThreads, int CPUTraces_MinVal, int AllocTraces_MinVal, --- 102,107 ---- //maybe use some configuration object public SnapshotImpl( IProf iprof, boolean withCPU, boolean withAlloc, ! boolean withMon, boolean withTraces, ! boolean withThreads, boolean withArenas, boolean withGC, int CPUTraces_MinVal, int AllocTraces_MinVal, *************** *** 109,115 **** this.withAlloc = withAlloc; this.withMon = withMon; - this.withGC = withGC; this.withTraces = withTraces; this.withThreads = withThreads; this.CPUTraces_MinVal = CPUTraces_MinVal; this.AllocTraces_MinVal = AllocTraces_MinVal; --- 110,117 ---- this.withAlloc = withAlloc; this.withMon = withMon; this.withTraces = withTraces; this.withThreads = withThreads; + this.withGC = withGC; + this.withArenas = withArenas; this.CPUTraces_MinVal = CPUTraces_MinVal; this.AllocTraces_MinVal = AllocTraces_MinVal; *************** *** 260,265 **** //some public classes, that are not in interface yet ! /** Returns list of objects, that can be allocated, e.g. class, array of class, ! * array of int, etc. * * @return list of allocatable objects. --- 262,267 ---- //some public classes, that are not in interface yet ! /** Returns list of objects, that can be allocated. ! * These are class, array of class array of int, etc. * * @return list of allocatable objects. *************** *** 277,280 **** --- 279,298 ---- } + /** Returns list of objects with garbage collector information. + * + *@return list of objects with garbage collector information. + */ + public List gcs() { + return gcs; + } + + /**Return list of arenas. + * + *@return list of arenas. + */ + public List arenas() { + return arenas; + } + ////////////////////////////////////////////////////////////////////////////// // Private classes *************** *** 297,301 **** // It usually uses libIDs field. ! /** Makes snapshot (mirror of library structures), it reads configuration * from private fields of <code>SnapshotImpl</code>. * This method is called from contructor, that sets configuration. --- 315,320 ---- // It usually uses libIDs field. ! /** Makes snapshot (mirror of library structures). ! * It reads configuration * from private fields of <code>SnapshotImpl</code>. * This method is called from contructor, that sets configuration. *************** *** 407,415 **** } } } - //?//PENDING - //if ( withArenas ) { - // extract( null, arenas, IProf.NO_OPTIONAL_ARG, IProf.ARENAS ); - //} if ( withGC ) { extract( null, gcs, IProf.GCS, IProf.NO_OPTIONAL_ARG, iprof ); --- 426,434 ---- } } + } + + if ( withArenas ) { + extract( null, arenas, IProf.ARENAS, IProf.NO_OPTIONAL_ARG, iprof ); } if ( withGC ) { extract( null, gcs, IProf.GCS, IProf.NO_OPTIONAL_ARG, iprof ); *************** *** 444,448 **** *@param optArg Optional argument passed to IProf.getAll(), depends on <code>whatType</code> * operation. In many cases it's just <code>IProf.NO_OPTIONAL_ARG</code>. ! * {@link net.sourceforge.javaprofiler.jpiimpl.commun.IProf.getAll} *@param iprof Communacation object (you have to be connected to profiled VM). * --- 463,467 ---- *@param optArg Optional argument passed to IProf.getAll(), depends on <code>whatType</code> * operation. In many cases it's just <code>IProf.NO_OPTIONAL_ARG</code>. ! * {@link net.sourceforge.javaprofiler.jpiimpl.commun.IProf#getAll()} *@param iprof Communacation object (you have to be connected to profiled VM). * *************** *** 544,549 **** if ( postOpIterLst == null ) return new LinkedList(); ! if ( refObj != null ) ! return postOpIterLst; switch( whatType ) { --- 563,568 ---- if ( postOpIterLst == null ) return new LinkedList(); ! // if ( refObj == null ) ! // return postOpIterLst; switch( whatType ) { *************** *** 594,605 **** }; ! /** Creates and returns new object, its type depends on <code>whatType</code> operation, ! * this object carries information from <code>sid</code>. Finally this new * object is conected to mirror structure, optionaly connected to <code> * postOpLst</code> or <code> postOpIterLst </code> lists for furter manipulation. * ! *@returns object, which type depends on <code>whatType</code> operation ! *param whatType constant of operation (constant from IProf) used in extract() method ! *param sid contains statistic and sometimes also info data *@see SnapshotImpl#extract() */ --- 613,624 ---- }; ! /** Creates and returns new object, its type depends on <code>whatType</code> operation. ! * This object carries information from <code>sid</code>. Finally this new * object is conected to mirror structure, optionaly connected to <code> * postOpLst</code> or <code> postOpIterLst </code> lists for furter manipulation. * ! *@return object, which type depends on <code>whatType</code> operation ! *@param whatType constant of operation (constant from IProf) used in extract() method ! *@param sid contains statistic and sometimes also info data *@see SnapshotImpl#extract() */ *************** *** 1009,1020 **** //TODO: // write exception handling code properly ! // solve problems with AllocClassData, rename to AllocObjectData ! // ! //shloud I read default configuration somewhere? /* * $Log$ * Revision 1.8 2002/01/11 22:24:02 vachis * added allocObjects list, methods for getting allocObjects and groupOfThreads --- 1028,1042 ---- //TODO: // write exception handling code properly ! // solve inconsitences with AllocClassData names, ?expansion from classes ! // serialize, ! // shloud I read default configuration somewhere? /* * $Log$ + * Revision 1.9 2002/01/26 20:56:02 vachis + * methods gcs(), arenas() added + * * Revision 1.8 2002/01/11 22:24:02 vachis * added allocObjects list, methods for getting allocObjects and groupOfThreads |
From: Pavel V. <va...@us...> - 2002-01-26 19:37:40
|
Update of /cvsroot/javaprofiler/test/snapshot In directory usw-pr-cvs1:/tmp/cvs-serv19131 Modified Files: TestSnap.java Log Message: arenas added Index: TestSnap.java =================================================================== RCS file: /cvsroot/javaprofiler/test/snapshot/TestSnap.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** TestSnap.java 2001/12/10 09:43:26 1.1 --- TestSnap.java 2002/01/26 19:37:37 1.2 *************** *** 56,60 **** boolean withAlloc = true; boolean withMon = true; ! //boolean withArenas = true; boolean withGC = true; boolean withTraces = true; --- 56,60 ---- boolean withAlloc = true; boolean withMon = true; ! boolean withArenas = true; boolean withGC = true; boolean withTraces = true; *************** *** 70,74 **** Snapshot mirror = new SnapshotImpl( iprof, withCPU, withAlloc, ! withMon, withGC, withTraces, withThreads, CPUTraces_MinVal, AllocTraces_MinVal, --- 70,74 ---- Snapshot mirror = new SnapshotImpl( iprof, withCPU, withAlloc, ! withMon, withArenas, withGC, withTraces, withThreads, CPUTraces_MinVal, AllocTraces_MinVal, |
From: Pavel V. <va...@us...> - 2002-01-26 19:37:13
|
Update of /cvsroot/javaprofiler/test/snapshot In directory usw-pr-cvs1:/tmp/cvs-serv19039 Modified Files: runsnap.bat run2.bat run1.bat Log Message: for jdk1.4.0-rc Index: runsnap.bat =================================================================== RCS file: /cvsroot/javaprofiler/test/snapshot/runsnap.bat,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** runsnap.bat 2002/01/15 18:34:51 1.2 --- runsnap.bat 2002/01/26 19:37:10 1.3 *************** *** 1,3 **** ! SET JAVA_HOME=d:\j2sdk1.4.0-beta3 rem **************************** rem SET CLASSPATH=..\..\jpiimpl;..\..\interface;.\;%CLASSPATH% --- 1,3 ---- ! SET JAVA_HOME=d:\j2sdk1.4.0-rc rem **************************** rem SET CLASSPATH=..\..\jpiimpl;..\..\interface;.\;%CLASSPATH% Index: run2.bat =================================================================== RCS file: /cvsroot/javaprofiler/test/snapshot/run2.bat,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** run2.bat 2002/01/15 18:34:52 1.2 --- run2.bat 2002/01/26 19:37:10 1.3 *************** *** 1,3 **** ! SET JAVA_HOME=d:\j2sdk1.4.0-beta3 rem ************************** SET CLASSPATH=%JAVA_HOME%\demo\jfc\SwingSet2\SwingSet2.jar;%CLASSPATH% --- 1,3 ---- ! SET JAVA_HOME=d:\j2sdk1.4.0-rc rem ************************** SET CLASSPATH=%JAVA_HOME%\demo\jfc\SwingSet2\SwingSet2.jar;%CLASSPATH% Index: run1.bat =================================================================== RCS file: /cvsroot/javaprofiler/test/snapshot/run1.bat,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** run1.bat 2002/01/15 18:34:55 1.2 --- run1.bat 2002/01/26 19:37:10 1.3 *************** *** 1,3 **** ! SET JAVA_HOME=d:\j2sdk1.4.0-beta3 rem ************************** SET CLASSPATH=%JAVA_HOME%\demo\jfc\Notepad\Notepad.jar;%CLASSPATH% --- 1,3 ---- ! SET JAVA_HOME=d:\j2sdk1.4.0-rc rem ************************** SET CLASSPATH=%JAVA_HOME%\demo\jfc\Notepad\Notepad.jar;%CLASSPATH% |
From: Pavel V. <va...@us...> - 2002-01-26 19:36:22
|
Update of /cvsroot/javaprofiler/test/snapshot In directory usw-pr-cvs1:/tmp/cvs-serv18810 Modified Files: readme.txt Added Files: PrintSnap.java printsnap.bat Log Message: classes for printing DebugOutput --- NEW FILE: PrintSnap.java --- //java -Xrun\Project\javaprof\library\src\profiler\profiler:commun_type=socket Notepad /* * Sun Public License Notice * * The contents of this file are subject to the Sun Public License * Version 1.0 (the "License"); you may not use this file except * in compliance with the License. A copy of the License is available * at http://www.sun.com/ * * The Original Code is the Java Profiler module. The Initial Developers * of the Original Code are Jan Stola, Pavel Vacha, Michal Pise, Petr Luner, * Lukas Petru and Marek Przeczek. * * Portions created by Jan Stola are Copyright (C) 2000-2001. * All Rights Reserved. * * Portions created by Pavel Vacha are Copyright (C) 2000-2001. * All Rights Reserved. * * Portions created by Michal Pise are Copyright (C) 2000-2001. * All Rights Reserved. * * Portions created by Petr Luner are Copyright (C) 2000-2001. * All Rights Reserved. * * Portions created by Lukas Petru are Copyright (C) 2000-2001. * All Rights Reserved. * * Portions created by Marek Przeczek are Copyright (C) 2000-2001. * All Rights Reserved. * * Contributors: Jan Stola, Pavel Vacha, Michal Pise, Petr Luner, * Lukas Petru and Marek Przeczek. */ import java.lang.*; import java.util.*; import net.sourceforge.javaprofiler.jpiimpl.commun.*; import net.sourceforge.javaprofiler.jpiimpl.data.*; import net.sourceforge.javaprofiler.jpiimpl.*; import net.sourceforge.javaprofiler.jpi.*; public class PrintSnap { // communication interface private IProf iprof = null; // number of all methods together private int numMethods = 0; public void printSnapShot( ) { //conf boolean withCPU = true; boolean withAlloc = true; boolean withMon = true; boolean withTraces = true; boolean withThreads = true; boolean withArenas = true; boolean withGC = true; int CPUTraces_MinVal = IProf.NO_OPTIONAL_ARG; int AllocTraces_MinVal = IProf.NO_OPTIONAL_ARG; int MonTraces_MinVal = IProf.NO_OPTIONAL_ARG; DebugOutput dbgPrn = new DebugOutput(); SnapshotImpl mirror = new SnapshotImpl( iprof, withCPU, withAlloc, withMon, withTraces, withThreads, withArenas, withGC, CPUTraces_MinVal, AllocTraces_MinVal, MonTraces_MinVal); dbgPrn.print( mirror ); } public void runTest() { // initialize and start communication //iprof = new IProf(); iprof = new IProf( new CommunSetupSocket() ); iprof.run(); try { System.out.println( "Ready" ); printSnapShot(); iprof.shutdown(); } catch( Exception e) { System.err.println( "an error occurred, exception:"); System.err.println( e.getClass().getName()); } // communication must be stopped even if an error occurred ! iprof.stop(); iprof = null; } public static void main( String[] arg) { // let's run the test (new PrintSnap()).runTest(); } }; --- NEW FILE: printsnap.bat --- SET JAVA_HOME=d:\j2sdk1.4.0-rc rem **************************** rem SET CLASSPATH=..\..\jpiimpl;..\..\interface;.\;%CLASSPATH% SET CLASSPATH=..\..\jpiimpl\jpiimpl.jar;.\;%CLASSPATH% set path=%JAVA_HOME%\bin;%path% java PrintSnap > snapout.txt Index: readme.txt =================================================================== RCS file: /cvsroot/javaprofiler/test/snapshot/readme.txt,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** readme.txt 2002/01/15 22:08:21 1.1 --- readme.txt 2002/01/26 19:36:18 1.2 *************** *** 1,4 **** ! how to compile TestSnap: ! ------------------------ SET CLASSPATH=..\..\jpiimpl\jpiimpl.jar;.\;%CLASSPATH% ! d:\j2sdk1.4.0-beta3\bin\javac TestSnap.java \ No newline at end of file --- 1,4 ---- ! how to compile TestSnap and PrintSnap: ! -------------------------------------- SET CLASSPATH=..\..\jpiimpl\jpiimpl.jar;.\;%CLASSPATH% ! d:\j2sdk1.4.0-rc\bin\javac TestSnap.java PrintSnap.java \ No newline at end of file |
From: Marek P. <ma...@us...> - 2002-01-26 10:38:28
|
Update of /cvsroot/javaprofiler/library/src2 In directory usw-pr-cvs1:/tmp/cvs-serv19108/src2 Modified Files: CommunShMem.cpp Log Message: shared memory communication for linux fixed Index: CommunShMem.cpp =================================================================== RCS file: /cvsroot/javaprofiler/library/src2/CommunShMem.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -r1.7 -r1.8 *** CommunShMem.cpp 2002/01/26 10:34:47 1.7 --- CommunShMem.cpp 2002/01/26 10:38:25 1.8 *************** *** 99,102 **** --- 99,103 ---- int checkServer(); + public: |
From: Marek P. <ma...@us...> - 2002-01-26 10:34:50
|
Update of /cvsroot/javaprofiler/library/src2 In directory usw-pr-cvs1:/tmp/cvs-serv18501/src2 Modified Files: CommunShMem.cpp Log Message: shared memory communication for linux fixed Index: CommunShMem.cpp =================================================================== RCS file: /cvsroot/javaprofiler/library/src2/CommunShMem.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -r1.6 -r1.7 *** CommunShMem.cpp 2002/01/26 10:19:43 1.6 --- CommunShMem.cpp 2002/01/26 10:34:47 1.7 *************** *** 37,43 **** #include "../src/commun3/sharedMemory.h" - #include <iostream.h> - #include <stdio.h> - /** JNI implementation of shared memory communication. This class is ** used by native methods of Java CommunShMem class. It contains --- 37,40 ---- *************** *** 53,60 **** public: ! /// semaphore (exclusive access to shared memory) Semaphore sem1; ! /// semaphore (synchronization) Semaphore sem2; --- 50,57 ---- public: ! /// semaphore Semaphore sem1; ! /// semaphore Semaphore sem2; |
From: Marek P. <ma...@us...> - 2002-01-26 10:25:42
|
Update of /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/commun In directory usw-pr-cvs1:/tmp/cvs-serv17088/net/sourceforge/javaprofiler/jpiimpl/commun Modified Files: CommunShMem.java Log Message: shared memory fix Index: CommunShMem.java =================================================================== RCS file: /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/commun/CommunShMem.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** CommunShMem.java 2001/11/21 22:05:55 1.2 --- CommunShMem.java 2002/01/26 10:25:39 1.3 *************** *** 77,86 **** protected native void finalize(); ! /** Initialization of communication. This method does nothing, ! ** it always returns true. ** ! ** @return true (ok, initialized) */ ! public boolean initialize() { return true;} /** Read data. This method is used to read data --- 77,86 ---- protected native void finalize(); ! /** Initialization of communication. ** ! ** @return true (ok, initialized); ! ** false (initialization failed) */ ! public native boolean initialize(); /** Read data. This method is used to read data |
From: Marek P. <ma...@us...> - 2002-01-26 10:19:47
|
Update of /cvsroot/javaprofiler/library/demo/04 In directory usw-pr-cvs1:/tmp/cvs-serv15950/demo/04 Modified Files: Test.java Log Message: shared memory communication for linux fixed Index: Test.java =================================================================== RCS file: /cvsroot/javaprofiler/library/demo/04/Test.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** Test.java 2001/12/03 16:26:25 1.1 --- Test.java 2002/01/26 10:19:44 1.2 *************** *** 49,53 **** // ask for all methods of given class Iterator iterator = ! iprof.getAllThruIterator( objId, IProf.CLASS_METHODS, true, true, IProf.NO_OPTIONAL_ARG); --- 49,54 ---- // ask for all methods of given class Iterator iterator = ! iprof.getAllThruIterator( objId, ! IProf.CLASS_METHODS, true, true, IProf.NO_OPTIONAL_ARG); *************** *** 82,89 **** // take the first one directly from I/O buffer ! // every time returned, sid references to same object // only data inside it are changed ! // WHY: because 'sameOutputObject' of getAllThruIterator() ! // was set to 'true' => we don't waste our memory IProf.sID sid = (IProf.sID)iterator.next(); --- 83,93 ---- // take the first one directly from I/O buffer ! // every time returned, 'sid' references to same object // only data inside it are changed ! // ! // WHY: ! // because 'sameOutputObject' of getAllThruIterator() ! // was set to 'true' => we don't waste our memory ! IProf.sID sid = (IProf.sID)iterator.next(); *************** *** 102,105 **** --- 106,112 ---- // following two numbers should be the same // if not, something is bad + // (they can vary if new methods are loaded into JVM + // while receiving list of existing methods) + LinkedList list = iprof.getAll( 0, IProf.METHODS); System.out.println( "NUMBER OF METHODS (1): " + numMethods); |
From: Marek P. <ma...@us...> - 2002-01-26 10:19:47
|
Update of /cvsroot/javaprofiler/library/doc/dia/pdf In directory usw-pr-cvs1:/tmp/cvs-serv15950/doc/dia/pdf Modified Files: complete_view.pdf cpu.pdf memory.pdf monitors.pdf Log Message: shared memory communication for linux fixed Index: complete_view.pdf =================================================================== RCS file: /cvsroot/javaprofiler/library/doc/dia/pdf/complete_view.pdf,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 Binary files /tmp/cvsduK4Sr and /tmp/cvs8tMBwJ differ Index: cpu.pdf =================================================================== RCS file: /cvsroot/javaprofiler/library/doc/dia/pdf/cpu.pdf,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 Binary files /tmp/cvsJidKlt and /tmp/cvsoQX0qM differ Index: memory.pdf =================================================================== RCS file: /cvsroot/javaprofiler/library/doc/dia/pdf/memory.pdf,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 Binary files /tmp/cvs1yiDPu and /tmp/cvs2EYrqP differ Index: monitors.pdf =================================================================== RCS file: /cvsroot/javaprofiler/library/doc/dia/pdf/monitors.pdf,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 Binary files /tmp/cvs2o4r8t and /tmp/cvsumc6lQ differ |
From: Marek P. <ma...@us...> - 2002-01-26 10:19:47
|
Update of /cvsroot/javaprofiler/library/src/commun3 In directory usw-pr-cvs1:/tmp/cvs-serv15950/src/commun3 Modified Files: communShMem.cpp communShMem.h semaphore.cpp semaphore.h Log Message: shared memory communication for linux fixed Index: communShMem.cpp =================================================================== RCS file: /cvsroot/javaprofiler/library/src/commun3/communShMem.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -r1.6 -r1.7 *** communShMem.cpp 2001/11/21 22:31:42 1.6 --- communShMem.cpp 2002/01/26 10:19:44 1.7 *************** *** 35,58 **** #include "../commun3/communShMem.h" ! Commun& CommunShMem::operator>>( Buffer& b) { ! void* p = _shmem.getAddress(); ! int shmemSize = _shmem.getSize(); ! _isem.wait(); ! jint size = (signed)ntohl( *(jint*)p); ! if( size < 0) { ! _failed = 1; ! _isem.release(); ! ! return *this; ! } ! _isem.release(); ! if( size) { jint num = size/shmemSize; --- 35,67 ---- #include "../commun3/communShMem.h" ! CommunShMem::CommunShMem( const String& shmemId, int size) : ! _sem1( String( "1") + shmemId + "XXXXXXXXXX"), ! _sem2( String( "2") + shmemId + "XXXXXXXXXX"), ! ! _shmem( String( "3") + shmemId + "XXXXXXXXXX", size) { ! } ! CommunShMem::~CommunShMem() { ! *(jint*)(_shmem.getAddress()) = -1; ! _sem1.reset(); ! _sem1.release(); ! _sem2.reset(); ! _sem2.release(); ! } ! Commun& CommunShMem::operator>>( Buffer& b) { + void* p = _shmem.getAddress(); + int shmemSize = _shmem.getSize(); + + jint size = *(jint*)p; + + if( size < 0 || !checkClient()) _failed = 1; + else if( size) { + jint num = size/shmemSize; *************** *** 65,84 **** _sem1.wait(); memcpy( q, p, shmemSize); } jint rest = size%shmemSize; ! if( rest) { _sem2.release(); _sem1.wait(); ! memcpy( q, p, rest); } - - _sem2.release(); - - b = Buffer( buf, size); delete[] buf; } --- 74,96 ---- _sem1.wait(); + _failed = !checkClient(); + if( _failed) break; + memcpy( q, p, shmemSize); } + _failed = !checkClient(); + jint rest = size%shmemSize; ! if( rest && !_failed) { _sem2.release(); _sem1.wait(); ! _failed = !checkClient(); ! if( !_failed) memcpy( q, p, rest); } + if( !_failed) b = Buffer( buf, size); delete[] buf; } *************** *** 93,138 **** int shmemSize = _shmem.getSize(); ! _isem.wait(); ! if( (signed)ntohl( *(jint*)p) < 0) { ! ! _failed = 1; ! _isem.release(); ! return *this; ! } ! ! _isem.release(); ! jint size = b.getSize(); ! *(jint*)p = htonl( size); ! if( size) { ! ! _sem2.release(); ! _sem1.wait(); ! ! jint num = size/shmemSize; ! const char* q = b.getBuffer(); ! for( int i = 0; i < num; i++, q += shmemSize) { ! memcpy( p, q, shmemSize); ! _sem2.release(); ! _sem1.wait(); ! } ! jint rest = size%shmemSize; ! if( rest) { ! ! memcpy( p, q, rest); ! _sem2.release(); ! _sem1.wait(); } } ! else _sem2.release(); return *this; --- 105,145 ---- int shmemSize = _shmem.getSize(); ! if( *(jint*)p < 0 || !checkClient()) _failed = 1; ! else { ! jint size = b.getSize(); ! *(jint*)p = size; ! if( size) { ! jint num = size/shmemSize; ! const char* q = b.getBuffer(); ! for( int i = 0; i < num; i++, q += shmemSize) { ! _sem2.release(); ! _sem1.wait(); ! _failed = !checkClient(); ! if( _failed) break; ! memcpy( p, q, shmemSize); ! } ! _failed = !checkClient(); ! jint rest = size%shmemSize; ! if( rest && !_failed) { ! _sem2.release(); ! _sem1.wait(); ! ! _failed = !checkClient(); ! if( !_failed) memcpy( p, q, rest); ! } } } ! ! _sem2.release(); return *this; *************** *** 141,196 **** int CommunShMem::isReady() { - _isem.wait(); - _failed = ( (signed)ntohl( *(jint*)(_shmem.getAddress())) < 0); - _isem.release(); - - if( _failed) return 0; - - int rc = _sem1.waitNoBlock(); - if( _failed = (rc < 0)) return 0; - - return rc; - } - - int CommunShMem::initialize() { - - _isem.wait(); - *(jint*)(_shmem.getAddress()) = htonl( 0); - _failed = 0; - _isem.release(); - _sem1.wait(); - _sem1.release(); return 1; } - - CommunShMem::CommunShMem( const String& shmemId, int size) : ! _sem1( String( "1") + shmemId + "XXXXXXXXXX"), ! _sem2( String( "2") + shmemId + "XXXXXXXXXX"), ! _isem( String( "3") + shmemId + "XXXXXXXXXX", 1), ! _shmem( String( "4") + shmemId + "XXXXXXXXXX", size) { ! _sem1.release(); _sem1.wait(); ! _sem2.release(); ! _sem2.wait(); ! *(jint*)(_shmem.getAddress()) = htonl( 0); ! _isem.release(); ! }; ! CommunShMem::~CommunShMem() { ! _isem.wait(); ! _sem2.release(); ! _sem1.release(); ! ! *(jint*)(_shmem.getAddress()) = htonl( (unsigned)(-1)); ! ! _isem.release(); } --- 148,183 ---- int CommunShMem::isReady() { _sem1.wait(); return 1; } ! int CommunShMem::initialize() { ! _sem1.reset(); _sem1.wait(); ! _failed = ( *(jint*)_shmem.getAddress() < 0); ! #ifdef WIN32 ! #error FIXME ! #else ! pid_t* p = (pid_t*)((jint*)(_shmem.getAddress())+1); ! ! _pid = *p; ! *p = getpid(); ! #endif ! _sem2.release(); ! return !_failed; ! } ! int CommunShMem::checkClient() { ! #ifdef WIN32 ! #error FIXME ! #else ! return !kill( _pid, 0); ! #endif } Index: communShMem.h =================================================================== RCS file: /cvsroot/javaprofiler/library/src/commun3/communShMem.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** communShMem.h 2001/11/21 22:31:42 1.5 --- communShMem.h 2002/01/26 10:19:44 1.6 *************** *** 55,70 **** class CommunShMem: public Commun { ! /// read-write semaphore Semaphore _sem1; ! /// write-read semaphore Semaphore _sem2; - /// init semaphore - Semaphore _isem; - /// shared memory SharedMemory _shmem; public: --- 55,74 ---- class CommunShMem: public Commun { ! /// semaphore Semaphore _sem1; ! /// semaphore Semaphore _sem2; /// shared memory SharedMemory _shmem; + #ifdef WIN32 + #error FIXME + #else + /// client process ID + pid_t _pid; + #endif + public: *************** *** 120,123 **** --- 124,137 ---- virtual int isReady(); + + private: + + /** Check client. This routine checks if the client + ** is still connected and is alive. + ** + ** @return 1 (ok); + ** 0 (failed, not connected) */ + + int checkClient(); }; Index: semaphore.cpp =================================================================== RCS file: /cvsroot/javaprofiler/library/src/commun3/semaphore.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** semaphore.cpp 2001/11/21 22:31:42 1.1 --- semaphore.cpp 2002/01/26 10:19:44 1.2 *************** *** 35,45 **** #include "../commun3/semaphore.h" ! Semaphore::Semaphore( const String& name, int locked) { #ifdef WIN32 ! _semid = CreateSemaphore( NULL, (( locked) ? 0 : 1), 1, name); #else _semid = semget( *(key_t*)(const char*)name, 1, 0666 | IPC_CREAT); ! _initLocked = locked; #endif } --- 35,46 ---- #include "../commun3/semaphore.h" ! Semaphore::Semaphore( const String& name) { #ifdef WIN32 ! #error FIXME ! // _semid = CreateSemaphore( NULL, (( locked) ? 0 : 1), 1, name); #else _semid = semget( *(key_t*)(const char*)name, 1, 0666 | IPC_CREAT); ! semctl( _semid, 0, SETVAL, 1); #endif } *************** *** 48,52 **** #ifdef WIN32 ! CloseHandle( _semid); #else #endif --- 49,54 ---- #ifdef WIN32 ! #error FIXME ! // CloseHandle( _semid); #else #endif *************** *** 56,72 **** #ifdef WIN32 ! WaitForSingleObject( _semid, INFINITE); ! Sleep( 0); #else ! if( _initLocked) { ! ! static sembuf sop = { 0, -1, SEM_UNDO}; ! semop( _semid, &sop, 1); ! } ! else { ! ! static sembuf sop[2] = { 0, 0, 0, 0, 1, SEM_UNDO}; ! semop( _semid, sop, 2); ! } #endif } --- 58,67 ---- #ifdef WIN32 ! #error FIXME ! // WaitForSingleObject( _semid, INFINITE); ! // Sleep( 0); #else ! static sembuf sop[2] = { 0, 0, 0, 0, 1, SEM_UNDO}; ! semop( _semid, sop, 2); #endif } *************** *** 75,114 **** #ifdef WIN32 ! ReleaseSemaphore( _semid, 1, NULL); ! //Sleep( 0); #else ! if( _initLocked) { ! ! static sembuf sop = { 0, 1, SEM_UNDO}; ! semop( _semid, &sop, 1); ! } ! else { ! ! static sembuf sop = { 0, -1, SEM_UNDO | IPC_NOWAIT}; ! semop( _semid, &sop, 1); ! } #endif } ! int Semaphore::waitNoBlock() { #ifdef WIN32 ! unsigned long rc = WaitForSingleObject( _semid, 0); ! Sleep( 0); ! ! if( rc == WAIT_FAILED) return -1; ! if( rc == WAIT_TIMEOUT) return 0; #else ! if( _initLocked) { ! ! static sembuf sop = { 0, -1, SEM_UNDO | IPC_NOWAIT}; ! if( semop( _semid, &sop, 1)) return 0; ! } ! else { ! ! static sembuf sop[2] = { 0, 0, IPC_NOWAIT, 0, 1, SEM_UNDO}; ! if( semop( _semid, sop, 2)) return 0; ! } #endif - return 1; } --- 70,88 ---- #ifdef WIN32 ! #error FIXME ! // ReleaseSemaphore( _semid, 1, NULL); ! ////Sleep( 0); #else ! static sembuf sop = { 0, -1, SEM_UNDO | IPC_NOWAIT}; ! semop( _semid, &sop, 1); #endif } ! void Semaphore::reset() { #ifdef WIN32 ! #error FIXME #else ! semctl( _semid, 0, SETVAL, 1); #endif } Index: semaphore.h =================================================================== RCS file: /cvsroot/javaprofiler/library/src/commun3/semaphore.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -r1.6 -r1.7 *** semaphore.h 2001/11/21 22:31:42 1.6 --- semaphore.h 2002/01/26 10:19:44 1.7 *************** *** 41,44 **** --- 41,45 ---- /** Binary semaphore. This class implements IPC semaphore. ** Implementation of this class is platform/system dependent. + ** Semaphore is automatically locked after it is created. ** ** @author Marek Przeczek */ *************** *** 52,58 **** /// unix semaphore identifier int _semid; - - /// initially locked - int _initLocked; #endif --- 53,56 ---- *************** *** 61,69 **** /** Constructor. Opens a semaphore with given name. ** If semaphore doesn't exist, new one is created. ** ! ** @param name unique name (4 characters long only) ! ** @param locked semaphore should be locked after it has been initialized */ ! Semaphore( const String& name, int locked = 0); /// Destructor. --- 59,67 ---- /** Constructor. Opens a semaphore with given name. ** If semaphore doesn't exist, new one is created. + ** It is automatically locked after it is created. ** ! ** @param name unique name (4 characters long only) */ ! Semaphore( const String& name); /// Destructor. *************** *** 85,96 **** void release(); ! /** Lock semaphore but don't block. This method locks semaphore ! ** if it is possible, if not, it returns immediatelly without locking. ! ** ! ** @return 0 (failed, already locked); ! ** 1 (okay, successfully locked); ! ** -1 (failure) */ ! int waitNoBlock(); }; --- 83,90 ---- void release(); ! /** Reset semaphore. It resets semaphore and sets its ! ** default value (locked by one). */ ! void reset(); }; |
From: Marek P. <ma...@us...> - 2002-01-26 10:19:47
|
Update of /cvsroot/javaprofiler/library/src/prof In directory usw-pr-cvs1:/tmp/cvs-serv15950/src/prof Modified Files: prof_jvm.cpp Log Message: shared memory communication for linux fixed Index: prof_jvm.cpp =================================================================== RCS file: /cvsroot/javaprofiler/library/src/prof/prof_jvm.cpp,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -r1.25 -r1.26 *** prof_jvm.cpp 2001/11/25 23:32:29 1.25 --- prof_jvm.cpp 2002/01/26 10:19:44 1.26 *************** *** 454,458 **** if( isConnectionEstablished()) { ! communLock.wait(); dataLock.wait(); --- 454,458 ---- if( isConnectionEstablished()) { ! communLock.wait(); dataLock.wait(); |
From: Marek P. <ma...@us...> - 2002-01-26 10:19:46
|
Update of /cvsroot/javaprofiler/library/src2 In directory usw-pr-cvs1:/tmp/cvs-serv15950/src2 Modified Files: CommunShMem.cpp Log Message: shared memory communication for linux fixed Index: CommunShMem.cpp =================================================================== RCS file: /cvsroot/javaprofiler/library/src2/CommunShMem.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** CommunShMem.cpp 2001/11/25 22:33:47 1.5 --- CommunShMem.cpp 2002/01/26 10:19:43 1.6 *************** *** 37,40 **** --- 37,43 ---- #include "../src/commun3/sharedMemory.h" + #include <iostream.h> + #include <stdio.h> + /** JNI implementation of shared memory communication. This class is ** used by native methods of Java CommunShMem class. It contains *************** *** 50,62 **** public: ! /// read-write semaphore Semaphore sem1; ! /// write-read semaphore Semaphore sem2; - /// init semaphore - Semaphore isem; - /// shared memory SharedMemory shmem; --- 53,62 ---- public: ! /// semaphore (exclusive access to shared memory) Semaphore sem1; ! /// semaphore (synchronization) Semaphore sem2; /// shared memory SharedMemory shmem; *************** *** 68,71 **** --- 68,78 ---- int communStopped; + #ifdef WIN32 + #error FIXME + #else + /// server process ID + pid_t pid; + #endif + public: *************** *** 74,92 **** ** @param shmemId shared memory identifier (3 characters long only) ** @param size size of shared memory */ - - NativeCommunShMem( const String& shmemId, int size) : ! sem1( String( "1") + shmemId + "XXXXXXXXXX"), ! sem2( String( "2") + shmemId + "XXXXXXXXXX"), ! isem( String( "3") + shmemId + "XXXXXXXXXX", 1), ! shmem( String( "4") + shmemId + "XXXXXXXXXX", size), ! ! failed( JNI_FALSE), ! communStopped( 1) ! ! {}; /** Get pointer to data. This static method returns pointer ! ** to object of NativeCommunShMem type associated with ** this instance of Java CommunShMem object. ** --- 81,89 ---- ** @param shmemId shared memory identifier (3 characters long only) ** @param size size of shared memory */ ! NativeCommunShMem( const String& shmemId, int size); /** Get pointer to data. This static method returns pointer ! ** to instance of NativeCommunShMem class associated with ** this instance of Java CommunShMem object. ** *************** *** 98,101 **** --- 95,107 ---- public: + /** Check server. This routine checks whether server process + ** is alive or not. + ** + ** @return 1 (ok); + ** 0 (failed, doesn't exist) */ + + int checkServer(); + public: + /** Get size of buffer. This method is a native call ** of Buffer.getSize() method. *************** *** 146,149 **** --- 152,166 ---- }; + NativeCommunShMem::NativeCommunShMem( const String& shmemId, int size) : + + sem1( String( "1") + shmemId + "XXXXXXXXXX"), + sem2( String( "2") + shmemId + "XXXXXXXXXX"), + + shmem( String( "3") + shmemId + "XXXXXXXXXX", size), + + failed( JNI_FALSE), + communStopped( 1) { + } + NativeCommunShMem* NativeCommunShMem::get( JNIEnv* env, jobject obj) { *************** *** 162,165 **** --- 179,191 ---- } + int NativeCommunShMem::checkServer() { + + #ifdef WIN32 + #error FIXME + #else + return !kill( pid, 0); + #endif + } + jint NativeCommunShMem::Buffer_getSize( JNIEnv* env, jobject b) { *************** *** 236,241 **** ** @param shmemSize shared memory size ** - ** @see Java_CommunShMem_finalize() - ** ** @author Marek Przeczek */ --- 262,265 ---- *************** *** 272,277 **** ** @param obj this object ** - ** @see Java_CommunShMem_construct() - ** ** @author Marek Przeczek */ --- 296,299 ---- *************** *** 285,293 **** NativeCommunShMem* n = NativeCommunShMem::get( env, obj); ! if( !n->communStopped) ! Java_net_sourceforge_javaprofiler_jpiimpl_commun_CommunShMem_stopCommun( env, obj); ! if( n) delete n; } --- 307,357 ---- NativeCommunShMem* n = NativeCommunShMem::get( env, obj); + if( n) delete n; + } ! /** Native CommunShMem::initialize() method. It initializes ! ** communication interface thru shared memory and connects ! ** client to server side. ! ** ! ** @param env pointer to JNI environment ! ** @param obj this object ! ** ! ** @author Marek Przeczek */ ! /* ! * Class: net.sourceforge.javaprofiler.jpiimpl.commun.CommunShMem ! * Method: initialize ! * Signature: ()Z ! */ ! ! JNIEXPORT jboolean JNICALL Java_net_sourceforge_javaprofiler_jpiimpl_commun_CommunShMem_initialize ! (JNIEnv* env, jobject obj) { ! ! NativeCommunShMem* n = NativeCommunShMem::get( env, obj); ! if( !n) return JNI_FALSE; ! ! *(jint*)(n->shmem.getAddress()) = 0; ! n->communStopped = 0; ! ! n->sem2.reset(); ! ! #ifdef WIN32 ! #error FIXME ! #else ! pid_t* p = (pid_t*)((jint*)(n->shmem.getAddress())+1); ! ! *p = getpid(); ! #endif ! ! n->sem1.release(); ! n->sem2.wait(); ! ! #ifdef WIN32 ! #error FIXME ! #else ! n->pid = *p; ! #endif ! ! return JNI_TRUE; } *************** *** 301,306 **** ** @return this object ** - ** @see Java_CommunShMem_write() - ** ** @author Marek Przeczek */ --- 365,368 ---- *************** *** 317,340 **** if( !n) return obj; - n->sem2.wait(); - n->isem.wait(); - void* p = n->shmem.getAddress(); int shmemSize = n->shmem.getSize(); - - jint size = (signed)ntohl( *(jint*)p); ! if( size < 0) { ! ! n->failed = JNI_TRUE; ! n->sem2.release(); ! n->isem.release(); ! ! return obj; ! } ! n->isem.release(); ! if( size) { jint num = size/shmemSize; --- 379,391 ---- if( !n) return obj; void* p = n->shmem.getAddress(); int shmemSize = n->shmem.getSize(); ! n->sem2.wait(); ! jint size = *(jint*)p; ! if( size < 0 || !n->checkServer()) n->failed = JNI_TRUE; ! else if( size) { jint num = size/shmemSize; *************** *** 348,371 **** n->sem2.wait(); memcpy( q, p, shmemSize); } jint rest = size%shmemSize; ! if( rest) { n->sem1.release(); n->sem2.wait(); ! ! memcpy( q, p, rest); } - - n->sem1.release(); ! n->Buffer_useBuffer( env, b, buf, size); delete[] buf; } else n->Buffer_clear( env, b); ! return obj; } --- 399,431 ---- n->sem2.wait(); + if( !n->checkServer()) { + + n->failed = JNI_TRUE; + break; + } + memcpy( q, p, shmemSize); } + if( !n->checkServer()) n->failed = JNI_TRUE; + jint rest = size%shmemSize; ! if( rest && (n->failed == JNI_FALSE)) { n->sem1.release(); n->sem2.wait(); ! ! if( !n->checkServer()) n->failed = JNI_TRUE; ! else memcpy( q, p, rest); } ! if( n->failed == JNI_FALSE) n->Buffer_useBuffer( env, b, buf, size); delete[] buf; } else n->Buffer_clear( env, b); ! ! *(jint*)p = 0; ! return obj; } *************** *** 380,385 **** ** @return this object ** - ** @see Java_CommunShMem_read() - ** ** @author Marek Przeczek */ --- 440,443 ---- *************** *** 396,452 **** if( !n) return obj; - n->isem.wait(); - void* p = n->shmem.getAddress(); int shmemSize = n->shmem.getSize(); - - if( (signed)ntohl( *(jint*)p) < 0) { ! n->failed = JNI_TRUE; ! n->isem.release(); ! return obj; ! } ! ! n->communStopped = 0; ! n->isem.release(); ! jint size = n->Buffer_getSize( env, b); ! *(jint*)p = htonl( size); ! if( size) { ! ! n->sem1.release(); ! n->sem2.wait(); ! ! jint num = size/shmemSize; ! ! jbyteArray array; ! jbyte* elems = n->Buffer_getBuffer( env, b, array); ! ! jbyte* q = elems; ! ! for( int i = 0; i < num; i++, q += shmemSize) { ! ! memcpy( p, q, shmemSize); ! ! n->sem1.release(); ! n->sem2.wait(); } - - jint rest = size%shmemSize; - if( rest) { - - memcpy( p, q, rest); - - n->sem1.release(); - n->sem2.wait(); - } - - env->ReleaseByteArrayElements( array, elems, JNI_ABORT); } - else n->sem1.release(); return obj; } --- 454,507 ---- if( !n) return obj; void* p = n->shmem.getAddress(); int shmemSize = n->shmem.getSize(); ! if( *(jint*)p < 0 || !n->checkServer()) n->failed = JNI_TRUE; ! else { ! jint size = n->Buffer_getSize( env, b); ! *(jint*)p = size; ! if( size) { ! jint num = size/shmemSize; ! ! jbyteArray array; ! jbyte* elems = n->Buffer_getBuffer( env, b, array); ! ! jbyte* q = elems; ! ! for( int i = 0; i < num; i++, q += shmemSize) { ! ! n->sem1.release(); ! n->sem2.wait(); ! ! if( !n->checkServer()) { ! ! n->failed = JNI_TRUE; ! break; ! } ! ! memcpy( p, q, shmemSize); ! } ! ! if( !n->checkServer()) n->failed = JNI_TRUE; ! ! jint rest = size%shmemSize; ! if( rest && (n->failed == JNI_FALSE)) { ! ! n->sem1.release(); ! n->sem2.wait(); ! ! if( !n->checkServer()) n->failed = JNI_TRUE; ! else memcpy( p, q, rest); ! } ! env->ReleaseByteArrayElements( array, elems, JNI_ABORT); } } + n->sem1.release(); + return obj; } *************** *** 498,505 **** if( !n) return; ! n->isem.wait(); ! *(jint*)n->shmem.getAddress() = htonl( (unsigned)-1); n->communStopped = 1; ! n->isem.release(); } --- 553,561 ---- if( !n) return; ! *(jint*)(n->shmem.getAddress()) = -1; n->communStopped = 1; ! ! n->sem1.reset(); ! n->sem1.release(); } *************** *** 507,509 **** } #endif - --- 563,564 ---- |
From: Marek P. <ma...@us...> - 2002-01-26 10:19:46
|
Update of /cvsroot/javaprofiler/library In directory usw-pr-cvs1:/tmp/cvs-serv15950 Modified Files: README TODO Log Message: shared memory communication for linux fixed Index: README =================================================================== RCS file: /cvsroot/javaprofiler/library/README,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -r1.32 -r1.33 *** README 2001/11/28 00:02:40 1.32 --- README 2002/01/26 10:19:43 1.33 *************** *** 1,4 **** ! Java Profiling Tool ! alpha version --- 1,4 ---- ! Java Profiling Tool (http://javaprofiler.sourceforge.net/) ! beta version *************** *** 66,70 **** written in Java. Because of stability and standard Sun's JVM is used. ! * JDK 1.4.0 beta3 Nowadays, client's code is in separate CVS module called "jpiimpl". --- 66,70 ---- written in Java. Because of stability and standard Sun's JVM is used. ! * JDK 1.4.0 release candidate Nowadays, client's code is in separate CVS module called "jpiimpl". *************** *** 73,76 **** --- 73,80 ---- Read a README file in src2/ subdirectory before compiling. + Be sure you use the latest version of JVM mainly when using together + with dynamic profiler library. Elder versions of JVM's JVMPI are not + stable and dynamic profiler library may not function. + 1.3 Additional tools *************** *** 156,160 **** * GNU C/C++ 3.0.2 (gcc.gnu.org) [for free] ! * JDK 1.4.0 beta3 (java.sun.com) [for free] * Doxygen 1.2.12 (www.doxygen.org) [for free] --- 160,164 ---- * GNU C/C++ 3.0.2 (gcc.gnu.org) [for free] ! * JDK 1.4.0 release candidate (java.sun.com) [for free] * Doxygen 1.2.12 (www.doxygen.org) [for free] *************** *** 318,324 **** --- 322,341 ---- command-line arguments: + $ java -Xrunprofiler:arg1=val1,arg2=val2,... <Java program> + An example: + + + $ java -Xrunprofiler:commun_type=socket,connect_mode=server Test + + + So, Java program called "Test" will be profiled using dynamic profiler + library libprofiler.so (on Unix) or profiler.dll (on Win32) and + the communication with library is based on sockets where this library + participates as server part. + + Argument Value Description ----------------------------------------------------------------------- *************** *** 423,427 **** 7. AUTHORS ! * Marek Przeczek, 2001 * Petr Luner, 2001 ma...@us... lu...@us... --- 440,444 ---- 7. AUTHORS ! * Marek Przeczek, 2001, 2002 * Petr Luner, 2001, 2002 ma...@us... lu...@us... Index: TODO =================================================================== RCS file: /cvsroot/javaprofiler/library/TODO,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** TODO 2001/12/09 16:49:32 1.2 --- TODO 2002/01/26 10:19:43 1.3 *************** *** 1,3 **** ! 2001-12-03 This _MUST_ really be done in near future: --- 1,3 ---- ! 2002-01-26 This _MUST_ really be done in near future: |
From: Lukas P. <pe...@us...> - 2002-01-24 22:16:35
|
Update of /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl In directory usw-pr-cvs1:/tmp/cvs-serv13669 Added Files: DebugOutput.java Log Message: First version of DebugOutput --- NEW FILE: DebugOutput.java --- /* * Sun Public License Notice * * The contents of this file are subject to the Sun Public License Version * 1.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is available at http://www.sun.com/ * * The Original Code is the Java Profiler module. * The Initial Developers of the Original Code are Jan Stola, Pavel Vacha, * Michal Pise, Petr Luner, Lukas Petru and Marek Przeczek. * Portions created by Jan Stola are Copyright (C) 2000-2001. All Rights Reserved. * Portions created by Pavel Vacha are Copyright (C) 2000-2001. All Rights Reserved. * Portions created by Michal Pise are Copyright (C) 2000-2001. All Rights Reserved. * Portions created by Petr Luner are Copyright (C) 2000-2001. All Rights Reserved. * Portions created by Lukas Petru are Copyright (C) 2000-2001. All Rights Reserved. * Portions created by Marek Przeczek are Copyright (C) 2000-2001. All Rights Reserved. * * Contributors: Jan Stola, Pavel Vacha, Michal Pise, Petr Luner, * Lukas Petru and Marek Przeczek. */ package net.sourceforge.javaprofiler.jpiimpl; import java.util.*; import net.sourceforge.javaprofiler.jpiimpl.data.*; import net.sourceforge.javaprofiler.jpiimpl.commun.IProf; /** Sample class that prints Snapshot data in textual form. */ public class DebugOutput { /** Print snapshot data to System.out. * @param sn SnapshotImpl data to print. */ public static void print (SnapshotImpl sn) { // classes list, ClassData object type Iterator it = sn.classes().iterator(); while (it.hasNext()) { ClassData c = (ClassData) it.next(); System.out.println("CLASS = " + c.getName()); System.out.println(); System.out.println("METHODS:"); Iterator itM = c.getMethods().iterator(); while (itM.hasNext()) { MethodData m = (MethodData) itM.next(); System.out.println(m.getName() + " SIGN = " + m.getSignature() ); System.out.println(); } System.out.println("INSTANCE FIELDS:"); Iterator itI = c.getInstanceFields().iterator(); while (itI.hasNext()) { ClassFieldData f = (ClassFieldData) itI.next(); System.out.println(f.getName() + " SIGN = " + f.getSignature() ); System.out.println(); } System.out.println("STATIC FIELDS:"); Iterator itS = c.getStaticFields().iterator(); while (itS.hasNext()) { ClassFieldData f = (ClassFieldData) itS.next(); System.out.println(f.getName() + " SIGN = " + f.getSignature() ); System.out.println(); } } // groupThreads list, ThreadGroupData object type it = sn.groupOfThreads().iterator(); while (it.hasNext()) { ThreadGroupData g = (ThreadGroupData) it.next(); System.out.println("GROUP = " + g.getName()); Iterator itT = g.getThreads().iterator(); while (itT.hasNext()) { ThreadData th = (ThreadData) itT.next(); System.out.println(th.getName() + " : "); } } // objectTypes list, AllocClassData object type it = sn.allocObjects().iterator(); while (it.hasNext()) { AllocClassData o = (AllocClassData) it.next(); System.out.println("OBJECT TYPE:"); ClassData c = o.getClassData(); if (c != null) System.out.println("CLASS = " + c.getName()); System.out.println("IS_ARRAY = "); String s; switch (o.getType()) { case IProf.JVMPI_NORMAL_OBJECT: s = "JVMPI_NORMAL_OBJECT"; break; case IProf.JVMPI_CLASS: s = "JVMPI_CLASS"; break; case IProf.JVMPI_BOOLEAN: s = "JVMPI_BOOLEAN"; break; case IProf.JVMPI_BYTE: s = "JVMPI_BYTE"; break; case IProf.JVMPI_CHAR: s = "JVMPI_CHAR"; break; case IProf.JVMPI_SHORT: s = "JVMPI_SHORT"; break; case IProf.JVMPI_INT: s = "JVMPI_INT"; break; case IProf.JVMPI_LONG: s = "JVMPI_LONG"; break; case IProf.JVMPI_FLOAT: s = "JVMPI_FLOAT"; break; case IProf.JVMPI_DOUBLE: s = "JVMPI_DOUBLE"; break; default: s = null; break; } System.out.println(s); System.out.println(); } // arenas list, AllocArenaData object type // FIX arenas() it = sn.arenas().iterator(); while (it.hasNext()) { AllocArenaData a = (AllocArenaData) it.next(); System.out.println("ARENA = " + a.getName()); System.out.println(); } // instances are N/A from IProf! // leaving blank // gcs list, GCData object type // FIX gcs() it = sn.gcs().iterator(); while (it.hasNext()) { GCData g = (GCData) it.next(); System.out.println("GC:"); System.out.println("start: " + g.getStartTime()); System.out.println("end: " + g.getEndTime()); } // jniGlobalRefs and jniWeakGlobalRefs are N/A from IProf! // leaving blank // Hash Statistics are N/A. // leaving blank // Total summary int totalClasses = 0; int totalMethods = 0; int totalAllocTraces = 0; int totalAllocObjects = 0; int totalAllocObjectMethods = 0; int totalAllocObjectTraces = 0; int totalThreads = 0; int totalAllocThreadObjects = 0; int totalAllocThreadObjectMethods = 0; int totalAllocThreadObjectTraces = 0; int totalAllocThreadMethods = 0; int totalAllocThreadTraces = 0; int totalCpuTraces = 0; int totalCpuThreadMethods = 0; int totalCpuThreadTraces = 0; int totalMonTraces = 0; int totalMonThreadMethods = 0; int totalMonThreadTraces = 0; it = sn.classes().iterator(); while (it.hasNext()) { ClassData c = (ClassData) it.next(); Iterator itM = c.getMethods().iterator(); while (itM.hasNext()) { MethodData m = (MethodData) itM.next(); Iterator itT = m.getAllocTraces().values().iterator(); while (itT.hasNext()) { AllocTraceData t = (AllocTraceData) itT.next(); totalAllocTraces ++; } itT = m.getCPUTraces().values().iterator(); while (itT.hasNext()) { CPUTraceData t = (CPUTraceData) itT.next(); totalCpuTraces ++; } itT = m.getMonTraces().values().iterator(); while (itT.hasNext()) { MonTraceData t = (MonTraceData) itT.next(); totalMonTraces ++; } totalMethods ++; } totalClasses ++; } it = sn.allocObjects().iterator(); while (it.hasNext()) { AllocClassData a = (AllocClassData) it.next(); Iterator itM = a.getMethods().values().iterator(); while (itM.hasNext()) { AllocClassMethodData m = (AllocClassMethodData) itM.next(); Iterator itT = m.getTraces().values().iterator(); while (itT.hasNext()) { AllocClassTraceData t = (AllocClassTraceData) itT.next(); totalAllocObjectTraces ++; } totalAllocObjectMethods ++; } totalAllocObjects ++; } it = sn.threads().iterator(); while (it.hasNext()) { ThreadData th = (ThreadData) it.next(); Iterator itA = th.getClasses().values().iterator(); while (itA.hasNext()) { AllocThreadClassData a = (AllocThreadClassData) itA.next(); Iterator itM = a.getMethods().values().iterator(); while (itM.hasNext()) { AllocThreadClassMethodData m = (AllocThreadClassMethodData) itM.next(); Iterator itT = m.getTraces().values().iterator(); while (itT.hasNext()) { AllocThreadClassTraceData t = (AllocThreadClassTraceData) itT.next(); totalAllocThreadObjectTraces ++; } totalAllocThreadObjectMethods ++; } totalAllocThreadObjects ++; } Iterator itM = th.getAllocMethods().values().iterator(); while (itM.hasNext()) { AllocThreadMethodData m = (AllocThreadMethodData) itM.next(); Iterator itT = m.getTraces().values().iterator(); while (itT.hasNext()) { AllocThreadTraceData t = (AllocThreadTraceData) itT.next(); totalAllocThreadTraces ++; } totalAllocThreadMethods ++; } itM = th.getCPUMethods().values().iterator(); while (itM.hasNext()) { CPUThreadMethodData m = (CPUThreadMethodData) itM.next(); Iterator itT = m.getTraces().values().iterator(); while (itT.hasNext()) { CPUThreadTraceData t = (CPUThreadTraceData) itT.next(); totalCpuThreadTraces ++; } totalCpuThreadMethods ++; } itM = th.getMonMethods().values().iterator(); while (itM.hasNext()) { MonThreadMethodData m = (MonThreadMethodData) itM.next(); Iterator itT = m. getTraces().values().iterator(); while (itT.hasNext()) { MonThreadTraceData t = (MonThreadTraceData) itT.next(); totalMonThreadTraces ++; } totalMonThreadMethods ++; } totalThreads ++; } System.out.println("TOTALS:"); System.out.println(); System.out.println("Classes: " + totalClasses); System.out.println("Methods: " + totalMethods); System.out.println("Threads: " + totalThreads); System.out.println(); System.out.println("AllocObject: " + totalAllocObjects); System.out.println("AllocThreadObject: " + totalAllocThreadObjects); System.out.println(); System.out.println("AllocObjectMethod: " + totalAllocObjectMethods); System.out.println("AllocThreadMethod: " + totalAllocThreadMethods); System.out.println("AllocThreadObjectMethod: " + totalAllocThreadObjectMethods); System.out.println(); System.out.println("AllocTrace: " + totalAllocTraces); System.out.println("AllocObjectTrace: " + totalAllocObjectTraces); System.out.println("AllocThreadTrace: " + totalAllocThreadTraces); System.out.println("AllocThreadObjectTrace: " + totalAllocThreadObjectTraces); System.out.println(); System.out.println("CpuThreadMethod: " + totalCpuThreadMethods); System.out.println(); System.out.println("CpuTrace: " + totalCpuTraces); System.out.println("CpuThreadTrace: " + totalCpuThreadTraces); System.out.println(); System.out.println("MonThreadMethod: " + totalMonThreadMethods); System.out.println(); System.out.println("MonTrace: " + totalMonTraces); System.out.println("MonThreadTrace: " + totalMonThreadTraces); System.out.println(); } } /* * $Log: DebugOutput.java,v $ * Revision 1.1 2002/01/24 22:16:31 petrul * First version of DebugOutput * */ |
From: Pavel V. <va...@us...> - 2002-01-15 22:08:24
|
Update of /cvsroot/javaprofiler/test/snapshot In directory usw-pr-cvs1:/tmp/cvs-serv10350 Added Files: readme.txt Log Message: initial revision --- NEW FILE: readme.txt --- how to compile TestSnap: ------------------------ SET CLASSPATH=..\..\jpiimpl\jpiimpl.jar;.\;%CLASSPATH% d:\j2sdk1.4.0-beta3\bin\javac TestSnap.java |
Update of /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/data In directory usw-pr-cvs1:/tmp/cvs-serv9572 Modified Files: ThreadData.java MethodData.java AllocTraceData.java AllocThreadTraceData.java AllocThreadMethodData.java Log Message: addClass() modified adding allocClassData insted fo classData Index: ThreadData.java =================================================================== RCS file: /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/data/ThreadData.java,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -r1.11 -r1.12 *** ThreadData.java 2002/01/11 22:22:16 1.11 --- ThreadData.java 2002/01/15 22:05:56 1.12 *************** *** 188,200 **** /** ! * Adds class whose instances were allocated in this thread. * ! * @param clazz class whose instances were allocated in this thread. */ ! void addClass(AllocThreadClassData clazz) { ! //FIXME: classData may be null => throws null pointer exception ! //temporary fix ! if ( clazz.getClazz().getClassData() != null ) ! classes.put(new Integer(clazz.getClazz().getClassData().getID()), clazz); } --- 188,199 ---- /** ! * Adds allocClass whose were allocated in this thread. AllocClass ! * can be instance of class its array. * ! * @param allocClass allocClass that were allocated in this thread. */ ! void addClass(AllocThreadClassData allocClass) { ! //FIXME: ! classes.put(new Integer(allocClass.getID()), allocClass); } *************** *** 301,304 **** --- 300,307 ---- /* * $Log$ + * Revision 1.12 2002/01/15 22:05:56 vachis + * addClass() modified + * adding allocClassData insted fo classData + * * Revision 1.11 2002/01/11 22:22:16 vachis * unnecessary test removed Index: MethodData.java =================================================================== RCS file: /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/data/MethodData.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -r1.9 -r1.10 *** MethodData.java 2002/01/11 22:22:16 1.9 --- MethodData.java 2002/01/15 22:05:56 1.10 *************** *** 293,306 **** /** ! * Adds class whose instances were allocated in this method. * ! * @param clazz class whose instances were allocated in this method. */ ! void addClass(AllocClassMethodData clazz) { ! //!!FIXME in some cases, like array of int (it can be recognised from ! // clazz.isArrary>1) instance clazz have null refernce to class ! //temporary fix ! if( clazz.getClazz().getClassData() != null ) ! classes.put(new Integer(clazz.getClazz().getClassData().getID()), clazz); } --- 293,303 ---- /** ! * Adds allocClass whose were allocated in this method. AllocClass ! * can be instance of class its array. * ! * @param allocClass allocClass that were allocated in this method. */ ! void addClass(AllocClassMethodData allocClass) { ! classes.put(new Integer(allocClass.getID()), allocClass); } *************** *** 534,537 **** --- 531,538 ---- /* * $Log$ + * Revision 1.10 2002/01/15 22:05:56 vachis + * addClass() modified + * adding allocClassData insted fo classData + * * Revision 1.9 2002/01/11 22:22:16 vachis * unnecessary test removed Index: AllocTraceData.java =================================================================== RCS file: /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/data/AllocTraceData.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -r1.9 -r1.10 *** AllocTraceData.java 2002/01/11 22:22:16 1.9 --- AllocTraceData.java 2002/01/15 22:05:56 1.10 *************** *** 107,119 **** /** ! * Adds class whose instances were allocated in this trace. * ! * @param clazz class whose instances were allocated in this trace. */ ! void addClass(AllocClassTraceData clazz) { ! //FIXMEE: classDaa may be null => it throws null pointer exception ! //temporary fix ! if (clazz.getClassMethod().getClazz().getClassData() != null) ! classes.put(new Integer(clazz.getClassMethod().getClazz().getClassData().getID()), clazz); } --- 107,118 ---- /** ! * Adds allocClass whose were allocated in this trace. AllocClass ! * can be instance of class its array. * ! * @param allocClass allocClass that were allocated in this trace. */ ! void addClass(AllocClassTraceData allocClass) { ! //FIXMEE: ! classes.put(new Integer(allocClass.getID()), allocClass); } *************** *** 164,167 **** --- 163,170 ---- /* * $Log$ + * Revision 1.10 2002/01/15 22:05:56 vachis + * addClass() modified + * adding allocClassData insted fo classData + * * Revision 1.9 2002/01/11 22:22:16 vachis * unnecessary test removed Index: AllocThreadTraceData.java =================================================================== RCS file: /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/data/AllocThreadTraceData.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -r1.8 -r1.9 *** AllocThreadTraceData.java 2002/01/11 22:22:16 1.8 --- AllocThreadTraceData.java 2002/01/15 22:05:57 1.9 *************** *** 98,112 **** /** ! * Adds class whose instances were allocated in the given trace ! * and thread. * ! * @param clazz class whose instances were allocated in the given trace * and thread. */ ! void addClass(AllocThreadClassTraceData clazz) { ! // FIXME: classData may be null => it throws null pointer excepion ! //temporary fix ! if( clazz.getClassTrace().getClassMethod().getClazz().getClassData() != null ) ! classes.put(new Integer(clazz.getClassTrace().getClassMethod().getClazz().getClassData().getID()), clazz); } --- 98,110 ---- /** ! * Adds allocClass whose were allocated in this given trace ! * and thread. AllocClass can be instance of class its array. * ! * @param allocClass allocClass that were allocated in the given trace * and thread. */ ! void addClass(AllocThreadClassTraceData allocClass) { ! // FIXME: ! classes.put(new Integer(allocClass.getID()), allocClass); } *************** *** 128,131 **** --- 126,133 ---- /* * $Log$ + * Revision 1.9 2002/01/15 22:05:57 vachis + * addClass() modified + * adding allocClassData insted fo classData + * * Revision 1.8 2002/01/11 22:22:16 vachis * unnecessary test removed Index: AllocThreadMethodData.java =================================================================== RCS file: /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/data/AllocThreadMethodData.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -r1.8 -r1.9 *** AllocThreadMethodData.java 2002/01/11 22:22:16 1.8 --- AllocThreadMethodData.java 2002/01/15 22:05:57 1.9 *************** *** 104,116 **** /** ! * Adds class whose instances were allocated in this method and thread. * ! * @param clazz class whose instances were allocated in this method and thread. */ ! void addClass(AllocThreadClassMethodData clazz) { ! //FIXME class classData maybe null => it throws null pointer exception ! //temporary fix ! if( clazz.getClassMethod().getClazz().getClassData() != null ) ! classes.put(new Integer(clazz.getClassMethod().getClazz().getClassData().getID()), clazz); } --- 104,115 ---- /** ! * Adds allocClass whose were allocated in this given method ! * and thread. AllocClass can be instance of class its array. * ! * @param allocClass allocClass that were allocated in this method and thread. */ ! void addClass(AllocThreadClassMethodData allocClass) { ! //FIXME ! classes.put(new Integer(allocClass.getID()), allocClass); } *************** *** 161,164 **** --- 160,167 ---- /* * $Log$ + * Revision 1.9 2002/01/15 22:05:57 vachis + * addClass() modified + * adding allocClassData insted fo classData + * * Revision 1.8 2002/01/11 22:22:16 vachis * unnecessary test removed |
From: Pavel V. <va...@us...> - 2002-01-15 18:38:40
|
Update of /cvsroot/javaprofiler/jpiimpl In directory usw-pr-cvs1:/tmp/cvs-serv819 Modified Files: build.xml Log Message: no message Index: build.xml =================================================================== RCS file: /cvsroot/javaprofiler/jpiimpl/build.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** build.xml 2002/01/15 08:12:17 1.2 --- build.xml 2002/01/15 18:38:37 1.3 *************** *** 1,4 **** <?xml version="1.0" encoding="UTF-8"?> ! <project basedir="../" default="compile" name="jpiimpl"> <!-- configuration ************************************************** --> --- 1,4 ---- <?xml version="1.0" encoding="UTF-8"?> ! <project basedir="../" default="all" name="jpiimpl"> <!-- configuration ************************************************** --> *************** *** 15,19 **** <!-- Common jar pattern set --> ! <patternset id="project.jarpattern.exclude" > <exclude name="**/*.java"/> <exclude name="**/*.bak"/> --- 15,19 ---- <!-- Common jar pattern set --> ! <patternset id="project.jarpattern.exclude"> <exclude name="**/*.java"/> <exclude name="**/*.bak"/> *************** *** 30,45 **** ! <!-- <target depends="init" name="interface"> ! <javac debug="true" failonerror="true" srcdir="interface/net"> ! <classpath> ! <pathelement location="jpiimpl"/> ! <pathelement location="interface"/> ! </classpath> ! <src> ! <pathelement location="jpiimpl/net"/> ! <pathelement location="interface/net"/> ! </src> ! </javac> ! </target> --> --- 30,34 ---- ! <!-- <target depends="init" name="interface"> <javac debug="true" failonerror="true" srcdir="interface/net"> <classpath> <pathelement location="jpiimpl"/> <pathelement location="interface"/> </classpath> <src> <pathelement location="jpiimpl/net"/> <pathelement location="interface/net"/> </src> </javac> </target> --> *************** *** 63,67 **** <!-- Main-Class: com.foo.Main --> <!-- 3. Pass to <jar>: manifest="myapp.mf" --> ! <jar compress="true" jarfile="jpiimpl/jpiimpl.jar" defaultexcludes="yes"> <fileset dir="jpiimpl"> <include name="net/**/*"/> --- 52,56 ---- <!-- Main-Class: com.foo.Main --> <!-- 3. Pass to <jar>: manifest="myapp.mf" --> ! <jar compress="true" defaultexcludes="yes" jarfile="jpiimpl/jpiimpl.jar"> <fileset dir="jpiimpl"> <include name="net/**/*"/> *************** *** 90,112 **** ! <target depends="init" description="Javadoc for my API." name="javadoc" > <mkdir dir="jpiimpl/docs/javadoc"/> ! <javadoc defaultexcludes="yes" destdir="jpiimpl/docs/javadoc" private="on" ! Windowtitle="JPI and Implementation" ! group="JPI net.sourceforge.javaprofiler.jpi*,Implementation net.sourceforge.javaprofiler.jpiimpl*"> <doctitle>Java Profiling Interface and Implementation</doctitle> <package name="net.sourceforge.javaprofiler.jpiimpl.*"/> <package name="net.sourceforge.javaprofiler.jpi.*"/> ! <!-- <group title="Group 1 Packages" packages="net.sourceforge.javaprofiler.jpi*"/> ! <group title="Group 2 Packages" packages="com.dummy.test.b*:com.dummy.test.c*:net*"/> ! --> ! ! <!-- <group title="Java Profiling Interface" > ! <package name="net.sourceforge.javaprofiler.jpi*"/> ! </group> ! <group title="Implementation" > ! <package name="net.sourceforge.net.jpiimpl*"/> ! </group> --> <sourcepath> --- 79,92 ---- ! <target depends="init" description="Javadoc for my API." name="javadoc"> <mkdir dir="jpiimpl/docs/javadoc"/> ! <javadoc Windowtitle="JPI and Implementation" defaultexcludes="yes" destdir="jpiimpl/docs/javadoc" group="JPI net.sourceforge.javaprofiler.jpi*,Implementation net.sourceforge.javaprofiler.jpiimpl*" private="on"> <doctitle>Java Profiling Interface and Implementation</doctitle> <package name="net.sourceforge.javaprofiler.jpiimpl.*"/> <package name="net.sourceforge.javaprofiler.jpi.*"/> ! <!-- <group title="Group 1 Packages" packages="net.sourceforge.javaprofiler.jpi*"/> <group title="Group 2 Packages" packages="com.dummy.test.b*:com.dummy.test.c*:net*"/> --> ! ! <!-- <group title="Java Profiling Interface" > <package name="net.sourceforge.javaprofiler.jpi*"/> </group> <group title="Implementation" > <package name="net.sourceforge.net.jpiimpl*"/> </group> --> <sourcepath> *************** *** 120,128 **** <target depends="init" description="Doxygen documentation for my API." name="doxygen"> <mkdir dir="jpiimpl/docs/doxygen"/> ! <!-- <exec executable="doxygen" failonerro="no"> //+params for os ! <arg line=""/> ! <arg vaule=""/> ! <arg path=""/> ! </exec> --> </target> --- 100,104 ---- <target depends="init" description="Doxygen documentation for my API." name="doxygen"> <mkdir dir="jpiimpl/docs/doxygen"/> ! <!-- <exec executable="doxygen" failonerro="no"> //+params for os <arg line=""/> <arg vaule=""/> <arg path=""/> </exec> --> </target> |
From: Pavel V. <va...@us...> - 2002-01-15 18:35:04
|
Update of /cvsroot/javaprofiler/test/snapshot In directory usw-pr-cvs1:/tmp/cvs-serv32195 Modified Files: runsnap.bat run2.bat run1.bat Log Message: eaier configuration Index: runsnap.bat =================================================================== RCS file: /cvsroot/javaprofiler/test/snapshot/runsnap.bat,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** runsnap.bat 2002/01/04 00:11:26 1.1 --- runsnap.bat 2002/01/15 18:34:51 1.2 *************** *** 1,4 **** ! SET CLASSPATH=..\..\jpiimpl;..\..\interface;.\;%CLASSPATH% ! set path=d:\j2sdk1.4.0-beta3\bin;%path% java TestSnap - rem > outsnap.txt \ No newline at end of file --- 1,6 ---- ! SET JAVA_HOME=d:\j2sdk1.4.0-beta3 ! rem **************************** ! rem SET CLASSPATH=..\..\jpiimpl;..\..\interface;.\;%CLASSPATH% ! SET CLASSPATH=..\..\jpiimpl\jpiimpl.jar;.\;%CLASSPATH% ! set path=%JAVA_HOME%\bin;%path% java TestSnap Index: run2.bat =================================================================== RCS file: /cvsroot/javaprofiler/test/snapshot/run2.bat,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** run2.bat 2002/01/04 00:11:26 1.1 --- run2.bat 2002/01/15 18:34:52 1.2 *************** *** 1,3 **** ! SET CLASSPATH=.\SwingSet2.jar;%CLASSPATH% ! set path=d:\j2sdk1.4.0-beta3\bin;%path% ! java -Xrun\Project\javaprof\library\src\profiler\profiler:commun_type=socket SwingSet2 > out2.txt --- 1,5 ---- ! SET JAVA_HOME=d:\j2sdk1.4.0-beta3 ! rem ************************** ! SET CLASSPATH=%JAVA_HOME%\demo\jfc\SwingSet2\SwingSet2.jar;%CLASSPATH% ! set path=%JAVA_HOME%\bin;%path% ! java -Xrun..\..\library\src\profiler\profiler:commun_type=socket SwingSet2 Index: run1.bat =================================================================== RCS file: /cvsroot/javaprofiler/test/snapshot/run1.bat,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** run1.bat 2002/01/04 00:11:26 1.1 --- run1.bat 2002/01/15 18:34:55 1.2 *************** *** 1,6 **** ! SET CLASSPATH=.\Notepad.jar;%CLASSPATH% ! rem java -Xrunprofiler Notepad ! rem java Notepad ! set path=d:\j2sdk1.4.0-beta3\bin;%path% ! java -Xrun\Project\javaprof\library\src\profiler\profiler:commun_type=socket Notepad rem > out1.txt --- 1,6 ---- ! SET JAVA_HOME=d:\j2sdk1.4.0-beta3 ! rem ************************** ! SET CLASSPATH=%JAVA_HOME%\demo\jfc\Notepad\Notepad.jar;%CLASSPATH% ! set path=%JAVA_HOME%\bin;%path% ! java -Xrun..\..\library\src\profiler\profiler:commun_type=socket Notepad rem > out1.txt |
From: Pavel V. <va...@us...> - 2002-01-15 09:03:45
|
Update of /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl In directory usw-pr-cvs1:/tmp/cvs-serv31463 Modified Files: VirtualMachineImpl.java Log Message: no message Index: VirtualMachineImpl.java =================================================================== RCS file: /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/VirtualMachineImpl.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** VirtualMachineImpl.java 2001/12/09 23:29:25 1.2 --- VirtualMachineImpl.java 2002/01/15 09:03:41 1.3 *************** *** 59,62 **** --- 59,64 ---- } catch (COMMUN_Exception e) { throw new VMDisconnectedException(); + } catch (UNAVAILABLE_Exception e) { + //PENDING } } *************** *** 151,154 **** --- 153,158 ---- } catch (COMMUN_Exception e) { throw new VMDisconnectedException(); + } catch (UNAVAILABLE_Exception e) { + //PENDING } } *************** *** 210,213 **** --- 214,219 ---- } catch (COMMUN_Exception e) { throw new VMDisconnectedException(); + } catch (UNAVAILABLE_Exception e) { + //PENDING } } *************** *** 256,259 **** --- 262,267 ---- } catch (COMMUN_Exception e) { throw new VMDisconnectedException(); + } catch (UNAVAILABLE_Exception e) { + //PENDING } } *************** *** 287,290 **** --- 295,301 ---- /* * $Log$ + * Revision 1.3 2002/01/15 09:03:41 vachis + * no message + * * Revision 1.2 2001/12/09 23:29:25 vachis * impl of enableGC(), snapshot() |
From: Pavel V. <va...@us...> - 2002-01-15 08:12:21
|
Update of /cvsroot/javaprofiler/jpiimpl In directory usw-pr-cvs1:/tmp/cvs-serv12082 Modified Files: build.xml Log Message: fixies Index: build.xml =================================================================== RCS file: /cvsroot/javaprofiler/jpiimpl/build.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** build.xml 2002/01/14 08:01:32 1.1 --- build.xml 2002/01/15 08:12:17 1.2 *************** *** 2,5 **** --- 2,11 ---- <project basedir="../" default="compile" name="jpiimpl"> + <!-- configuration ************************************************** --> + <path id="project.doxygen.dir" path="D:\Program Files\doxygen-1.2.12"/> + <path id="project.doxygen.exec" path="${project.doxygen.dir}\bin\doxygen.exe"/> + + <!-- end of configuration ******************************************* --> + <!-- Common classpath --> <path id="project.classpath"> *************** *** 7,16 **** <pathelement location="interface"/> </path> ! ! <target name="init"> <!-- You can set up any variables you want used throughout the script here. --> <property name="hello" value="world"/> ! </target> <!-- <target depends="init" name="interface"> --- 13,32 ---- <pathelement location="interface"/> </path> ! ! <!-- Common jar pattern set --> ! <patternset id="project.jarpattern.exclude" > ! <exclude name="**/*.java"/> ! <exclude name="**/*.bak"/> ! <exclude name="**/*.form"/> ! <exclude name="**/.nbattrs"/> ! <exclude name="docs"/> ! <!-- others are in deafult exlcudes (cvsfiles, "*~",".#*", etc.) --> ! </patternset> ! <target name="init"> <!-- You can set up any variables you want used throughout the script here. --> <property name="hello" value="world"/> ! </target> ! <!-- <target depends="init" name="interface"> *************** *** 27,30 **** --- 43,47 ---- </target> --> + <target depends="init" name="compile"> <property name="cp" refid="project.classpath"/> *************** *** 38,41 **** --- 55,59 ---- </target> + <target depends="init,compile" name="jar"> <!-- To make a standalone app: --> *************** *** 45,60 **** <!-- Main-Class: com.foo.Main --> <!-- 3. Pass to <jar>: manifest="myapp.mf" --> ! <jar basedir="jpiimpl" compress="true" jarfile="jpiimpl/jpiimpl.jar" defaultexcludes="yes"> ! <!-- How can I include interface too? --> ! <include name="net/**/*"/> ! <exclude name="**/*.java"/> ! <exclude name="**/*.form"/> ! <exclude name="**/.nbattrs"/> ! <exclude name="jpiimpl.mf"/> ! <exclude name="jpiimpl.jar"/> ! <exclude name="docs"/> </jar> </target> <target depends="init,jar,javadoc,doxygen" description="Build everything." name="all"> <echo message="Application built. "/> --- 63,81 ---- <!-- Main-Class: com.foo.Main --> <!-- 3. Pass to <jar>: manifest="myapp.mf" --> ! <jar compress="true" jarfile="jpiimpl/jpiimpl.jar" defaultexcludes="yes"> ! <fileset dir="jpiimpl"> ! <include name="net/**/*"/> ! <patternset refid="project.jarpattern.exclude"/> ! <exclude name="jpiimpl.mf"/> ! <exclude name="jpiimpl.jar"/> ! </fileset> ! <fileset dir="interface"> ! <include name="net/**/*"/> ! <patternset refid="project.jarpattern.exclude"/> ! </fileset> </jar> </target> + <target depends="init,jar,javadoc,doxygen" description="Build everything." name="all"> <echo message="Application built. "/> *************** *** 68,78 **** <!-- <arg file="myfile.txt"/> </java> </target> --> ! <!-- group="JPI_interface net.sourceforge.net.jpi*,JPI_implementation net.sourceforge.net.jpiimpl*" --> ! <target depends="init" description="Javadoc for my API." name="javadoc"> ! <mkdir dir="docs/javadoc"/> ! <javadoc defaultexcludes="yes" destdir="docs/javadoc" private="on"> <package name="net.sourceforge.javaprofiler.jpiimpl.*"/> <package name="net.sourceforge.javaprofiler.jpi.*"/> <sourcepath> <pathelement location="interface"/> --- 89,113 ---- <!-- <arg file="myfile.txt"/> </java> </target> --> ! ! <target depends="init" description="Javadoc for my API." name="javadoc" > ! <mkdir dir="jpiimpl/docs/javadoc"/> ! <javadoc defaultexcludes="yes" destdir="jpiimpl/docs/javadoc" private="on" ! Windowtitle="JPI and Implementation" ! group="JPI net.sourceforge.javaprofiler.jpi*,Implementation net.sourceforge.javaprofiler.jpiimpl*"> ! <doctitle>Java Profiling Interface and Implementation</doctitle> <package name="net.sourceforge.javaprofiler.jpiimpl.*"/> <package name="net.sourceforge.javaprofiler.jpi.*"/> + <!-- <group title="Group 1 Packages" packages="net.sourceforge.javaprofiler.jpi*"/> + <group title="Group 2 Packages" packages="com.dummy.test.b*:com.dummy.test.c*:net*"/> + --> + + <!-- <group title="Java Profiling Interface" > + <package name="net.sourceforge.javaprofiler.jpi*"/> + </group> + <group title="Implementation" > + <package name="net.sourceforge.net.jpiimpl*"/> + </group> --> + <sourcepath> <pathelement location="interface"/> *************** *** 82,89 **** </target> <target depends="init" description="Doxygen documentation for my API." name="doxygen"> ! <mkdir dir="docs/doxygen"/> </target> <target depends="init" description="Clean all build products." name="clean"> <delete> --- 117,131 ---- </target> + <target depends="init" description="Doxygen documentation for my API." name="doxygen"> ! <mkdir dir="jpiimpl/docs/doxygen"/> ! <!-- <exec executable="doxygen" failonerro="no"> //+params for os ! <arg line=""/> ! <arg vaule=""/> ! <arg path=""/> ! </exec> --> </target> + <target depends="init" description="Clean all build products." name="clean"> <delete> *************** *** 97,104 **** </fileset> </delete> ! <delete file="jpiimpl.jar"/> ! <delete dir="docs/javadoc"/> ! <delete dir="docs/doxygen"/> </target> ! </project> --- 139,146 ---- </fileset> </delete> ! <delete file="jpiimpl/jpiimpl.jar"/> ! <delete dir="jpiimpl/docs/javadoc"/> ! <delete dir="jpiimpl/docs/doxygen"/> </target> ! </project> |