[gjs: 2/11] heapgraph: Improve WeakMap regex
- From: Philip Chimento <pchimento src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gjs: 2/11] heapgraph: Improve WeakMap regex
- Date: Sun, 18 Aug 2019 19:21:43 +0000 (UTC)
commit 7036312fd6538029ed9ddb2fbf0f3d3ccda701d4
Author: Philip Chimento <philip chimento gmail com>
Date: Thu Aug 8 20:58:41 2019 -0700
heapgraph: Improve WeakMap regex
It looks like modern SpiderMonkey can print 0x in front of WeakMap
addresses where older SpiderMonkey didn't.
tools/heapgraph.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/tools/heapgraph.py b/tools/heapgraph.py
index 07bcdf1e..2b6d00c3 100755
--- a/tools/heapgraph.py
+++ b/tools/heapgraph.py
@@ -111,7 +111,7 @@ WeakMapEntry = namedtuple('WeakMapEntry', 'weakMap key keyDelegate value')
addr_regex = re.compile('[A-F0-9]+$|0x[a-f0-9]+$')
node_regex = re.compile ('((?:0x)?[a-fA-F0-9]+) (?:(B|G|W) )?([^\r\n]*)\r?$')
edge_regex = re.compile ('> ((?:0x)?[a-fA-F0-9]+) (?:(B|G|W) )?([^\r\n]*)\r?$')
-wme_regex = re.compile ('WeakMapEntry map=([a-zA-Z0-9]+|\(nil\)) key=([a-zA-Z0-9]+|\(nil\))
keyDelegate=([a-zA-Z0-9]+|\(nil\)) value=([a-zA-Z0-9]+)\r?$')
+wme_regex = re.compile(r'WeakMapEntry map=((?:0x)?[a-zA-Z0-9]+|\(nil\)) key=((?:0x)?[a-zA-Z0-9]+|\(nil\))
keyDelegate=((?:0x)?[a-zA-Z0-9]+|\(nil\)) value=((?:0x)?[a-zA-Z0-9]+)')
func_regex = re.compile('Function(?: ([^/]+)(?:/([<|\w]+))?)?')
gobj_regex = re.compile('([^ ]+) (0x[a-fA-F0-9]+$)')
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]