Skip to content

Debugging Tool WPA Attribution

Mainkill1 edited this page Sep 21, 2026 · 1 revision

WPA attribution helpers

← Debugging Tools and Commands

The xemu WPA attribution helpers derive a bounded export profile, validate WPAExporter output, sanitize host data, and reproduce thread/GPU timing summaries from saved ETL evidence.

Property Details
Supported OS Windows for ETL export; Python analysis on Windows, Linux, or macOS.
Install Clone the matching xemu-perf-tests revision and install Python 3 plus Windows Performance Toolkit on the export host.
Verify python3 --version
Primary output See the workflow below.

When to use it

After the target PID/TID and measurement range are established, the saved ETL can be reduced into a reproducible, privacy-minimized dataset.

Sanitize exported tables

python3 sanitize-attribution.py \
  --sampled "$SAMPLED_CSV" \
  --precise "$PRECISE_CSV" \
  --gpu "$GPU_CSV" \
  --output-dir "$COMPACT_DIR" \
  --pid "$PID" \
  --tid "$PFIFO_TID" \
  --image-base "$RUNTIME_IMAGE_BASE" \
  --image-end "$RUNTIME_IMAGE_END"

The compact packet retains the target IDs, timestamps, sample weights, xemu RVAs, limited external module identity, readying scope, and GPU intervals while dropping unrelated host context.

Reproduce the timing partition

python3 analyze-sanitized.py \
  --sampled "$COMPACT_DIR/sampled-pfifo.csv" \
  --precise "$COMPACT_DIR/precise-pfifo.csv" \
  --gpu "$COMPACT_DIR/gpu-process.csv" \
  --output-summary "$COMPACT_DIR/summary.json" \
  --output-leaves "$COMPACT_DIR/sampled-leaf-summary.csv" \
  --pid "$PID" \
  --tid "$PFIFO_TID" \
  --start-s "$START_SECONDS" \
  --end-s "$END_SECONDS" \
  --pe "$EXACT_PE" \
  --symbol-map "$EXACT_SYMBOL_MAP" \
  --expected-pe-sha256 "$EXPECTED_PE_SHA256" \
  --expected-symbol-map-sha256 "$EXPECTED_SYMBOL_MAP_SHA256"

Read the outputs

summary.json is useful for exact bounded totals such as:

  • scheduled running time;
  • waiting time;
  • ready time;
  • partition closure against the selected window;
  • GPU interval union;
  • temporal wait/GPU overlap.

sampled-leaf-summary.csv ranks bounded leaf ownership from sampled CPU records.

Example retained result:

tlb_reset_dirty_range_all
407.9830 ms sampled weight
9.7626% of PFIFO sample weight

That means roughly 9.76% of the PFIFO sample weight mapped to that bounded leaf. It is not 9.76% of total host CPU, not 9.76% of frame time, and not proof that the entire 407.983 ms can be removed.


Boundaries and common mistakes

Pin the ETL, profile, executable, symbol map, PID, TID, image range, and start/end timestamps. Use a fresh export directory and keep raw exports private when they contain unrelated host activity.

Sanitization can minimize evidence but cannot repair a truncated or incorrectly filtered export. Validate integrity before reducing it.

Evidence to retain

  • Tool name and exact version.
  • Source commit/tree and executable SHA-256.
  • The complete command or saved profile used.
  • Input artifact hashes and the explicitly selected time or address range.
  • Raw output plus any derived report; do not retain only a screenshot or conclusion.
  • Admission failures, warnings, dropped events, incomplete rows, or unsupported operations.

Official references

Related xemu guides

Clone this wiki locally