#226 operf build fails: PERF_RECORD_MISC_GUEST_* not declared

None
closed-fixed
None
5
2013-07-29
2012-11-09
No

The PERF_RECORD_MISC_GUEST_KERNEL and PERF_RECORD_MISC_GUEST_USER macros were not defined in perf_events until ~2.6.35 kernel version (I think). Attempts to build operf on vanilla kernel.org kernel headers between 2.6.31 and 2.6.35 will fail with the following error:

operf_utils.cpp: In function ‘void __handle_sample_event(event_t*, u64)’:
operf_utils.cpp:735: error: ‘PERF_RECORD_MISC_GUEST_KERNEL’ was not declared in this scope
operf_utils.cpp:738: error: ‘PERF_RECORD_MISC_GUEST_USER’ was not declared in this scope

We should add something to configure.ac to check for existence of these macros and then put some #ifdef's around the one spot in the code where they are found.

Discussion

  • Maynard Johnson

    Maynard Johnson - 2012-11-19

    I committed a fix for this problem today (see commit dbe24f5f0d98b1fe5517d2b137b4c59766e536ad).

     
  • Maynard Johnson

    Maynard Johnson - 2012-11-19
    • status: open --> open-fixed
     
  • Maynard Johnson

    Maynard Johnson - 2013-07-29
    • status: open-fixed --> closed-fixed
    • Group: -->
     

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

Sign up for the SourceForge newsletter:





No, thanks