traffic_gen.cc (10746:2e65cd110a97) traffic_gen.cc (10905:a6ca6831e775)
1/*
2 * Copyright (c) 2012-2013 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

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

134 return 0;
135 } else {
136 drainManager = dm;
137 return 1;
138 }
139}
140
141void
1/*
2 * Copyright (c) 2012-2013 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

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

134 return 0;
135 } else {
136 drainManager = dm;
137 return 1;
138 }
139}
140
141void
142TrafficGen::serialize(ostream &os)
142TrafficGen::serialize(CheckpointOut &cp) const
143{
144 DPRINTF(Checkpoint, "Serializing TrafficGen\n");
145
146 // save ticks of the graph event if it is scheduled
147 Tick nextEvent = updateEvent.scheduled() ? updateEvent.when() : 0;
148
149 DPRINTF(TrafficGen, "Saving nextEvent=%llu\n", nextEvent);
150
151 SERIALIZE_SCALAR(nextEvent);
152
153 SERIALIZE_SCALAR(nextTransitionTick);
154
155 SERIALIZE_SCALAR(nextPacketTick);
156
157 SERIALIZE_SCALAR(currState);
158}
159
160void
143{
144 DPRINTF(Checkpoint, "Serializing TrafficGen\n");
145
146 // save ticks of the graph event if it is scheduled
147 Tick nextEvent = updateEvent.scheduled() ? updateEvent.when() : 0;
148
149 DPRINTF(TrafficGen, "Saving nextEvent=%llu\n", nextEvent);
150
151 SERIALIZE_SCALAR(nextEvent);
152
153 SERIALIZE_SCALAR(nextTransitionTick);
154
155 SERIALIZE_SCALAR(nextPacketTick);
156
157 SERIALIZE_SCALAR(currState);
158}
159
160void
161TrafficGen::unserialize(Checkpoint* cp, const string& section)
161TrafficGen::unserialize(CheckpointIn &cp)
162{
163 // restore scheduled events
164 Tick nextEvent;
165 UNSERIALIZE_SCALAR(nextEvent);
166 if (nextEvent != 0) {
167 schedule(updateEvent, nextEvent);
168 }
169

--- 365 unchanged lines hidden ---
162{
163 // restore scheduled events
164 Tick nextEvent;
165 UNSERIALIZE_SCALAR(nextEvent);
166 if (nextEvent != 0) {
167 schedule(updateEvent, nextEvent);
168 }
169

--- 365 unchanged lines hidden ---