page_table.cc (3311:7eb47a60dbd4) | page_table.cc (3320:a8910dbabb44) |
---|---|
1/* 2 * Copyright (c) 2003 The Regents of The University of Michigan 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 153 unchanged lines hidden (view full) --- 162 req->setPaddr(paddr); 163 return page_check(req->getPaddr(), req->getSize()); 164} 165 166void 167PageTable::serialize(std::ostream &os) 168{ 169 paramOut(os, "ptable.size", pTable.size()); | 1/* 2 * Copyright (c) 2003 The Regents of The University of Michigan 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 153 unchanged lines hidden (view full) --- 162 req->setPaddr(paddr); 163 return page_check(req->getPaddr(), req->getSize()); 164} 165 166void 167PageTable::serialize(std::ostream &os) 168{ 169 paramOut(os, "ptable.size", pTable.size()); |
170 |
|
170 int count = 0; 171 172 m5::hash_map<Addr,Addr>::iterator iter; | 171 int count = 0; 172 173 m5::hash_map<Addr,Addr>::iterator iter; |
173 while (iter != pTable.end()) { | 174 m5::hash_map<Addr,Addr>::iterator end; 175 for (iter = pTable.begin(); iter != end; ++iter,++count) { |
174 paramOut(os, csprintf("ptable.entry%dvaddr", count),iter->first); 175 paramOut(os, csprintf("ptable.entry%dpaddr", count),iter->second); | 176 paramOut(os, csprintf("ptable.entry%dvaddr", count),iter->first); 177 paramOut(os, csprintf("ptable.entry%dpaddr", count),iter->second); |
176 ++count; | |
177 } 178 assert(count == pTable.size()); 179} 180 181void 182PageTable::unserialize(Checkpoint *cp, const std::string §ion) 183{ 184 int i = 0, count; --- 14 unchanged lines hidden --- | 178 } 179 assert(count == pTable.size()); 180} 181 182void 183PageTable::unserialize(Checkpoint *cp, const std::string §ion) 184{ 185 int i = 0, count; --- 14 unchanged lines hidden --- |