From: Philippe E. <ph...@us...> - 2001-10-02 21:21:48
|
Update of /cvsroot/oprofile/oprofile/pp In directory usw-pr-cvs1:/tmp/cvs-serv31515/oprofile/pp Modified Files: oprofpp.cpp Log Message: oprofpp -l: complete the last fix Index: oprofpp.cpp =================================================================== RCS file: /cvsroot/oprofile/oprofile/pp/oprofpp.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- oprofpp.cpp 2001/10/02 20:39:14 1.5 +++ oprofpp.cpp 2001/10/02 21:21:46 1.6 @@ -964,10 +964,14 @@ printf_symbol(scounts[i].sym->name); // FIXME: why we output also zero samples symbol ? - printf("[0x%.8lx]: %2.4f%% (%u samples)\n", - scounts[i].sym->value+scounts[i].sym->section->vma, - (((double)scounts[i].count[ctr]) / tot[ctr])*100.0, - scounts[i].count[ctr]); + if (scounts[i].count[ctr]) { + printf("[0x%.8lx]: %2.4f%% (%u samples)\n", + scounts[i].sym->value+scounts[i].sym->section->vma, + (((double)scounts[i].count[ctr]) / tot[ctr])*100.0, + scounts[i].count[ctr]); + } else { + printf(" (0 samples)\n"); + } } } |