thread_state.cc (8799:dac1e33e07b0) thread_state.cc (8806:669e93d79ed9)
1/*
2 * Copyright (c) 2006 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;

--- 54 unchanged lines hidden (view full) ---

63
64void
65ThreadState::serialize(std::ostream &os)
66{
67 SERIALIZE_ENUM(_status);
68 // thread_num and cpu_id are deterministic from the config
69 SERIALIZE_SCALAR(funcExeInst);
70
1/*
2 * Copyright (c) 2006 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;

--- 54 unchanged lines hidden (view full) ---

63
64void
65ThreadState::serialize(std::ostream &os)
66{
67 SERIALIZE_ENUM(_status);
68 // thread_num and cpu_id are deterministic from the config
69 SERIALIZE_SCALAR(funcExeInst);
70
71 if (FullSystem) {
72 Tick quiesceEndTick = 0;
73 if (quiesceEvent->scheduled())
74 quiesceEndTick = quiesceEvent->when();
75 SERIALIZE_SCALAR(quiesceEndTick);
76 if (kernelStats)
77 kernelStats->serialize(os);
78 }
71 if (!FullSystem)
72 return;
73
74 Tick quiesceEndTick = 0;
75 if (quiesceEvent->scheduled())
76 quiesceEndTick = quiesceEvent->when();
77 SERIALIZE_SCALAR(quiesceEndTick);
78 if (kernelStats)
79 kernelStats->serialize(os);
79}
80
81void
82ThreadState::unserialize(Checkpoint *cp, const std::string &section)
83{
84
85 UNSERIALIZE_ENUM(_status);
86 // thread_num and cpu_id are deterministic from the config
87 UNSERIALIZE_SCALAR(funcExeInst);
88
80}
81
82void
83ThreadState::unserialize(Checkpoint *cp, const std::string &section)
84{
85
86 UNSERIALIZE_ENUM(_status);
87 // thread_num and cpu_id are deterministic from the config
88 UNSERIALIZE_SCALAR(funcExeInst);
89
89 if (FullSystem) {
90 Tick quiesceEndTick;
91 UNSERIALIZE_SCALAR(quiesceEndTick);
92 if (quiesceEndTick)
93 baseCpu->schedule(quiesceEvent, quiesceEndTick);
94 if (kernelStats)
95 kernelStats->unserialize(cp, section);
96 }
90 if (!FullSystem)
91 return;
92
93 Tick quiesceEndTick;
94 UNSERIALIZE_SCALAR(quiesceEndTick);
95 if (quiesceEndTick)
96 baseCpu->schedule(quiesceEvent, quiesceEndTick);
97 if (kernelStats)
98 kernelStats->unserialize(cp, section);
97}
98
99void
100ThreadState::initMemProxies(ThreadContext *tc)
101{
102 // Note that this only refers to the port on the CPU side and can
103 // safely be done at init() time even if the CPU is not connected
104 // (i.e. due to restoring from a checkpoint and later switching

--- 34 unchanged lines hidden ---
99}
100
101void
102ThreadState::initMemProxies(ThreadContext *tc)
103{
104 // Note that this only refers to the port on the CPU side and can
105 // safely be done at init() time even if the CPU is not connected
106 // (i.e. due to restoring from a checkpoint and later switching

--- 34 unchanged lines hidden ---