| Summary: | Option to return values from processor's native cpuid instruction | ||
|---|---|---|---|
| Product: | [Developer tools] valgrind | Reporter: | William Cohen <wcohen> |
| Component: | vex | Assignee: | Julian Seward <jseward> |
| Status: | REPORTED --- | ||
| Severity: | wishlist | CC: | mark |
| Priority: | NOR | ||
| Version First Reported In: | unspecified | ||
| Target Milestone: | --- | ||
| Platform: | Compiled Sources | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
| Attachments: | Patch to control use of native cpuid instruction in code | ||
|
Description
William Cohen
2009-10-23 06:37:57 UTC
Created attachment 39464 [details]
Patch to control use of native cpuid instruction in code
This patch allows the user to control the use of the native cpuid instruction. The patch adds the following option:
--vex-native-cpuid=[yes|no]
The default behavior is same as before (--vex-native-cpuid=no is the default).
Not sure I understand. Suppose we run PAPI on V with --vex-native-cpuid=yes. PAPI reads the real CPUID, fine, and then it somehow sets up event monitoring via Vex for some CPU which Vex doesn't support? and Vex doesn't support any performance monitoring registers or wotnot. w/ apologies in advance if the above question is meaningless. I have no idea how this performance monitoring stuff is presented in user-space. The performance monitoring stuff uses kernel calls to do the actual set up of the performance counters and read the performance counters. The place that the PAPI needs to use CPUID instruction is to identify the specific processor implementation (e.g. Core 2 duo or Pentium III) and map the event to the magic number for the performance event. Speaking from experience PAPI will work with valgrind/VEX if it is allowed to get actual results from the CPUID instruction. It is quite understandable that VEX has a limited set of CPUID it uses to avoid encountering an instruction that is unhandled by VEX. The suggested patch does not change that default behavior for just that reason. |