base.cc (9446:644f2a2c9bfc) base.cc (9448:569d1e8f74e4)
1/*
2 * Copyright (c) 2011-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

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

519 cpu->schedule(this, curTick() + interval);
520}
521
522void
523BaseCPU::serialize(std::ostream &os)
524{
525 SERIALIZE_SCALAR(instCnt);
526
1/*
2 * Copyright (c) 2011-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

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

519 cpu->schedule(this, curTick() + interval);
520}
521
522void
523BaseCPU::serialize(std::ostream &os)
524{
525 SERIALIZE_SCALAR(instCnt);
526
527 /* Unlike _pid, _taskId is not serialized, as they are dynamically
528 * assigned unique ids that are only meaningful for the duration of
529 * a specific run. We will need to serialize the entire taskMap in
530 * system. */
531 SERIALIZE_SCALAR(_pid);
527 if (!_switchedOut) {
528 /* Unlike _pid, _taskId is not serialized, as they are dynamically
529 * assigned unique ids that are only meaningful for the duration of
530 * a specific run. We will need to serialize the entire taskMap in
531 * system. */
532 SERIALIZE_SCALAR(_pid);
532
533
533 interrupts->serialize(os);
534 interrupts->serialize(os);
535
536 // Serialize the threads, this is done by the CPU implementation.
537 for (ThreadID i = 0; i < numThreads; ++i) {
538 nameOut(os, csprintf("%s.xc.%i", name(), i));
539 serializeThread(os, i);
540 }
541 }
534}
535
536void
537BaseCPU::unserialize(Checkpoint *cp, const std::string &section)
538{
539 UNSERIALIZE_SCALAR(instCnt);
542}
543
544void
545BaseCPU::unserialize(Checkpoint *cp, const std::string &section)
546{
547 UNSERIALIZE_SCALAR(instCnt);
540 UNSERIALIZE_SCALAR(_pid);
541 interrupts->unserialize(cp, section);
548
549 if (!_switchedOut) {
550 UNSERIALIZE_SCALAR(_pid);
551 interrupts->unserialize(cp, section);
552
553 // Unserialize the threads, this is done by the CPU implementation.
554 for (ThreadID i = 0; i < numThreads; ++i)
555 unserializeThread(cp, csprintf("%s.xc.%i", section, i), i);
556 }
542}
543
544void
545BaseCPU::traceFunctionsInternal(Addr pc)
546{
547 if (!debugSymbolTable)
548 return;
549

--- 41 unchanged lines hidden ---
557}
558
559void
560BaseCPU::traceFunctionsInternal(Addr pc)
561{
562 if (!debugSymbolTable)
563 return;
564

--- 41 unchanged lines hidden ---