Add support for McVerSi memory consistency verification framework
Review Request #3449 - Created April 13, 2016 and updated
| Information | |
|---|---|
| Marco Elver | |
| gem5 | |
| default | |
| 3448 | |
| Reviewers | |
| Default | |
Add support for McVerSi memory consistency verification framework
This patch implements the Gem5-specific portion of McVerSi (a framework for simulation-based memory consistency verification) [1].
Architectures supported are:
- ARM (current mc2lib code generation only supports ARMv7).
- X86 (pseudo ops available via mmapped IPR interface).Currently, only the O3CPU is supported.
[1] http://ac.marcoelver.com/research/mcversi
Unless explicitly enabled (via loading appropriate workload), this component is unused.
Tested with ARM+Classic and X86+Ruby. Precompiled workloads that were used for testing available here: http://ac.marcoelver.com/res/mcversi_guest_workload_gem5.tar.gz
However, bugs have been found elsewhere in Gem5 while testing McVerSi (see http://www.mail-archive.com/gem5-dev@gem5.org/msg18940.html , and 1 of 2 bugs from paper http://reviews.gem5.org/r/2842/ ). (I will not restate them here to keep the discussion on topic.)
Issue Summary
| Description | From | Last Updated | Status |
|---|---|---|---|
| Please double check that this works with gcc 4.8 and clang 3.1 | Andreas Hansson | May 7, 2016, 7:34 a.m. | Open |
Really nice to see more work along these lines.
I am keen to make sure we "finish what we started", and for that reason I would like to understand how this relates to the existing MemChecker. Also, I'd really like to see the MemChecker more widely deployed (which I think requires some further cleverness). Could you shed some light on this Marco?
Thank you Marco for posting the patch. Unfortunately most of your patch does not display correctly. Did you post it from a Mecrurail repo using the "hg postreview -o" command? I know your patch applies to an earlier version of the repo, but I believe it should still display correclty if you use the '-o' option.
Thanks.
Overall this patch looks great to me. Sorry it took me so long to review it. Could you update the patch description to indicate that only ARM is currently supported. I believe that is true, correct? Other than that, just a few minor style changes below.
-
src/cpu/o3/commit_impl.hh (Diff revision 2) -
remove trailing whitespace
-
src/sim/pseudo_inst.hh (Diff revision 2) -
align with the beginning '('
-
src/sim/pseudo_inst.hh (Diff revision 2) -
align with the beginning '('
Change Summary:
Many thanks for the review.
This change
- addresses the style issues.
- and clarifies supported architectures.When I started this, X86 was the first supported architecture (together with Ruby, as this was used in the paper). However, I think there are limits to adding new pseudo ops via arch/x86/isa, and it seemed cleaner to just rely on the mmapped IPR interface (ARM does not seem to support this, so had to add this in arch/arm/isa).
Note that, to support Ruby, the patch http://reviews.gem5.org/r/3398/ is required (is marked as a dependency).
Description: |
|
|||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Testing Done: |
|
|||||||||||||||||||||||||||||||||
Diff: |
Revision 3 (+1234 -1) |
Looks good to me. Please check this one in with http://reviews.m5sim.org/r/3398/. Thanks!
-
src/arch/arm/isa/formats/aarch64.isa (Diff revision 3) -
Please add comments to explain what these do.
-
src/arch/arm/isa/formats/m5ops.isa (Diff revision 3) -
Same here
-
src/arch/arm/isa/insts/m5ops.isa (Diff revision 3) -
As above, it would be good if these could be grouped with a comment around what they do and highighting that these all belong to McVersi functionality
-
src/cpu/o3/commit_impl.hh (Diff revision 3) -
Should this perhaps be a probe point?
-
src/cpu/o3/dyn_inst.hh (Diff revision 3) -
Comments please
-
src/cpu/o3/dyn_inst_impl.hh (Diff revision 3) -
Why this->?
-
src/cpu/o3/dyn_inst_impl.hh (Diff revision 3) -
This is intruiging. Every write operation is turned into a SWAP? This seems like it could potentially have a whole range of unintended side effects.
-
src/cpu/o3/lsq_unit_impl.hh (Diff revision 3) -
again, should this be a probe point?
-
src/sim/mcversi.hh (Diff revision 3) -
I don't think we do this anywhere else in the codebase. Just the author and title should be enough imho.
-
src/sim/mcversi.hh (Diff revision 3) -
odd indentation, and no comments
-
src/sim/mcversi.hh (Diff revision 3) -
void*? Please use C++11 STL data structures
-
src/sim/mcversi.hh (Diff revision 3) -
naming convention
-
src/sim/mcversi.cc (Diff revision 3) -
really? that seems dodgy
-
src/sim/mcversi.cc (Diff revision 3) -
Could we make these part of a class instead of making them global?
-
src/sim/mcversi.cc (Diff revision 3) -
Surely this should not be hardcoded here. Why not use the cache-line size from the System?
-
src/sim/mcversi.cc (Diff revision 3) -
seems the isValid operations should be const
-
src/sim/mcversi.cc (Diff revision 3) -
Is there any chance we could use the random_mt used throughout the rest of gem5 rather? We have had a number of cleanups to remove sporadic use of other forms of random number generation, and it would be good to not introduce new ones
-
src/sim/mcversi.cc (Diff revision 3) -
Should these not just be removed rather?
-
src/sim/mcversi.cc (Diff revision 3) -
void*?
Why not use vectors?
-
src/sim/mcversi.cc (Diff revision 3) -
Please double check that this works with gcc 4.8 and clang 3.1
-
src/sim/pseudo_inst.cc (Diff revision 3) -
style
Change Summary:
Rebase against latest gem5 and against latest mc2lib.
Depends On: |
|
||
|---|---|---|---|
Diff: |
Revision 5 (+1324 -1) |
