1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
|
//
// Copyright © 2019 Arm Ltd. All rights reserved.
// SPDX-License-Identifier: MIT
//
#pragma once
#include <cstdint>
namespace arm
{
namespace pipe
{
class IReadCounterValues
{
public:
virtual ~IReadCounterValues() {}
virtual bool IsCounterRegistered(uint16_t counterUid) const = 0;
virtual bool IsCounterRegistered(const std::string& counterName) const = 0;
virtual uint16_t GetCounterCount() const = 0;
virtual uint32_t GetAbsoluteCounterValue(uint16_t counterUid) const = 0;
virtual uint32_t GetDeltaCounterValue(uint16_t counterUid) = 0;
};
class IWriteCounterValues
{
public:
virtual ~IWriteCounterValues() {}
virtual void SetCounterValue(uint16_t counterUid, uint32_t value) = 0;
virtual uint32_t AddCounterValue(uint16_t counterUid, uint32_t value) = 0;
virtual uint32_t SubtractCounterValue(uint16_t counterUid, uint32_t value) = 0;
virtual uint32_t IncrementCounterValue(uint16_t counterUid) = 0;
};
class IReadWriteCounterValues : public IReadCounterValues, public IWriteCounterValues
{
public:
virtual ~IReadWriteCounterValues() {}
};
} // namespace pipe
} // namespace arm
|