Skip to content

Commit

Permalink
SPU: Add debug information when logging analyzer failures
Browse files Browse the repository at this point in the history
  • Loading branch information
elad335 committed Apr 13, 2024
1 parent 7833862 commit 51b56e8
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions rpcs3/Emu/Cell/SPUCommonRecompiler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -802,6 +802,9 @@ void spu_cache::initialize(bool build_existing_cache)

compiler->init();

// Counter for error reporting
u32 logged_error = 0;

// How much every thread compiled
uint result = 0;

Expand Down Expand Up @@ -861,6 +864,14 @@ void spu_cache::initialize(bool build_existing_cache)
if (func2 != func)
{
spu_log.error("[0x%05x] SPU Analyser failed, %u vs %u", func2.entry_point, func2.data.size(), size0);

if (logged_error < 2)
{
std::string log;
compiler->dump(func, log);
spu_log.notice("[0x%05x] Function: %s", func.entry_point, log);
logged_error++;
}
}
else if (!compiler->compile(std::move(func2)))
{
Expand Down

0 comments on commit 51b56e8

Please sign in to comment.