Skip to content

Recording a profile adds about 1.2 % to the frame and the GPU #93

Open

Description

@5hif7y

Related to #10, #12

What happens

mirai bench compare on demo (RX 580 (no ray queries, so the software tracer), amdvlk 31.0.21924.61, Windows 10, i5-7400, 16 GB), 5 alternating pairs of 240 frames, dev builds:

Run frame p50 Δ GPU Δ CPU main thread Δ
head vs base, 1 +0.056 ms (+1.2 %), every pair agrees +0.050 ms, every pair agrees noise
head vs base, 2 +0.055 ms (+1.2 %), every pair agrees +0.053 ms, every pair agrees noise
base vs base +0.024 ms, pairs disagree +0.023 ms, pairs disagree noise
  • The shaders are identical on both sides.
  • bench always measures inside profile.capture, so this is the cost while recording. Memory sampling was off.
  • Part of the GPU Δ may be bookkeeping: Give each GPU pass of a profile to the frame that submitted it, where it ran #10 sums every submission of a frame, where main took the last one. That does not explain the wall-clock frame time, though.
  • The per-pass ddgi row is not comparable between the two tools: the same base build reads 0.394 ms under the head's tool and 0.47 ms under its own.

Expected

Find where the 0.05 ms goes while recording, and remove it, or document it as the cost of recording.

🤖 Generated with Claude Code

Activity

  1. self-assigned this
    on Nov 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions