FEX-Emu / FEX-Emu/FEX

Offline Debugging & Performance Analysis tools

Open
#495 2 comments 0 reactions 1 assignee Assigned to @skmp View on GitHub
Dominant language
C++
Stars
8k
Forks
351
Avg merge
12h 31m
Merged PRs (30d)
102

Description

Following up some discussions with @Sonicadvance1

## Exposed via FEXLoader
### IR dumping to folder
Rationale: We need the data for offline analysis
- Add `--dump-ir=path/to/folder`?
- Save like `_` to avoid collisions
- Should dump both "IR" and "Mixed IR/Host Code"

### Per-block support for multiblock in perf symbols
Rationale: Superblocks can have 10s of blocks, it is important to attribute runtime to the hot ones
- Export each sub-block as `-`?
- Add it as a command line option, `--perf-metadata=none|basic|detailed`?

### `GuestOp` IR op
Rationale: We need to better track Guest - IR - Host relationships to spot optimization opportunities
- Stores Guest Address, Guest opcode and Guest disassembly, allows us to better AB between Guest and IR
- Exposed via `--ir-debug-metadata`?

## Add Offline IR compiler
Rationale: Allow us to iterate over a specific block/superblock without having to relaunch the guest application
- Should Accept IR as dumped by FEXLoader
- Should be able to show "Mixed IR/Host Code"
- Should be able to calculate basic metrics like "Instruction Blowup" and "Code Size Blowup"

## Tighter perf integration / Perf Explorer
Rationale: We tooling to help us find optimization opportunities and slowdowns, and to also test the "simulated" effects of WIP optimizations
- Show perf data scaled by blowup or other metrics
- Be able to take a perf trace + ir dump and calculate metrics like "average executed code per trace", and also break down by category like "memory", "vector" etc

---

I'd use these as command line utilities in an offline fashion myself.

@Sonicadvance1 @phire, thoughts?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.