Skip to content

[TRACE] Added %name support for BOX64_TRACE_FILE - #4273

Open
Mikura-Kyouka wants to merge 1 commit into
ptitSeb:mainfrom
Mikura-Kyouka:name
Open

[TRACE] Added %name support for BOX64_TRACE_FILE#4273
Mikura-Kyouka wants to merge 1 commit into
ptitSeb:mainfrom
Mikura-Kyouka:name

Conversation

@Mikura-Kyouka

Copy link
Copy Markdown
Contributor

BOX64_TRACE_FILE can now use %name to include the target executable basename in the trace filename, in addition to the existing %pid.

This is useful when tracing is enabled globally through an rcfile or environment variable, including Wine and Wine preloader invocations. The name is sanitized before being used as a filename and falls back to "unknown" when it cannot be determined.

Updated the relevant documentation.

Tested by running Needy Girl Overdose via Steam.

屏幕截图_20260820_132515

BOX64_TRACE_FILE can now use %name to include the target executable
basename in the trace filename, in addition to the existing %pid.

This is useful when tracing is enabled globally through an rcfile or
environment variable, including Wine and Wine preloader invocations.
The name is sanitized before being used as a filename and falls back
to "unknown" when it cannot be determined.

Updated the relevant documentation.
@ksco

ksco commented Aug 20, 2026

Copy link
Copy Markdown
Collaborator

The idea is okay, but the code seems to be some copy-paste from the initialize() function. I understand that you may try not to break anything, but there is quite some duplicated code there.

@Mikura-Kyouka

Copy link
Copy Markdown
Contributor Author

The idea is okay, but the code seems to be some copy-paste from the initialize() function. I understand that you may try not to break anything, but there is quite some duplicated code there.

To be honest, I can't think of a better way... Obtaining the executable filename in initialize() is more of a bonus than the main purpose, so these identification logics can't be eliminated here. While openFTrace() needs to execute before those identification logics in initialize() in order to prepare where to write the trace...

@ksco

ksco commented Aug 20, 2026

Copy link
Copy Markdown
Collaborator

Sure, but someone needs to clean this up later.

@ptitSeb

ptitSeb commented Aug 20, 2026

Copy link
Copy Markdown
Owner

looks ok to me, but yeah, some cleaning to make the change smaller would be nice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants