base.cc (2632:1bb2f91485ea) base.cc (2651:76db2c628241)
1/*
2 * Copyright (c) 2002-2005 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;

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

30#include <string>
31#include <sstream>
32
33#include "base/cprintf.hh"
34#include "base/loader/symtab.hh"
35#include "base/misc.hh"
36#include "base/output.hh"
37#include "cpu/base.hh"
1/*
2 * Copyright (c) 2002-2005 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;

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

30#include <string>
31#include <sstream>
32
33#include "base/cprintf.hh"
34#include "base/loader/symtab.hh"
35#include "base/misc.hh"
36#include "base/output.hh"
37#include "cpu/base.hh"
38#include "cpu/cpuevent.hh"
38#include "cpu/exec_context.hh"
39#include "cpu/profile.hh"
40#include "cpu/sampler/sampler.hh"
41#include "sim/param.hh"
42#include "sim/process.hh"
43#include "sim/sim_events.hh"
44#include "sim/system.hh"
45

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

254{
255 assert(execContexts.size() == oldCPU->execContexts.size());
256
257 for (int i = 0; i < execContexts.size(); ++i) {
258 ExecContext *newXC = execContexts[i];
259 ExecContext *oldXC = oldCPU->execContexts[i];
260
261 newXC->takeOverFrom(oldXC);
39#include "cpu/exec_context.hh"
40#include "cpu/profile.hh"
41#include "cpu/sampler/sampler.hh"
42#include "sim/param.hh"
43#include "sim/process.hh"
44#include "sim/sim_events.hh"
45#include "sim/system.hh"
46

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

255{
256 assert(execContexts.size() == oldCPU->execContexts.size());
257
258 for (int i = 0; i < execContexts.size(); ++i) {
259 ExecContext *newXC = execContexts[i];
260 ExecContext *oldXC = oldCPU->execContexts[i];
261
262 newXC->takeOverFrom(oldXC);
263
264 CpuEvent::replaceExecContext(oldXC, newXC);
265
262 assert(newXC->readCpuId() == oldXC->readCpuId());
263#if FULL_SYSTEM
264 system->replaceExecContext(newXC, newXC->readCpuId());
265#else
266 assert(newXC->getProcessPtr() == oldXC->getProcessPtr());
267 newXC->getProcessPtr()->replaceExecContext(newXC, newXC->readCpuId());
268#endif
269 }

--- 129 unchanged lines hidden ---
266 assert(newXC->readCpuId() == oldXC->readCpuId());
267#if FULL_SYSTEM
268 system->replaceExecContext(newXC, newXC->readCpuId());
269#else
270 assert(newXC->getProcessPtr() == oldXC->getProcessPtr());
271 newXC->getProcessPtr()->replaceExecContext(newXC, newXC->readCpuId());
272#endif
273 }

--- 129 unchanged lines hidden ---