thread_state.cc (10537:47fe87b0cf97) thread_state.cc (10905:a6ca6831e775)
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;

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

58 delete physProxy;
59 if (virtProxy != NULL)
60 delete virtProxy;
61 if (proxy != NULL)
62 delete proxy;
63}
64
65void
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;

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

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

--- 56 unchanged lines hidden ---
100}
101
102void
103ThreadState::initMemProxies(ThreadContext *tc)
104{
105 // The port proxies only refer to the data port on the CPU side
106 // and can safely be done at init() time even if the CPU is not
107 // connected, i.e. when restoring from a checkpoint and later

--- 56 unchanged lines hidden ---