#134 opreport shows % values more than 100

closed-fixed
Philippe Elie
None
7
2006-09-15
2005-08-11
Ravi Chintakunta
No

This is a snapshot of opreport run on an pcc/e500
target. The % for BRANCHES_FINISHED is 1943.61% which
seems to be wrong. This can be observed if the
profiling is kept run for long hours and allowing to
collect huge samples. It seems the sample count
variable (possibly long) is overflowing and gives an
erratic value.

-bash-2.05b# opreport
CPU: e500, speed 825 MHz (estimated)
Counted BRANCHES_FINISHED events (Branches finished)
with a unit mask of 0x00 (No unit mask) count 7500
Counted BRANCHES_MISPREDICTED events (Branch
instructions mispredicted due to direction, target, or
IAB prediction) with a unit mask of 0x00 (No unit mask)
count 7500
Counted COMPLETED_INSNS events (Completed Instructions
(0, 1, or 2 per cycle)) with a unit mask of 0x00 (No
unit mask) count 45000
Counted CPU_CLK events (Cycles) with a unit mask of
0x00 (No unit mask) count 45000
BRANCHES_FINIS...|BRANCHES_MISPR...|COMPLETED_INSN...|
CPU_CLK:45000|
samples| %| samples| %| samples| %|
samples| %|
------------------------------------------------------------------------
3889486282 1943.6147 14614764 29.9104 3494025925
85.5681 3103418048 85.5016 no-vmlinux
563256558 281.4649 29294797 59.9544 548219347 13.4258
485258857 13.3693 oprofiled
41498878 20.7374 4917292 10.0637 40129254 0.9828
39420126 1.0861 libc-2.3.3.so

Discussion

  • Philippe Elie
    Philippe Elie
    2005-08-14

    • priority: 5 --> 7
    • assigned_to: nobody --> phil_e
     
  • Philippe Elie
    Philippe Elie
    2005-08-14

    Logged In: YES
    user_id=318973

    Overflow when we sum up all counts, we need to do all sums
    with 64 bits integer.

    regards,
    Philippe Elie

     
  • Philippe Elie
    Philippe Elie
    2005-08-15

    Logged In: YES
    user_id=318973

    Fixed in cvs, all samples count sum are now done with a 64
    unsigned bit type.

    It remains a posssible overflow over 32 bits integer in our
    sample file format but this one will be much difficult to
    reach as it mean 2**32-1 sample to the same eip/binary.

    regards,
    Philippe Elie

     
  • Philippe Elie
    Philippe Elie
    2005-08-15

    • status: open --> open-fixed
     
  • William Cohen
    William Cohen
    2006-09-15

    • status: open-fixed --> closed-fixed