Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(532)

Unified Diff: tools/telemetry/telemetry/core/backends/chrome/desktop_browser_backend.py

Issue 904063002: Loosen the parsing of CDB output in windows; it can start with at least 'ChildEBP' or 'Child-SP', a… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/telemetry/telemetry/core/backends/chrome/desktop_browser_backend.py
diff --git a/tools/telemetry/telemetry/core/backends/chrome/desktop_browser_backend.py b/tools/telemetry/telemetry/core/backends/chrome/desktop_browser_backend.py
index 4982261b16f051bc8a6e316f59e982df56fbaa06..154ae102a07c7b78b764e648cafc610e7a6d5921 100644
--- a/tools/telemetry/telemetry/core/backends/chrome/desktop_browser_backend.py
+++ b/tools/telemetry/telemetry/core/backends/chrome/desktop_browser_backend.py
@@ -8,6 +8,7 @@ import heapq
import logging
import os
import os.path
+import re
import shutil
import subprocess as subprocess
import sys
@@ -264,7 +265,13 @@ class DesktopBrowserBackend(chrome_browser_backend.ChromeBrowserBackend):
return None
output = subprocess.check_output([cdb, '-y', self._browser_directory,
'-c', '.ecxr;k30;q', '-z', minidump])
- stack_start = output.find('ChildEBP')
+ # cdb output can start the stack with "ChildEBP", "Child-SP", and possibly
+ # other things we haven't seen yet. If we can't find the start of the
+ # stack, include output from the beginning.
+ stack_start = 0
+ stack_start_match = re.search("^Child(?:EBP|-SP)", output, re.MULTILINE)
+ if stack_start_match:
+ stack_start = stack_start_match.start()
stack_end = output.find('quit:')
return output[stack_start:stack_end]
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698