summaryrefslogtreecommitdiffstats
path: root/tools/guest-diag/guest_pin_stream.py
diff options
context:
space:
mode:
Diffstat (limited to 'tools/guest-diag/guest_pin_stream.py')
-rw-r--r--tools/guest-diag/guest_pin_stream.py17
1 files changed, 15 insertions, 2 deletions
diff --git a/tools/guest-diag/guest_pin_stream.py b/tools/guest-diag/guest_pin_stream.py
index aa21655..b56f79d 100644
--- a/tools/guest-diag/guest_pin_stream.py
+++ b/tools/guest-diag/guest_pin_stream.py
@@ -1772,8 +1772,21 @@ def main():
st_d = os.stat("/tmp/guest_want_vas.txt")
if st_d.st_mtime != _want_state.get("mtime"):
with open("/tmp/guest_want_vas.txt") as fw:
- wvas = [int(t, 16) for t in fw.read().split()
- if t.startswith("0x")]
+ # r582: tolerate malformed historical lines. The
+ # r581 boot's scanner died here: a transport-escaped
+ # append merged VAs into one token containing
+ # literal backslash-n ('0x20400f000\\n0x121000000\\n
+ # ...') and int(t, 16) raised ValueError out of
+ # main(), stopping ALL new pins (the observed
+ # pool-pin latency). Extract every 0x token instead;
+ # a bad token is skipped, never fatal.
+ wvas = []
+ for t in re.findall(r"0x[0-9a-fA-F]+",
+ fw.read()):
+ try:
+ wvas.append(int(t, 16))
+ except ValueError:
+ pass
_want_state["mtime"] = st_d.st_mtime
for wv in wvas[-64:]:
if wv in _want_state["done"]: