EightBit/Z80/inc/Profiler.h
Adrian.Conlon 211c75d84d Add Z80 processor and tests.
Signed-off-by: Adrian.Conlon <adrian.conlon@gmail.com>
2017-06-05 22:39:15 +01:00

24 lines
416 B
C++

#pragma once
#include <array>
#include <cstdint>
namespace EightBit {
class Profiler {
public:
Profiler();
~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;
};
}