Bug 317441 - Add support for AMD's LWP (LightWeight Profiling) architecture extension
Summary: Add support for AMD's LWP (LightWeight Profiling) architecture extension
Status: REPORTED
Alias: None
Product: valgrind
Classification: Developer tools
Component: general (show other bugs)
Version: 3.9.0.SVN
Platform: Compiled Sources Linux
: NOR wishlist
Target Milestone: ---
Assignee: Julian Seward
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-03-27 13:01 UTC by Richard Gorton
Modified: 2013-04-07 16:43 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
Patch to enable proper cpuid handling to detect LWP (8.56 KB, patch)
2013-03-27 13:40 UTC, Richard Gorton
Details
Patch to enable proper cpuid handling to detect LWP, enable building of a test, a test case (14.67 KB, patch)
2013-03-29 12:48 UTC, Richard Gorton
Details
the .stdout.exp, .stderr.exp, .vgtest, .c (as a tarfile) (20.00 KB, application/octet-stream)
2013-03-29 12:51 UTC, Richard Gorton
Details
A believed to be complete patch for LWP support on x86_64 (7.38 KB, application/octet-stream)
2013-04-07 16:40 UTC, Richard Gorton
Details
Patches to VEX for full support of LWP on x86_64 (28.02 KB, application/octet-stream)
2013-04-07 16:41 UTC, Richard Gorton
Details
Modified test case for LWP support on x86_64 (20.00 KB, application/x-tar)
2013-04-07 16:43 UTC, Richard Gorton
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Richard Gorton 2013-03-27 13:01:52 UTC
Add support for AMD's LWP extension
- enable detection of LWP via cpuid (add an updated cpuid routine)
- enable clean handling of the LWP instructions to the point where memcheck will not fail
- add a test.

The extension enables all-user-space profiling (no system calls required to dynamically collect the performance data) as well as enables value profiling to be performed.
Comment 1 Richard Gorton 2013-03-27 13:40:57 UTC
Created attachment 78421 [details]
Patch to enable proper cpuid handling to detect LWP

Started from rev 13341, VEX rev 2702
Added support to detect an AMD cpu which supports LWP (and lzcnt, rdtscp) - an AMD FX-series core ('Bulldozer').  With this patch it becomes possible to add support for the various LWP instruction opcodes.
Comment 2 Richard Gorton 2013-03-29 12:48:56 UTC
Created attachment 78479 [details]
Patch to enable proper cpuid handling to detect LWP, enable building of a test, a test case

Patch: (starting from svn rev 13351, VEX rev 2704
- enables cpuid handling
- change config to permit building of the test case.
Comment 3 Richard Gorton 2013-03-29 12:51:02 UTC
Created attachment 78480 [details]
the .stdout.exp, .stderr.exp, .vgtest, .c (as a tarfile)

The test case (as a tarfile) - new files
Comment 4 Richard Gorton 2013-04-07 16:40:51 UTC
Created attachment 78709 [details]
A believed to be complete patch for LWP support on x86_64

The patches to the core (non VEX) portions of valgrind (rev 13363)
Comment 5 Richard Gorton 2013-04-07 16:41:54 UTC
Created attachment 78710 [details]
Patches to VEX for full support of LWP on x86_64

This is the VEX content patch
Comment 6 Richard Gorton 2013-04-07 16:43:27 UTC
Created attachment 78711 [details]
Modified test case for LWP support on x86_64

A test case with expected results