mirror of
https://github.com/MoleskiCoder/EightBit.git
synced 2024-11-17 04:09:14 +00:00
1b2ddd8843
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
33 lines
564 B
C++
33 lines
564 B
C++
#pragma once
|
|
|
|
#include <array>
|
|
#include <cstdint>
|
|
|
|
#include "Disassembler.h"
|
|
#include "GameBoyBus.h"
|
|
|
|
namespace EightBit {
|
|
namespace GameBoy {
|
|
|
|
class LR35902;
|
|
|
|
class Profiler {
|
|
public:
|
|
Profiler(Bus& bus, LR35902& cpu);
|
|
|
|
void add(uint16_t address, uint8_t instruction);
|
|
|
|
void dump() const;
|
|
|
|
private:
|
|
std::array<uint64_t, 0x100> m_instructions;
|
|
std::array<uint64_t, 0x10000> m_addresses;
|
|
Bus& m_bus;
|
|
LR35902& m_cpu;
|
|
Disassembler m_disassembler;
|
|
|
|
void dumpInstructionProfiles() const;
|
|
void dumpAddressProfiles() const;
|
|
};
|
|
}
|
|
} |