Update of /cvsroot/javaprofiler/library/src/cpu
In directory usw-pr-cvs1:/tmp/cvs-serv21227/src/cpu
Modified Files:
cpuThreadMethod.cpp cpuThreadTrace.cpp cpuTrace.cpp
sampling.cpp
Log Message:
serious bug fixes - monitors, deactivating...
interface version checking added
new test program for testing of memory profiling added
Index: cpuThreadMethod.cpp
===================================================================
RCS file: /cvsroot/javaprofiler/library/src/cpu/cpuThreadMethod.cpp,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -r1.9 -r1.10
*** cpuThreadMethod.cpp 8 Apr 2002 23:30:01 -0000 1.9
--- cpuThreadMethod.cpp 15 Apr 2002 21:04:17 -0000 1.10
***************
*** 61,70 ****
void CpuThreadMethod::deactivate() {
! Prof::prof().activeCpuThreadMethods.removeNoRehash(this);
CpuThreadTrace* tt = threadTraces.first();
! while (tt) {
tt->deactivate();
! tt = threadTraces.next(tt);
}
}
--- 61,71 ----
void CpuThreadMethod::deactivate() {
! Prof::prof().activeCpuThreadMethods.removeNoRehash( this);
CpuThreadTrace* tt = threadTraces.first();
! while( tt) {
!
tt->deactivate();
! tt = threadTraces.next( tt);
}
}
Index: cpuThreadTrace.cpp
===================================================================
RCS file: /cvsroot/javaprofiler/library/src/cpu/cpuThreadTrace.cpp,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -r1.8 -r1.9
*** cpuThreadTrace.cpp 21 Nov 2001 22:31:42 -0000 1.8
--- cpuThreadTrace.cpp 15 Apr 2002 21:04:17 -0000 1.9
***************
*** 51,55 ****
void CpuThreadTrace::deactivate() {
! Prof::prof().activeCpuThreadTraces.removeNoRehash(this);
}
--- 51,55 ----
void CpuThreadTrace::deactivate() {
! Prof::prof().activeCpuThreadTraces.removeNoRehash( this);
}
Index: cpuTrace.cpp
===================================================================
RCS file: /cvsroot/javaprofiler/library/src/cpu/cpuTrace.cpp,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -r1.9 -r1.10
*** cpuTrace.cpp 8 Apr 2002 23:30:01 -0000 1.9
--- cpuTrace.cpp 15 Apr 2002 21:04:17 -0000 1.10
***************
*** 60,64 ****
void CpuTrace::deactivate() {
! Prof::prof().activeCpuTraces.removeNoRehash(this);
}
--- 60,71 ----
void CpuTrace::deactivate() {
! Prof::prof().activeCpuTraces.removeNoRehash( this);
!
! CpuThreadTrace* tt = threadTraces.first();
! while( tt) {
!
! tt->deactivate();
! tt = threadTraces.next( tt);
! }
}
Index: sampling.cpp
===================================================================
RCS file: /cvsroot/javaprofiler/library/src/cpu/sampling.cpp,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -r1.13 -r1.14
*** sampling.cpp 8 Apr 2002 23:30:01 -0000 1.13
--- sampling.cpp 15 Apr 2002 21:04:17 -0000 1.14
***************
*** 293,298 ****
lineno = 0;
! if (!(method = _prof->getMethod(methodId)))
! return;
p = new CallTreeItem;
--- 293,297 ----
lineno = 0;
! method = _prof->getMethod(methodId);
p = new CallTreeItem;
***************
*** 331,336 ****
else {
! if (!(method = _prof->getMethod(methodId)))
! return;
p = new CallTreeItem;
--- 330,334 ----
else {
! method = _prof->getMethod(methodId);
p = new CallTreeItem;
***************
*** 454,491 ****
if (_prof->setup.cpu.threadsEnabled) {
! if (_prof->setup.cpu.level == Setup::LEVEL_METHOD) {
! if (!(stat = _prof->getCpuThreadMethod(envId, frames[0].method_id))) {
! PROF_ERROR("CPU SAMPLE", "Cannot get CpuThreadMethod");
! continue;
! }
! }
! else {
! if (!(stat = _prof->getCpuThreadTrace(envId, numFrames, frames))) {
! PROF_ERROR("CPU SAMPLE", "Cannot get CpuThreadTrace");
! continue;
! }
! }
}
else {
! if (_prof->setup.cpu.level == Setup::LEVEL_METHOD) {
! if (!(stat = _prof->getMethod(frames[0].method_id))) {
! PROF_ERROR("CPU SAMPLE", "Method not found");
! continue;
! }
! }
! else {
! if (!(stat = _prof->getCpuTrace(numFrames, frames))) {
! PROF_ERROR("CPU SAMPLE", "Cannot get CPU trace");
! continue;
! }
! }
}
! stat->addCpuStat((jlong)1, (jlong)0);
stat->addCpuStat( -1, 0);
}
--- 452,475 ----
if (_prof->setup.cpu.threadsEnabled) {
! if (_prof->setup.cpu.level == Setup::LEVEL_METHOD)
! stat = _prof->getCpuThreadMethod(envId, frames[0].method_id);
! else
!
! stat = _prof->getCpuThreadTrace(envId, numFrames, frames);
}
else {
! if (_prof->setup.cpu.level == Setup::LEVEL_METHOD)
! stat = _prof->getMethod(frames[0].method_id);
! else
!
! stat = _prof->getCpuTrace(numFrames, frames);
}
! stat->addCpuStat( 1, 0);
stat->addCpuStat( -1, 0);
}
|