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(CheckpointOut &cp) const |
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 counters[i].serializeSection(cp, csprintf("counters.%i", i)); |
530 |
531 cycleCounter.serializeSection(cp, "cycleCounter"); |
532} 533 534void |
535PMU::unserialize(CheckpointIn &cp) |
536{ 537 DPRINTF(Checkpoint, "Unserializing Arm PMU\n"); 538 539 UNSERIALIZE_SCALAR(reg_pmcr); 540 UNSERIALIZE_SCALAR(reg_pmcnten); 541 UNSERIALIZE_SCALAR(reg_pmselr); 542 UNSERIALIZE_SCALAR(reg_pminten); 543 UNSERIALIZE_SCALAR(reg_pmovsr); 544 UNSERIALIZE_SCALAR(reg_pmceid); 545 UNSERIALIZE_SCALAR(clock_remainder); 546 547 for (size_t i = 0; i < counters.size(); ++i) |
548 counters[i].unserializeSection(cp, csprintf("counters.%i", i)); |
549 |
550 cycleCounter.unserializeSection(cp, "cycleCounter"); |
551} 552 553void |
554PMU::CounterState::serialize(CheckpointOut &cp) const |
555{ 556 SERIALIZE_SCALAR(eventId); 557 SERIALIZE_SCALAR(value); 558 SERIALIZE_SCALAR(enabled); 559 SERIALIZE_SCALAR(overflow64); 560} 561 562void |
563PMU::CounterState::unserialize(CheckpointIn &cp) |
564{ 565 UNSERIALIZE_SCALAR(eventId); 566 UNSERIALIZE_SCALAR(value); 567 UNSERIALIZE_SCALAR(enabled); 568 UNSERIALIZE_SCALAR(overflow64); 569} 570 571bool --- 20 unchanged lines hidden --- |