thread_state.hh (10537:47fe87b0cf97) thread_state.hh (10905:a6ca6831e775)
1/*
2 * Copyright (c) 2012 ARM Limited
3 * All rights reserved
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software

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

107
108 // let's fill with a dummy node for now so we don't get a segfault
109 // on the first cycle when there's no node available.
110 static ProfileNode dummyNode;
111 profileNode = &dummyNode;
112 profilePC = 3;
113 }
114
1/*
2 * Copyright (c) 2012 ARM Limited
3 * All rights reserved
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software

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

107
108 // let's fill with a dummy node for now so we don't get a segfault
109 // on the first cycle when there's no node available.
110 static ProfileNode dummyNode;
111 profileNode = &dummyNode;
112 profilePC = 3;
113 }
114
115 void serialize(std::ostream &os)
115 void serialize(CheckpointOut &cp) const M5_ATTR_OVERRIDE
116 {
116 {
117 ThreadState::serialize(os);
117 ThreadState::serialize(cp);
118 // Use the ThreadContext serialization helper to serialize the
119 // TC.
118 // Use the ThreadContext serialization helper to serialize the
119 // TC.
120 ::serialize(*tc, os);
120 ::serialize(*tc, cp);
121 }
122
121 }
122
123 void unserialize(Checkpoint *cp, const std::string &section)
123 void unserialize(CheckpointIn &cp) M5_ATTR_OVERRIDE
124 {
125 // Prevent squashing - we don't have any instructions in
126 // flight that we need to squash since we just instantiated a
127 // clean system.
128 noSquashFromTC = true;
124 {
125 // Prevent squashing - we don't have any instructions in
126 // flight that we need to squash since we just instantiated a
127 // clean system.
128 noSquashFromTC = true;
129 ThreadState::unserialize(cp, section);
129 ThreadState::unserialize(cp);
130 // Use the ThreadContext serialization helper to unserialize
131 // the TC.
130 // Use the ThreadContext serialization helper to unserialize
131 // the TC.
132 ::unserialize(*tc, cp, section);
132 ::unserialize(*tc, cp);
133 noSquashFromTC = false;
134 }
135
136 /** Pointer to the ThreadContext of this thread. */
137 ThreadContext *tc;
138
139 /** Returns a pointer to the TC of this thread. */
140 ThreadContext *getTC() { return tc; }

--- 12 unchanged lines hidden ---
133 noSquashFromTC = false;
134 }
135
136 /** Pointer to the ThreadContext of this thread. */
137 ThreadContext *tc;
138
139 /** Returns a pointer to the TC of this thread. */
140 ThreadContext *getTC() { return tc; }

--- 12 unchanged lines hidden ---