base.cc (4103:785279436bdd) base.cc (4192:7accc6365bb9)
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;

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

314// panic("This CPU doesn't support sampling!");
315#if FULL_SYSTEM
316 if (profileEvent && profileEvent->scheduled())
317 profileEvent->deschedule();
318#endif
319}
320
321void
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;

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

314// panic("This CPU doesn't support sampling!");
315#if FULL_SYSTEM
316 if (profileEvent && profileEvent->scheduled())
317 profileEvent->deschedule();
318#endif
319}
320
321void
322BaseCPU::takeOverFrom(BaseCPU *oldCPU)
322BaseCPU::takeOverFrom(BaseCPU *oldCPU, Port *ic, Port *dc)
323{
324 assert(threadContexts.size() == oldCPU->threadContexts.size());
325
326 for (int i = 0; i < threadContexts.size(); ++i) {
327 ThreadContext *newTC = threadContexts[i];
328 ThreadContext *oldTC = oldCPU->threadContexts[i];
329
330 newTC->takeOverFrom(oldTC);

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

347
348 for (int i = 0; i < threadContexts.size(); ++i)
349 threadContexts[i]->profileClear();
350
351 // The Sampler must take care of this!
352// if (profileEvent)
353// profileEvent->schedule(curTick);
354#endif
323{
324 assert(threadContexts.size() == oldCPU->threadContexts.size());
325
326 for (int i = 0; i < threadContexts.size(); ++i) {
327 ThreadContext *newTC = threadContexts[i];
328 ThreadContext *oldTC = oldCPU->threadContexts[i];
329
330 newTC->takeOverFrom(oldTC);

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

347
348 for (int i = 0; i < threadContexts.size(); ++i)
349 threadContexts[i]->profileClear();
350
351 // The Sampler must take care of this!
352// if (profileEvent)
353// profileEvent->schedule(curTick);
354#endif
355
356 // Connect new CPU to old CPU's memory only if new CPU isn't
357 // connected to anything. Also connect old CPU's memory to new
358 // CPU.
359 Port *peer;
360 if (ic->getPeer() == NULL) {
361 peer = oldCPU->getPort("icache_port")->getPeer();
362 ic->setPeer(peer);
363 } else {
364 peer = ic->getPeer();
365 }
366 peer->setPeer(ic);
367
368 if (dc->getPeer() == NULL) {
369 peer = oldCPU->getPort("dcache_port")->getPeer();
370 dc->setPeer(peer);
371 } else {
372 peer = dc->getPeer();
373 }
374 peer->setPeer(dc);
355}
356
357
358#if FULL_SYSTEM
359BaseCPU::ProfileEvent::ProfileEvent(BaseCPU *_cpu, int _interval)
360 : Event(&mainEventQueue), cpu(_cpu), interval(_interval)
361{ }
362

--- 80 unchanged lines hidden ---
375}
376
377
378#if FULL_SYSTEM
379BaseCPU::ProfileEvent::ProfileEvent(BaseCPU *_cpu, int _interval)
380 : Event(&mainEventQueue), cpu(_cpu), interval(_interval)
381{ }
382

--- 80 unchanged lines hidden ---