Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#179 opreport side-by-side archive comparison fails

closed-works-for-me
None
9
2009-05-07
2009-02-27
Jim Blandy
No

When I use opreport to compare two archives, to measure the effect of a change to a program, opreport doesn't show the change between the two archives.

I have two archives named op-in and op-lazy, in which I've run an executable (at the same path in both archives). When I use opreport on each archive individually, the difference in the sample count for the top function is clear:

$ opreport -xl archive:op-in | head
CPU: Core 2, speed 800 MHz (estimated)
Counted CPU_CLK_UNHALTED events (Clock cycles when not halted) with a unit mask of 0x00 (Unhalted core cycles) count 100000
samples % symbol name
34469015 63.9760 js_Interpret
5160045 9.5773 js_ExecuteRegExp
1527153 2.8345 js_NewDoubleInRootedValue
866500 1.6083 js_SearchScope
644681 1.1966 js_DoubleToECMAInt32
630017 1.1693 PushBackTrackState(REGlobalData*, REOp, unsigned char*, REMatchState*, unsigned short const*, unsigned int, unsigned int)
571575 1.0609 __i686.get_pc_thunk.bx
$ opreport -xl archive:op-lazy | head
CPU: Core 2, speed 800 MHz (estimated)
Counted CPU_CLK_UNHALTED events (Clock cycles when not halted) with a unit mask of 0x00 (Unhalted core cycles) count 100000
samples % symbol name
34878417 64.3587 js_Interpret
5172438 9.5443 js_ExecuteRegExp
1522564 2.8095 js_NewDoubleInRootedValue
863839 1.5940 js_SearchScope
649108 1.1978 js_DoubleToECMAInt32
626030 1.1552 PushBackTrackState(REGlobalData*, REOp, unsigned char*, REMatchState*, unsigned short const*, unsigned int, unsigned int)
543344 1.0026 __i686.get_pc_thunk.bx
$

Note js_Interpret got 101% as many samples in op-lazy as it did in op-in. However, a side-by-side comparison doesn't show that:

$ opreport -xl { archive:op-in } { archive:op-lazy } | head
CPU: Core 2, speed 800 MHz (estimated)
Counted CPU_CLK_UNHALTED events (Clock cycles when not halted) with a unit mask of 0x00 (Unhalted core cycles) count 100000
samples % diff % symbol name
34878417 64.3587 0 js_Interpret
5172438 9.5443 0 js_ExecuteRegExp
1522564 2.8095 0 js_NewDoubleInRootedValue
863839 1.5940 0 js_SearchScope
649108 1.1978 0 js_DoubleToECMAInt32
626030 1.1552 0 PushBackTrackState(REGlobalData*, REOp, unsigned char*, REMatchState*, unsigned short const*, unsigned int, unsigned int)
543344 1.0026 0 __i686.get_pc_thunk.bx
$

I would expect to see a 1% difference reported in the entry for js_Interpret.

Discussion

  • John Levon
    John Levon
    2009-02-28

    It sounds like diff mode is completely broken, serious bug. Maynard?

     
  • John Levon
    John Levon
    2009-02-28

    • priority: 5 --> 9
     
  • Jim Blandy
    Jim Blandy
    2009-03-02

    If you have trouble reproducing this, I can put the two archives up for you to download. (They're 17MB each, but having the right data can make all the difference.)

     
    • assigned_to: nobody --> maynardj
     
  • AFAICT, differential profiles has never worked. I reproduced the problem on current cvs, so then I went back and installed 0.9, where this feature was first introduced. It didn't work there either. I will continue to investigate.

     
  • My previous comment was incorrect due to a user error of mine when trying to diff two profiles. So now, using the current oprofile cvs, I am able to get a correct differential profile. The symptom reported in this bug of 0% differences for the symbols is not reproducible with current cvs.

    Jim, please re-try your profile diff with current cvs.

     
  • This bug will be closed as invalid unless the bug submitter responds to my previous comment where I asked Jim if he could try reproducing the problem with current CVS. I'll leave it open a little while longer to wait for a response.

     
    • status: open --> closed-works-for-me
     
  • Closed per previous comment.

     
  • For some reason, this bug is coming up in the list when I search for all open bugs, even though I closed it a couple months ago. I'll try some things to get the status to change.