mirror of
https://github.com/MoleskiCoder/EightBit.git
synced 2024-11-17 04:09:14 +00:00
70c70af969
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
24 lines
425 B
C++
24 lines
425 B
C++
#pragma once
|
|
|
|
#include <array>
|
|
#include <cstdint>
|
|
|
|
namespace EightBit {
|
|
class Profiler {
|
|
public:
|
|
Profiler() noexcept;
|
|
~Profiler();
|
|
|
|
void addInstruction(uint8_t instruction);
|
|
void addAddress(uint16_t address);
|
|
|
|
void dump() const;
|
|
|
|
private:
|
|
std::array<uint64_t, 0x100> m_instructions;
|
|
std::array<uint64_t, 0x10000> m_addresses;
|
|
|
|
void dumpInstructionProfiles() const;
|
|
void dumpAddressProfiles() const;
|
|
};
|
|
} |