Misc: wire up and refactor trace logging #11919
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of Changes
PCSX2 had a special trace logging system for intense debugging only useful for PCSX2 developers or homebrew developers on their 10th consecutive hour of debugging. It only outputs to the emulog and works on dev/debug builds.
This was available while we had the wxWidgets interface but it has never been brought to the Qt interface.
In addition to wiring it up to the Qt interface:
I've renamed the SysCon / SysTrace structures to ConsoleLogging and TraceLogging.
SysCon
is a device in the PS2. Having console logging named the same thing made it confusing.I've ripped out the TraceLog filters (regs,disasm, etc). If you want register logging, enable those logs. If you want disasm logging, enable those logs too. Having an entire hierarchy made things more complex and probably slower (checking if the parent object is enabled, then that parents parent too, etc, etc)
Rationale behind Changes
It's helpful for PCSX2 and homebrew developers. You'd otherwise have to modify the source and manually add logging or force the trace on.
Suggested Testing Steps
Build a dev/debug build. Go to the advanced settings, enable some trace logs. Run a game / elf. Check your emulog to see if it's there.
An easy way to check is to enable the EE or IOP BIOS logging.