From: Petr L. <lu...@us...> - 2002-03-22 21:24:18
|
Update of /cvsroot/javaprofiler/library/src/cpu In directory usw-pr-cvs1:/tmp/cvs-serv20100 Modified Files: sampling.cpp Log Message: no message Index: sampling.cpp =================================================================== RCS file: /cvsroot/javaprofiler/library/src/cpu/sampling.cpp,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -r1.11 -r1.12 *** sampling.cpp 18 Feb 2002 20:17:59 -0000 1.11 --- sampling.cpp 22 Mar 2002 21:24:16 -0000 1.12 *************** *** 276,279 **** --- 276,280 ---- Prof* _prof = &Prof::prof(); jmethodID methodId; + jint lineno; Method *method; CallTreeItem *p, *parent; *************** *** 286,289 **** --- 287,295 ---- methodId = frames[numFrames - 1].method_id; + + if (_prof->setup.cpu.callTreeLinenoEnabled) + lineno = frames[numFrames - 1].lineno; + else + lineno = 0; if (!(method = _prof->getMethod(methodId))) *************** *** 293,296 **** --- 299,303 ---- p->method = method; + p->lineno = lineno; p->parent = NULL; p->hits = 1; *************** *** 305,311 **** methodId = frames[i].method_id; p = parent->children.first(); while (p) { ! if (p->method && p->method->isActive() && (*p->method == methodId)) break; p = parent->children.next(p); --- 312,323 ---- methodId = frames[i].method_id; + if (_prof->setup.cpu.callTreeLinenoEnabled) + lineno = frames[i].lineno; + else + lineno = 0; + p = parent->children.first(); while (p) { ! if (p->method && p->method->isActive() && (*p->method == methodId) && (p->lineno == lineno)) break; p = parent->children.next(p); *************** *** 325,328 **** --- 337,341 ---- p->method = method; + p->lineno = lineno; p->parent = parent; p->hits = 1; *************** *** 432,435 **** --- 445,452 ---- numFrames = thread->callTrace.num_frames; frames = thread->callTrace.frames; + + if (!_prof->setup.cpu.linenoEnabled) + for (int i = 0; i < numFrames; i++) + frames[i].lineno = 0; if (numFrames > 0) { |