#170 opreport -l shows only two first events in header

closed-fixed
None
5
2009-07-31
2008-10-12
Sami Farin
No

0.9.4 fedora:

# opreport-0.9.4 -l|head -n 8
...
CPU: P4 / Xeon, speed 2797.15 MHz (estimated)
Counted GLOBAL_POWER_EVENTS events (time during which processor is not stopped) with a unit mask of 0x01 (mandatory) count 240000
Counted MACHINE_CLEAR events (cycles with entire machine pipeline cleared) with a unit mask of 0x01 (count a portion of cycles the machine is cleared for any cause) count 12000
Counted FSB_DATA_ACTIVITY events (DRDY or DBSY events on the front side bus) with a unit mask of 0x03 (multiple flags) count 60000
Counted RETIRED_BRANCH_TYPE events (retired branches, selected by type) with a unit mask of 0x1f (multiple flags) count 180000
Counted RETIRED_MISPRED_BRANCH_TYPE events (retired mispredicted branched, selected by type) with a unit mask of 0x1f (multiple flags) count 6000
samples % samples % samples % samples % samples % image name app name symbol name
1085554 26.5721 19605 16.0276 50655 11.6269 234164 40.3676 344253 47.1789 cc1plus cc1plus /usr/libexec/gcc/x86_64-redhat-linux/4.3.2/cc1plus

# opreport-cvs-20081012 -l|head -n 8
...
CPU: P4 / Xeon, speed 2797.15 MHz (estimated)
Counted GLOBAL_POWER_EVENTS events (time during which processor is not stopped) with a unit mask of 0x01 (mandatory) count 240000
Counted MACHINE_CLEAR events (cycles with entire machine pipeline cleared) with a unit mask of 0x01 (count a portion of cycles the machine is cleared for any cause) count 12000

samples % samples % samples % samples % samples % image name app name symbol name
1085554 26.7390 19605 16.0872 50655 11.6969 234164 40.4767 344253 47.2718 cc1plus cc1plus /usr/libexec/gcc/x86_64-redhat-linux/4.3.2/cc1plus

Only the lines from the header are missing, seems to work ok otherwise.

Discussion

    • assigned_to: nobody --> maynardj
     
  • It appears you're specifying invalid unit masks for those events that aren't showing up in your report header. Are you seeing any error messages going to stderr when you call opreport? Any opcontrol errors or warnings? Seems like there should be some error checking somewhere for this.

     
  • Sami Farin
    Sami Farin
    2008-10-13

    Why 0.9.4 does not think the unit masks are invalid?

    Oh yes, I get these with current cvs version:
    Could not locate event 15
    Could not locate event 39
    Could not locate event 38

    Only these files from /usr/share/ are opened by both 0.9.4 and current cvs versions:
    01:01:41.518426 open("/usr/share/oprofile//i386/p4/unit_masks", O_RDONLY) = 4 <0.000025>
    01:01:41.519232 open("/usr/share/oprofile//i386/p4/events", O_RDONLY) = 4 <0.000023>

    strace says:
    18052 01:03:34.989117 open("/dev/shm/oprofile/samples/current/{kern}/i915/{dep}/{kern}/i915/FSB_DATA_ACTIVITY.60000.3.all.all.all", O_RDONLY) = 4 <0.000023>
    18052 01:03:34.989206 read(4, "DAE\n\21\0\0\0\6\0\0\0\17\0\0\0\3\0\0\0`\352\0\0\1\0\0\0\0\0\0\0+\207\26\331N\332\245@\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\377\377\377\377\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 88) = 88 <0.000013>
    18052 01:03:34.989302 close(4) = 0 <0.000013>
    18052 01:03:34.989364 write(2, "Could not locate event "..., 23) = 23 <0.000660>
    18052 01:03:34.990113 write(2, "15"..., 2) = 2 <0.000401>

     
  • Sorry, I didn't make myself clear. There have been changes made to OProfile cvs lately (Andi Kleen's support for Intel arch perfmon) which incidentally added some checking of unit masks during report-generation. What I intended to say in my previous comment is that what we really need is for some error checking of unit masks on the front-end, before profiling is started. It would be great if someone would post a patch that did this. I'll keep this bug open as a reminder for my to-do list, in case no on else provides a fix.

     
  • This problem was, in fact, a regression introduced with the Intel arch perfmon support.
    Andi Kleen has kindly provided a fix which I've tested and committed to CVS.

    safari . . Please test with latest CVS and let me know your results.

     
    • status: open --> open-fixed
     
  • Sami Farin
    Sami Farin
    2008-11-13

    Yes, it works! Thanks to all.

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