sim_object.cc (10422:148b96b7bc77) | sim_object.cc (10905:a6ca6831e775) |
---|---|
1/* 2 * Copyright (c) 2001-2005 The Regents of The University of Michigan 3 * Copyright (c) 2010 Advanced Micro Devices, 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 --- 67 unchanged lines hidden (view full) --- 76} 77 78void 79SimObject::init() 80{ 81} 82 83void | 1/* 2 * Copyright (c) 2001-2005 The Regents of The University of Michigan 3 * Copyright (c) 2010 Advanced Micro Devices, 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 --- 67 unchanged lines hidden (view full) --- 76} 77 78void 79SimObject::init() 80{ 81} 82 83void |
84SimObject::loadState(Checkpoint *cp) | 84SimObject::loadState(CheckpointIn &cp) |
85{ | 85{ |
86 if (cp->sectionExists(name())) { | 86 if (cp.sectionExists(name())) { |
87 DPRINTF(Checkpoint, "unserializing\n"); | 87 DPRINTF(Checkpoint, "unserializing\n"); |
88 unserialize(cp, name()); | 88 // This works despite name() returning a fully qualified name 89 // since we are at the top level. 90 unserializeSection(cp, name()); |
89 } else { 90 DPRINTF(Checkpoint, "no checkpoint section found\n"); 91 } 92} 93 94void 95SimObject::initState() 96{ --- 38 unchanged lines hidden (view full) --- 135{ 136 return probeManager; 137} 138 139// 140// static function: serialize all SimObjects. 141// 142void | 91 } else { 92 DPRINTF(Checkpoint, "no checkpoint section found\n"); 93 } 94} 95 96void 97SimObject::initState() 98{ --- 38 unchanged lines hidden (view full) --- 137{ 138 return probeManager; 139} 140 141// 142// static function: serialize all SimObjects. 143// 144void |
143SimObject::serializeAll(std::ostream &os) | 145SimObject::serializeAll(CheckpointOut &cp) |
144{ 145 SimObjectList::reverse_iterator ri = simObjectList.rbegin(); 146 SimObjectList::reverse_iterator rend = simObjectList.rend(); 147 148 for (; ri != rend; ++ri) { 149 SimObject *obj = *ri; | 146{ 147 SimObjectList::reverse_iterator ri = simObjectList.rbegin(); 148 SimObjectList::reverse_iterator rend = simObjectList.rend(); 149 150 for (; ri != rend; ++ri) { 151 SimObject *obj = *ri; |
150 obj->nameOut(os); 151 obj->serialize(os); | 152 // This works despite name() returning a fully qualified name 153 // since we are at the top level. 154 obj->serializeSectionOld(cp, obj->name()); |
152 } 153} 154 155 156#ifdef DEBUG 157// 158// static function: flag which objects should have the debugger break 159// --- 42 unchanged lines hidden --- | 155 } 156} 157 158 159#ifdef DEBUG 160// 161// static function: flag which objects should have the debugger break 162// --- 42 unchanged lines hidden --- |