#55 Inconsistent displayed results

v1.0_(example)
closed-fixed
nobody
5
2013-04-05
2013-04-04
No

In KCachegrind, I get inconsistent results between the asm view and the source view. Those results are also inconsistent with what my program does.

In the attached screenshots, source line 89 should cause about 27 million read operations. This is confirmed by the callgrind_annotate output:

==============================8<------------------------------
Ir Dr Dw I1mr D1mr D1mw ILmr DLmr DLmw
...
10,198,494 326,928 328,104 . . . . . . for (i = y0; i < yEnd; ++i) {
116,502,870 . . . . . . . . for (j = x0; j < xEnd; ++j) {
53,806,632 26,903,316 0 0 1,272,576 . . . . value = value + LEHT_BROWSE_VALUE (ibr, component);
. . . . . . . . . LEHT_BROWSE_MOVE (ibr,1 ,0);
. . . . . . . . . }
2,963,202 . . . . . . . . LEHT_BROWSE_MOVE (ibr, -(xEnd-x0), 1);
. . . . . . . . . }
------------------------------>8==============================

However, KCachegrind shows only 3 million Dr and 6 million Ir. Looking at the corresponding ASM, line 89 corresponds with the instructions at addresses 42_6188 and 42_6191, which give the same 3 million Dr but give 30 million Ir.

Moreover, why is the Ir count for the movzbl instruction @42_6188 so different from the following instructions even though the jump record does not show any jumps reaching @42_618B?

Commandline used:
valgrind --tool=callgrind --simulate-cache=yes --dump-instr=yes --trace-jump=yes ./build/custom/ansic/crystal

Valgrind version: 3.8.1
KCachegrind version: 0.7.2kde using KDE Development Platform 4.10.1

Discussion

  • Jérôme M. Berger

    Screenshot of the source view in KCachegrind

     
    Attachments
  • Jérôme M. Berger

    Screenshot of the asm view in KCachegrind

     
    Attachments
  • Jérôme M. Berger

    callgrind_annotate extract (same as in the description since the layout got scrambled by sf)

     
  • Josef Weidendorfer

    There was a bug (since 0.7.2) which may explain the inconsistencies you
    observe. It's fixed in commit f35794e. Can you check out the current version
    of KCachegrind from the KDE git repo via

    git clone git://anongit.kde.org/kcachegrind.git

    and check whether this solves your problem?
    Thanks,
    Josef

    Version 0.7.2 was a bad release. It also introduced a bug which still is in 0.7.3,
    and which may explain your inconsistencies. KCachegrind sources are now
    tracked in git, using

     
  • Jérôme M. Berger

    Thanks for your reply. I've tried the latest git source and I couldn't reproduce the issue.

    Thanks.

     
  • Josef Weidendorfer

    Ok, thanks for confirming.
    I think you should do a bug fix release then. The issue is quite severe.

     
  • Josef Weidendorfer

    Ah. I meant I will do the bug fix release ;-)

     
  • Josef Weidendorfer

    • status: open --> closed-fixed
    • milestone: --> v1.0_(example)
     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks