Deleted Added
sdiff udiff text old ( 10609:ae5582819481 ) new ( 10905:a6ca6831e775 )
full compact
1/*
2 * Copyright (c) 2011-2014 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

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

508 return;
509 }
510
511 DPRINTF(PMUVerbose, "Delivering PMU interrupt.\n");
512 rv->gic->sendInt(pmuInterrupt);
513}
514
515void
516PMU::serialize(std::ostream &os)
517{
518 DPRINTF(Checkpoint, "Serializing Arm PMU\n");
519
520 SERIALIZE_SCALAR(reg_pmcr);
521 SERIALIZE_SCALAR(reg_pmcnten);
522 SERIALIZE_SCALAR(reg_pmselr);
523 SERIALIZE_SCALAR(reg_pminten);
524 SERIALIZE_SCALAR(reg_pmovsr);
525 SERIALIZE_SCALAR(reg_pmceid);
526 SERIALIZE_SCALAR(clock_remainder);
527
528 for (size_t i = 0; i < counters.size(); ++i) {
529 nameOut(os, csprintf("%s.counters.%i", name(), i));
530 counters[i].serialize(os);
531 }
532
533 nameOut(os, csprintf("%s.cycleCounter", name()));
534 cycleCounter.serialize(os);
535}
536
537void
538PMU::unserialize(Checkpoint *cp, const std::string &section)
539{
540 DPRINTF(Checkpoint, "Unserializing Arm PMU\n");
541
542 UNSERIALIZE_SCALAR(reg_pmcr);
543 UNSERIALIZE_SCALAR(reg_pmcnten);
544 UNSERIALIZE_SCALAR(reg_pmselr);
545 UNSERIALIZE_SCALAR(reg_pminten);
546 UNSERIALIZE_SCALAR(reg_pmovsr);
547 UNSERIALIZE_SCALAR(reg_pmceid);
548 UNSERIALIZE_SCALAR(clock_remainder);
549
550 for (size_t i = 0; i < counters.size(); ++i)
551 counters[i].unserialize(cp, csprintf("%s.counters.%i", section, i));
552
553 cycleCounter.unserialize(cp, csprintf("%s.cycleCounter", section));
554}
555
556void
557PMU::CounterState::serialize(std::ostream &os)
558{
559 SERIALIZE_SCALAR(eventId);
560 SERIALIZE_SCALAR(value);
561 SERIALIZE_SCALAR(enabled);
562 SERIALIZE_SCALAR(overflow64);
563}
564
565void
566PMU::CounterState::unserialize(Checkpoint *cp, const std::string &section)
567{
568 UNSERIALIZE_SCALAR(eventId);
569 UNSERIALIZE_SCALAR(value);
570 UNSERIALIZE_SCALAR(enabled);
571 UNSERIALIZE_SCALAR(overflow64);
572}
573
574bool

--- 20 unchanged lines hidden ---