pmu.cc (12177:6a730a33da01) pmu.cc (12278:3a5e50b4f9d9)
1/*
2 * Copyright (c) 2011-2014, 2017 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

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

574 cycleCounter.unserializeSection(cp, "cycleCounter");
575}
576
577void
578PMU::CounterState::serialize(CheckpointOut &cp) const
579{
580 SERIALIZE_SCALAR(eventId);
581 SERIALIZE_SCALAR(value);
1/*
2 * Copyright (c) 2011-2014, 2017 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

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

574 cycleCounter.unserializeSection(cp, "cycleCounter");
575}
576
577void
578PMU::CounterState::serialize(CheckpointOut &cp) const
579{
580 SERIALIZE_SCALAR(eventId);
581 SERIALIZE_SCALAR(value);
582 SERIALIZE_SCALAR(enabled);
583 SERIALIZE_SCALAR(overflow64);
584}
585
586void
587PMU::CounterState::unserialize(CheckpointIn &cp)
588{
589 UNSERIALIZE_SCALAR(eventId);
590 UNSERIALIZE_SCALAR(value);
582 SERIALIZE_SCALAR(overflow64);
583}
584
585void
586PMU::CounterState::unserialize(CheckpointIn &cp)
587{
588 UNSERIALIZE_SCALAR(eventId);
589 UNSERIALIZE_SCALAR(value);
591 UNSERIALIZE_SCALAR(enabled);
592 UNSERIALIZE_SCALAR(overflow64);
593}
594
595bool
596PMU::CounterState::add(uint64_t delta)
597{
598 const uint64_t msb(1ULL << (overflow64 ? 63 : 31));
599 const uint64_t old_value(value);

--- 14 unchanged lines hidden ---
590 UNSERIALIZE_SCALAR(overflow64);
591}
592
593bool
594PMU::CounterState::add(uint64_t delta)
595{
596 const uint64_t msb(1ULL << (overflow64 ? 63 : 31));
597 const uint64_t old_value(value);

--- 14 unchanged lines hidden ---