From: Marek P. <ma...@us...> - 2002-07-17 22:05:59
|
Update of /cvsroot/javaprofiler/library/src/prof In directory usw-pr-cvs1:/tmp/cvs-serv17399/src/prof Modified Files: prof_gc.cpp prof_jvm.cpp prof_monitor.cpp prof_thread.cpp Log Message: fixes date represented in milliseconds since 1.1.1970 gc start/end times, thread start/end times Index: prof_gc.cpp =================================================================== RCS file: /cvsroot/javaprofiler/library/src/prof/prof_gc.cpp,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -r1.9 -r1.10 *** prof_gc.cpp 21 Nov 2001 22:31:44 -0000 1.9 --- prof_gc.cpp 17 Jul 2002 22:05:56 -0000 1.10 *************** *** 35,38 **** --- 35,39 ---- #include "../prof/prof.h" #include "../gc/gc.h" + #include "../delay/delay.h" void Prof::event_gcStart( JVMPI_Event* event) { *************** *** 55,59 **** GC* gc = new GC; ! gc->startTime = time( NULL); gcStat.add( gc); --- 56,60 ---- GC* gc = new GC; ! gc->startTime = Delay::getTime(); gcStat.add( gc); *************** *** 64,68 **** GC* gc = gcStat.first(); ! gc->endTime = time( NULL); gc->usedObjects = event->u.gc_info.used_objects; --- 65,69 ---- GC* gc = gcStat.first(); ! gc->endTime = Delay::getTime(); gc->usedObjects = event->u.gc_info.used_objects; Index: prof_jvm.cpp =================================================================== RCS file: /cvsroot/javaprofiler/library/src/prof/prof_jvm.cpp,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -r1.29 -r1.30 *** prof_jvm.cpp 16 Apr 2002 12:41:35 -0000 1.29 --- prof_jvm.cpp 17 Jul 2002 22:05:56 -0000 1.30 *************** *** 178,183 **** cout << "GC:" << endl; ! cout << "start: " << ctime( &gc->startTime) << endl; ! cout << "end: " << ctime( &gc->endTime) << endl; cout << endl; --- 178,187 ---- cout << "GC:" << endl; ! ! time_t st = (time_t)(gc->startTime/1000); ! cout << "start: " << ctime( &st) << endl; ! ! time_t et = (time_t)(gc->endTime/1000); ! cout << "end: " << ctime( &et) << endl; cout << endl; Index: prof_monitor.cpp =================================================================== RCS file: /cvsroot/javaprofiler/library/src/prof/prof_monitor.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -r1.7 -r1.8 *** prof_monitor.cpp 15 Apr 2002 21:04:18 -0000 1.7 --- prof_monitor.cpp 17 Jul 2002 22:05:56 -0000 1.8 *************** *** 79,83 **** t->monitorEnter = 0; ! unsigned long curTime = Delay::getMilliticks(); if (curTime < t->monitorEnterTime) return; --- 79,83 ---- t->monitorEnter = 0; ! jlong curTime = Delay::getMilliticks(); if (curTime < t->monitorEnterTime) return; Index: prof_thread.cpp =================================================================== RCS file: /cvsroot/javaprofiler/library/src/prof/prof_thread.cpp,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -r1.17 -r1.18 *** prof_thread.cpp 25 May 2002 00:05:06 -0000 1.17 --- prof_thread.cpp 17 Jul 2002 22:05:56 -0000 1.18 *************** *** 36,39 **** --- 36,40 ---- #include "../shared/groupThread.h" #include "../prof/synchronized.h" + #include "../delay/delay.h" int Prof::findParent( Thread* t, void** inout) { *************** *** 86,90 **** t->threadEnvId = envId; ! t->startTime = time( NULL); threads.add( t); --- 87,91 ---- t->threadEnvId = envId; ! t->startTime = Delay::getTime(); threads.add( t); *************** *** 124,128 **** if( t) { ! t->endTime = time( NULL); t->deactivate(); } --- 125,129 ---- if( t) { ! t->endTime = Delay::getTime(); t->deactivate(); } |