summaryrefslogtreecommitdiffstats
path: root/tools/guest-diag/pin_gr_stream.py
diff options
context:
space:
mode:
Diffstat (limited to 'tools/guest-diag/pin_gr_stream.py')
-rw-r--r--tools/guest-diag/pin_gr_stream.py29
1 files changed, 25 insertions, 4 deletions
diff --git a/tools/guest-diag/pin_gr_stream.py b/tools/guest-diag/pin_gr_stream.py
index ff7e299..de2e706 100644
--- a/tools/guest-diag/pin_gr_stream.py
+++ b/tools/guest-diag/pin_gr_stream.py
@@ -136,7 +136,8 @@ def _start_cmd():
b64 = subprocess.run(["base64", "-w0"], stdin=f,
capture_output=True, text=True,
timeout=10).stdout
- prefixes = os.environ.get("CLIENT_PREFIXES", "cdt,va,victory")
+ prefixes = os.environ.get("CLIENT_PREFIXES",
+ "cdt,va,victory,Xorg,X,glxgears,gzdoom")
vma_every = os.environ.get("STREAM_VMA_EVERY", "1")
# Kill EVERY existing scanner, not just the pid-file one: a retry after
# a partially-failed first attempt (pid file not written yet) used to
@@ -219,6 +220,14 @@ def _demand_loop():
that was not yet written when first asked is picked up on a retry.
This closes the stall class where the one-shot #sem kprobe event was
lost and the chain resolver never learns the client.
+
+ r908: the GR ring VA itself ('GR ring h=0x... ... (va=0x...)', the
+ path-B "RAM content scan found no candidate" and "not at fb" rows) is
+ harvested too - the ring page is a kernel allocation the userspace
+ pagemap cannot cover, so the guest's content resolver is the only
+ source, and the pump needs the ring readable to decode its entries.
+ Same bounded/deduped tracking (distinct VAs, 20 s resend, 300 s
+ expiry) as the stalled-VA class.
"""
track = {} # va -> [first_seen, last_sent]
while True:
@@ -229,9 +238,21 @@ def _demand_loop():
except Exception:
continue
now = time.time()
- for m in re.finditer(r"(?:stalled VA #\d+[:=]\s*|pending release starved va=)(0x[0-9a-f]+)",
- (r.stdout or "")[-200000:]):
- va = int(m.group(1), 16)
+ for m in re.finditer(
+ r"(?:stalled VA #\d+[:=]\s*"
+ r"|pending release starved va="
+ r"|GR ring h=0x[0-9a-f]+ rank=\d+[^\n]*?\(va=)"
+ r"(0x[0-9a-f]+)"
+ # r914: an unreadable GR push names its pushbuffer VA -
+ # the GL client's push page is a kernel allocation the
+ # userspace pagemap cannot cover, so the guest's content
+ # resolver is the only source (same class as the ring VA
+ # demand above). Harvest it so the guest resolves and
+ # injects the page.
+ r"|sema-pushdec: h=0x[0-9a-f]+ va=(0x[0-9a-f]+)"
+ r"[^\n]*unreadable=1",
+ (r.stdout or "")[-200000:]):
+ va = int(m.group(1) or m.group(2), 16)
track.setdefault(va, [now, 0.0])
for va in list(track):
first, last = track[va]