tlb.cc (10824:308771bd2647) | tlb.cc (10905:a6ca6831e775) |
---|---|
1/* 2 * Copyright (c) 2001-2005 The Regents of The University of Michigan 3 * Copyright (c) 2007 MIPS Technologies, Inc. 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions are 8 * met: redistributions of source code must retain the above copyright --- 183 unchanged lines hidden (view full) --- 192{ 193 DPRINTF(TLB, "flushAll\n"); 194 memset(table, 0, sizeof(PTE[size])); 195 lookupTable.clear(); 196 nlu = 0; 197} 198 199void | 1/* 2 * Copyright (c) 2001-2005 The Regents of The University of Michigan 3 * Copyright (c) 2007 MIPS Technologies, Inc. 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions are 8 * met: redistributions of source code must retain the above copyright --- 183 unchanged lines hidden (view full) --- 192{ 193 DPRINTF(TLB, "flushAll\n"); 194 memset(table, 0, sizeof(PTE[size])); 195 lookupTable.clear(); 196 nlu = 0; 197} 198 199void |
200TLB::serialize(ostream &os) | 200TLB::serialize(CheckpointOut &cp) const |
201{ 202 SERIALIZE_SCALAR(size); 203 SERIALIZE_SCALAR(nlu); 204 205 for (int i = 0; i < size; i++) { | 201{ 202 SERIALIZE_SCALAR(size); 203 SERIALIZE_SCALAR(nlu); 204 205 for (int i = 0; i < size; i++) { |
206 nameOut(os, csprintf("%s.PTE%d", name(), i)); 207 table[i].serialize(os); | 206 ScopedCheckpointSection sec(cp, csprintf("PTE%d", i)); 207 table[i].serialize(cp); |
208 } 209} 210 211void | 208 } 209} 210 211void |
212TLB::unserialize(Checkpoint *cp, const string §ion) | 212TLB::unserialize(CheckpointIn &cp) |
213{ 214 UNSERIALIZE_SCALAR(size); 215 UNSERIALIZE_SCALAR(nlu); 216 217 for (int i = 0; i < size; i++) { | 213{ 214 UNSERIALIZE_SCALAR(size); 215 UNSERIALIZE_SCALAR(nlu); 216 217 for (int i = 0; i < size; i++) { |
218 table[i].unserialize(cp, csprintf("%s.PTE%d", section, i)); | 218 ScopedCheckpointSection sec(cp, csprintf("PTE%d", i)); 219 table[i].unserialize(cp); |
219 if (table[i].V0 || table[i].V1) { 220 lookupTable.insert(make_pair(table[i].VPN, i)); 221 } 222 } 223} 224 225void 226TLB::regStats() --- 130 unchanged lines hidden --- | 220 if (table[i].V0 || table[i].V1) { 221 lookupTable.insert(make_pair(table[i].VPN, i)); 222 } 223 } 224} 225 226void 227TLB::regStats() --- 130 unchanged lines hidden --- |