- FrameLedger.ProcessStats.dll (C++20, loaded by the Agent, never into a game): the game process's dedicated and shared
GPU memory from the documented `GPU Process Memory` performance counters (no handle to the game, every instance of the
pid summed) and its private working set / working set / commit from GetProcessMemoryInfo (EX2, falling back to EX)
through PROCESS_QUERY_LIMITED_INFORMATION only (a sentinel refuses an EX2 answer whose private working set was not
filled). Not D3DKMTQueryStatistics ("Reserved for system use").
ctest fl_process_stats (GPU_INSTANCE on a hardware adapter, NO_GPU_INSTANCE on CI) and fl-probe-processstats.
- Measured first, decision table in spike-notes §16 written before the runs: +512.0 MiB for a 512 MiB buffer,
private working set equal to Windows' own counter, 0.1 ms per read, nothing leaked over 600 reads; dedicated reads a
constant 4.5 MiB above DXGI's local usage, so it is never compared with a budget.
- NativeProcessStats (third facade), GameMemoryReader: a pinned session reads through its held handle; an unpinned
Tier-2 hold opens each process of the executable for the read, refuses a reused pid, sums. CaptureSession tells the
observer which process (ICaptureObserver.Measuring), the recorder forwards it to the poller (ITelemetryPoller.Follow).
- TelemetrySample.Game; five sensor series; schema 0018 (game_vram_dedicated_*, game_ram_private_*, ..., sensor_stats_json);
SeriesAggregates gains Median and Min; a wide .partial sensors chunk (type 8) with type 4 still read; SessionProgress
and SessionHeld carry the game's memory live.
- notice-check accepts a contributor's own copyright line in the same form.
- Tests: the two classes that open a LibreHardwareMonitor Computer run one at a time - GenericCpu.Update threw a
NullReferenceException in the local gate when they ran in parallel (the Agent's own read is already contained).
- Docs corrected in place: 03_METRICS, 18_GPU_VENDOR_APIS, 17_HOOK_ENGINE, 20_OPEN_QUESTIONS (§M7, §H10, new §M11),
04_CAPTURE, 19_SAFETY, 06_DATA_MODEL, 07_IPC, 02_SPEC, 01_ARCHITECTURE, 12_BUILD, CLAUDE.md; the accuracy block and
LIMITATIONS.md.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
18 lines
756 B
C#
18 lines
756 B
C#
// SPDX-License-Identifier: GPL-3.0-only
|
|
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
|
|
|
|
using System.Runtime.InteropServices;
|
|
|
|
namespace FrameLedger.Infrastructure.Capture;
|
|
|
|
/// <summary>
|
|
/// A session's pin that lends its handle to a read about the process (beta.12, D43): <c>GameMemoryReader</c> reads the
|
|
/// game's own memory through the handle the session already holds for liveness — <c>SYNCHRONIZE |
|
|
/// PROCESS_QUERY_LIMITED_INFORMATION</c> and nothing more — so a pinned session opens nothing new for it.
|
|
/// </summary>
|
|
public interface IHeldProcessHandle
|
|
{
|
|
/// <summary>The held handle. Borrowed for a call, never disposed or stored by the borrower.</summary>
|
|
SafeHandle ProcessHandle { get; }
|
|
}
|