pmu.cc (10609:ae5582819481) | pmu.cc (10905:a6ca6831e775) |
---|---|
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 | 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) | 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 | 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 } | 528 for (size_t i = 0; i < counters.size(); ++i) 529 counters[i].serializeSection(cp, csprintf("counters.%i", i)); |
532 | 530 |
533 nameOut(os, csprintf("%s.cycleCounter", name())); 534 cycleCounter.serialize(os); | 531 cycleCounter.serializeSection(cp, "cycleCounter"); |
535} 536 537void | 532} 533 534void |
538PMU::unserialize(Checkpoint *cp, const std::string §ion) | 535PMU::unserialize(CheckpointIn &cp) |
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) | 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) |
551 counters[i].unserialize(cp, csprintf("%s.counters.%i", section, i)); | 548 counters[i].unserializeSection(cp, csprintf("counters.%i", i)); |
552 | 549 |
553 cycleCounter.unserialize(cp, csprintf("%s.cycleCounter", section)); | 550 cycleCounter.unserializeSection(cp, "cycleCounter"); |
554} 555 556void | 551} 552 553void |
557PMU::CounterState::serialize(std::ostream &os) | 554PMU::CounterState::serialize(CheckpointOut &cp) const |
558{ 559 SERIALIZE_SCALAR(eventId); 560 SERIALIZE_SCALAR(value); 561 SERIALIZE_SCALAR(enabled); 562 SERIALIZE_SCALAR(overflow64); 563} 564 565void | 555{ 556 SERIALIZE_SCALAR(eventId); 557 SERIALIZE_SCALAR(value); 558 SERIALIZE_SCALAR(enabled); 559 SERIALIZE_SCALAR(overflow64); 560} 561 562void |
566PMU::CounterState::unserialize(Checkpoint *cp, const std::string §ion) | 563PMU::CounterState::unserialize(CheckpointIn &cp) |
567{ 568 UNSERIALIZE_SCALAR(eventId); 569 UNSERIALIZE_SCALAR(value); 570 UNSERIALIZE_SCALAR(enabled); 571 UNSERIALIZE_SCALAR(overflow64); 572} 573 574bool --- 20 unchanged lines hidden --- | 564{ 565 UNSERIALIZE_SCALAR(eventId); 566 UNSERIALIZE_SCALAR(value); 567 UNSERIALIZE_SCALAR(enabled); 568 UNSERIALIZE_SCALAR(overflow64); 569} 570 571bool --- 20 unchanged lines hidden --- |