sim: Move checkpoint parameters for ptable into seperate section

In checkpoint output files, the parameters for page table including
size and entries are organized not very clearly. For example:

  [system.cpu.workload]
  ...
  ptable.size=...

  [system.cpu.workload.Entry0]
  vaddr=...
  paddr=...
  flags=...

  [system.cpu.workload.Entry1]
  ...

This commit moves these parameters into a separate section named
'ptable'. For example:

  [system.cpu.workload.ptable]
  size=...

  [system.cpu.workload.ptable.Entry0]
  vaddr=...
  paddr=...
  flags=...

  [system.cpu.workload.ptable.Entry1]
  ...

Change-Id: Iaa4129b3f4f090e8c3651bde90524abba0999c7f
Signed-off-by: Ian Jiang <ianjiang.ict@gmail.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/31874
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
Ian Jiang
2020-07-28 13:26:49 +08:00
parent a058d66a65
commit 78bccaf7a8

View File

@@ -168,7 +168,8 @@ EmulationPageTable::translate(const RequestPtr &req)
void
EmulationPageTable::serialize(CheckpointOut &cp) const
{
paramOut(cp, "ptable.size", pTable.size());
ScopedCheckpointSection sec(cp, "ptable");
paramOut(cp, "size", pTable.size());
PTable::size_type count = 0;
for (auto &pte : pTable) {
@@ -185,7 +186,8 @@ void
EmulationPageTable::unserialize(CheckpointIn &cp)
{
int count;
paramIn(cp, "ptable.size", count);
ScopedCheckpointSection sec(cp, "ptable");
paramIn(cp, "size", count);
for (int i = 0; i < count; ++i) {
ScopedCheckpointSection sec(cp, csprintf("Entry%d", i));