root.cc (10905:a6ca6831e775) | root.cc (11077:fae097742b7e) |
---|---|
1/* 2 * Copyright (c) 2002-2005 The Regents of The University of Michigan 3 * Copyright (c) 2011 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 --- 118 unchanged lines hidden (view full) --- 127{ 128 SimObject::loadState(cp); 129 timeSyncEnable(params()->time_sync_enable); 130} 131 132void 133Root::serialize(CheckpointOut &cp) const 134{ | 1/* 2 * Copyright (c) 2002-2005 The Regents of The University of Michigan 3 * Copyright (c) 2011 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 --- 118 unchanged lines hidden (view full) --- 127{ 128 SimObject::loadState(cp); 129 timeSyncEnable(params()->time_sync_enable); 130} 131 132void 133Root::serialize(CheckpointOut &cp) const 134{ |
135 uint64_t cpt_ver = gem5CheckpointVersion; 136 SERIALIZE_SCALAR(cpt_ver); | |
137 SERIALIZE_SCALAR(FullSystem); 138 std::string isa = THE_ISA_STR; 139 SERIALIZE_SCALAR(isa); 140} 141 142void 143Root::unserialize(CheckpointIn &cp) | 135 SERIALIZE_SCALAR(FullSystem); 136 std::string isa = THE_ISA_STR; 137 SERIALIZE_SCALAR(isa); 138} 139 140void 141Root::unserialize(CheckpointIn &cp) |
144{ 145 uint64_t cpt_ver = 0; 146 UNSERIALIZE_OPT_SCALAR(cpt_ver); 147 if (cpt_ver < gem5CheckpointVersion) { 148 warn("**********************************************************\n"); 149 warn("!!!! Checkpoint ver %#x is older than current ver %#x !!!!\n", 150 cpt_ver, gem5CheckpointVersion); 151 warn("You might experience some issues when restoring and should run " 152 "the checkpoint upgrader (util/cpt_upgrader.py) on your " 153 "checkpoint\n"); 154 warn("**********************************************************\n"); 155 } else if (cpt_ver > gem5CheckpointVersion) { 156 warn("**********************************************************\n"); 157 warn("!!!! Checkpoint ver %#x is newer than current ver %#x !!!!\n", 158 cpt_ver, gem5CheckpointVersion); 159 warn("Running a new checkpoint with an older version of gem5 is not " 160 "supported. While it might work, you may experience incorrect " 161 "behavior or crashes.\n"); 162 warn("**********************************************************\n"); 163 } 164} | 142{} |
165 166 167bool FullSystem; 168unsigned int FullSystemInt; 169 170Root * 171RootParams::create() 172{ 173 static bool created = false; 174 if (created) 175 panic("only one root object allowed!"); 176 177 created = true; 178 179 FullSystem = full_system; 180 FullSystemInt = full_system ? 1 : 0; 181 182 return new Root(this); 183} | 143 144 145bool FullSystem; 146unsigned int FullSystemInt; 147 148Root * 149RootParams::create() 150{ 151 static bool created = false; 152 if (created) 153 panic("only one root object allowed!"); 154 155 created = true; 156 157 FullSystem = full_system; 158 FullSystemInt = full_system ? 1 : 0; 159 160 return new Root(this); 161} |