Proposal: optional post-run log analysis in the KytyPS5 launcher #622

Open
opened 2026-11-26 09:27:24 +00:00 by github-bot · 4 comments
Owner

@⁠rodrigogalvezpinto on GitHub · 2026-09-15 03:17 UTC · original

Context

This proposal follows the feedback on kytyps5.github.io#376 (closed). The feedback was that the idea of kyty-log-tools seemed useful, that log analysis tooling belongs better in the main repository than in the compatibility site, and that a direction like an optional toggle that analyzes the log of the run that just finished could be a good fit.

We read that as the what. This issue proposes the how: a concrete integration plan based on the current KytyPS5 launcher and build architecture. We would like feedback before implementing anything.

Current proposal

A native C++20 kyty_log_analyzer: a small standalone executable built with CMake, optionally invoked by the launcher after kyty_emulator finishes.

KytyPS5 Launcher
       |
       | Run
       v
kyty_emulator
       |
       | process finishes
       v
optional log analysis
       |
       v
kyty_log_analyzer
       |
       v
_kyty.txt  -->  compact analysis / optional JSON report

We propose to keep the analyzer as a separate process. The main reason: many of the runs worth analyzing end through fatal emulator paths, and if the emulator process dies abruptly an in-process analyzer would never get to run. Only the log file survives, so analysis is external:

emulator process -> finishes -> external analyzer

Architecture (Phase 1)

Proposed layout:

src/log_analyzer/
    parser.{h,cpp}      # streaming log parser
    analyzer.{h,cpp}    # event analysis, human summary, optional JSON
    main.cpp            # standalone CLI
  • Streaming parser.
  • Deterministic analysis of events already present in the log (unsupported instructions with family, opcode, raw bits and reason; unresolved/stub-called imports).
  • Human-readable summary.
  • Optional JSON output.
  • Standalone CLI: kyty_log_analyzer <log> [--json <file>].
  • Tests via the existing gtest/CTest setup.

The analyzer would be an independent CMake target (kyty_log_analyzer) installed next to kyty_emulator. Since the release pipeline already packages the install directory, such an executable would travel with current releases without new runtime dependencies.

No Node.js: the repository is C++20 and does not use Node/JavaScript in its build or runtime, so we prefer not to introduce it as a runtime dependency.

Launcher integration (Phase 2)

An optional per-game setting, e.g. "Analyze log after run":

  • OFF by default.
  • Stored with the game configuration, in the debugging/logging section.
  • Runs after the emulator process finishes; the launcher already has a natural hook for this in its QProcess::finished handler.
  • Never changes the emulator run result: if _kyty.txt is missing, or the analyzer is unavailable, fails, or takes too long, it is treated as an informational, non-critical issue.

Open questions

  1. Is a companion CLI binary such as kyty_log_analyzer acceptable, or would you prefer analysis embedded inside the emulator process?
  2. Does the proposed post-run launcher toggle match the intended workflow?
  3. Should analysis also be exposed for users running kyty_emulator directly from the CLI (since it is usable without the launcher)?
  4. If the analysis toggle is enabled while printf logging is set to Silent, would you prefer the launcher to temporarily enable file logging for that run, or should analysis simply be skipped unless a log file is already being produced?
  5. Is a human-readable summary plus optional JSON output appropriate - e.g. a short summary shown by the launcher, with the full report written to a file (such as _kyty.analysis.json) next to the log?
  6. Would you prefer Phase 1 and Phase 2 to be separate pull requests, so the analyzer can be reviewed in isolation before any launcher behavior changes?

Notes

  • The TypeScript prototype (kyty-log-tools, in kytyps5.github.io) is a validated reference: streaming parser, deterministic analysis, automated tests, and a run against a real ~5 MB / ~110k-line log with reproducible results. The proposal here is a native C++ port of that behavior - an analysis/evidence tool that provides a compact, structured summary of information already present in the Kyty log, not a root-cause detector or an automatic compatibility fixer.
  • The implementation would follow the repository license (GPL-2.0); the TypeScript prototype is MIT, so there is no licensing conflict.

We would welcome any corrections to this direction before starting implementation.

**@⁠rodrigogalvezpinto** on GitHub · 2026-09-15 03:17 UTC · [original](https://github.com/KytyPS5/KytyPS5/issues/622) ### Context This proposal follows the feedback on [kytyps5.github.io#376](https://github.com/KytyPS5/kytyps5.github.io/pull/376) (closed). The feedback was that the idea of `kyty-log-tools` seemed useful, that log analysis tooling belongs better in the main repository than in the compatibility site, and that a direction like an optional toggle that analyzes the log of the run that just finished could be a good fit. We read that as the *what*. This issue proposes the *how*: a concrete integration plan based on the current KytyPS5 launcher and build architecture. We would like feedback before implementing anything. ### Current proposal A native C++20 **`kyty_log_analyzer`**: a small standalone executable built with CMake, optionally invoked by the launcher after `kyty_emulator` finishes. ```text KytyPS5 Launcher | | Run v kyty_emulator | | process finishes v optional log analysis | v kyty_log_analyzer | v _kyty.txt --> compact analysis / optional JSON report ``` We propose to keep the analyzer as a separate process. The main reason: many of the runs worth analyzing end through fatal emulator paths, and if the emulator process dies abruptly an in-process analyzer would never get to run. Only the log file survives, so analysis is external: ```text emulator process -> finishes -> external analyzer ``` ### Architecture (Phase 1) Proposed layout: ```text src/log_analyzer/ parser.{h,cpp} # streaming log parser analyzer.{h,cpp} # event analysis, human summary, optional JSON main.cpp # standalone CLI ``` - Streaming parser. - Deterministic analysis of events already present in the log (unsupported instructions with family, opcode, raw bits and reason; unresolved/stub-called imports). - Human-readable summary. - Optional JSON output. - Standalone CLI: `kyty_log_analyzer <log> [--json <file>]`. - Tests via the existing gtest/CTest setup. The analyzer would be an independent CMake target (`kyty_log_analyzer`) installed next to `kyty_emulator`. Since the release pipeline already packages the install directory, such an executable would travel with current releases without new runtime dependencies. **No Node.js**: the repository is C++20 and does not use Node/JavaScript in its build or runtime, so we prefer not to introduce it as a runtime dependency. ### Launcher integration (Phase 2) An optional per-game setting, e.g. **"Analyze log after run"**: - OFF by default. - Stored with the game configuration, in the debugging/logging section. - Runs after the emulator process finishes; the launcher already has a natural hook for this in its `QProcess::finished` handler. - **Never changes the emulator run result**: if `_kyty.txt` is missing, or the analyzer is unavailable, fails, or takes too long, it is treated as an informational, non-critical issue. ### Open questions 1. Is a companion CLI binary such as `kyty_log_analyzer` acceptable, or would you prefer analysis embedded inside the emulator process? 2. Does the proposed post-run launcher toggle match the intended workflow? 3. Should analysis also be exposed for users running `kyty_emulator` directly from the CLI (since it is usable without the launcher)? 4. If the analysis toggle is enabled while printf logging is set to `Silent`, would you prefer the launcher to temporarily enable file logging for that run, or should analysis simply be skipped unless a log file is already being produced? 5. Is a human-readable summary plus optional JSON output appropriate - e.g. a short summary shown by the launcher, with the full report written to a file (such as `_kyty.analysis.json`) next to the log? 6. Would you prefer Phase 1 and Phase 2 to be separate pull requests, so the analyzer can be reviewed in isolation before any launcher behavior changes? ### Notes - The TypeScript prototype (`kyty-log-tools`, in kytyps5.github.io) is a validated *reference*: streaming parser, deterministic analysis, automated tests, and a run against a real ~5 MB / ~110k-line log with reproducible results. The proposal here is a native C++ port of that behavior - an analysis/evidence tool that provides a compact, structured summary of information already present in the Kyty log, not a root-cause detector or an automatic compatibility fixer. - The implementation would follow the repository license (GPL-2.0); the TypeScript prototype is MIT, so there is no licensing conflict. We would welcome any corrections to this direction before starting implementation.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 09:27:24 +00:00
Author
Owner

@⁠Petouha on GitHub · 2026-11-12 17:13 UTC · original

Hi, I want to work on this issue if possible. Is it still relevant ? or has the direction changed since it was opened?

If it’s still relevant, I’d plan to start with Phase 1 only and try and do a good parser/analyzer.

**@⁠Petouha** on GitHub · 2026-11-12 17:13 UTC · [original](https://github.com/KytyPS5/KytyPS5/issues/622#issuecomment-6830569158) Hi, I want to work on this issue if possible. Is it still relevant ? or has the direction changed since it was opened? If it’s still relevant, I’d plan to start with Phase 1 only and try and do a good parser/analyzer.
Author
Owner

@⁠ryu844 on GitHub · 2026-11-17 19:32 UTC · original

Hi been having this issue for about a week, the game crashes before it gets into game,it was working until a week ago.
My OS is MX Linux 25.3 AHS KDE: GPU 5060ti 8GB,DDR5 RAM 6000mts.

kytyps5-log.txt

**@⁠ryu844** on GitHub · 2026-11-17 19:32 UTC · [original](https://github.com/KytyPS5/KytyPS5/issues/622#issuecomment-6958694913) Hi been having this issue for about a week, the game crashes before it gets into game,it was working until a week ago. My OS is MX Linux 25.3 AHS KDE: GPU 5060ti 8GB,DDR5 RAM 6000mts. [kytyps5-log.txt](https://github.com/user-attachments/files/34991528/kytyps5-log.txt)
Author
Owner

@⁠Nawid3333 on GitHub · 2026-11-17 22:03 UTC · original

@⁠ryu844 Your log stops with unsupported texture mip view changes physical layout: base=6 last=6 max=5 extent=1920x1080x1 tile=27 in ASTRO BOT (PPSA21567). This is a regression from bd41e2f6c (11-07), and #2357 by @⁠wuboo fixes exactly this message (same values, same PS-logo stage).

You can try its build: CI run 44176181642, artifact KytyPS5-Linux-x86_64. Reporting the result on #2357 would help it get merged.

For other games, please open a new issue with the game status template; this thread is about a launcher proposal.

**@⁠Nawid3333** on GitHub · 2026-11-17 22:03 UTC · [original](https://github.com/KytyPS5/KytyPS5/issues/622#issuecomment-6962280826) @⁠ryu844 Your log stops with `unsupported texture mip view changes physical layout: base=6 last=6 max=5 extent=1920x1080x1 tile=27` in ASTRO BOT (PPSA21567). This is a regression from bd41e2f6c (11-07), and #2357 by @⁠wuboo fixes exactly this message (same values, same PS-logo stage). You can try its build: [CI run 44176181642](https://github.com/KytyPS5/KytyPS5/actions/runs/44176181642), artifact `KytyPS5-Linux-x86_64`. Reporting the result on #2357 would help it get merged. For other games, please open a new issue with the game status template; this thread is about a launcher proposal.
Author
Owner

@⁠Petouha on GitHub · 2026-11-18 10:03 UTC · original

I’ve been slowly working on a small log analyzer to see how it turns out, and a first version of the CLI is on my fork, just tried it on the log posted just above, it prints the descriptors.cpp:606 “texture mip view changes physical layout” error directly, which was found by @⁠Nawid3333

I am trying to work on it on my free time, maybe it could be useful to you guys

**@⁠Petouha** on GitHub · 2026-11-18 10:03 UTC · [original](https://github.com/KytyPS5/KytyPS5/issues/622#issuecomment-6975264183) I’ve been slowly working on a small log analyzer to see how it turns out, and a first version of the CLI is on my fork, just tried it on the log posted just above, it prints the descriptors.cpp:606 “texture mip view changes physical layout” error directly, which was found by @⁠Nawid3333 I am trying to work on it on my free time, maybe it could be useful to you guys
This discussion has been locked. Commenting is limited to contributors.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
github/KytyPS5--KytyPS5#622
No description provided.