[pypy-commit] pypy vmprof-native: handle all vmprof TAGS in the test that decodes the logfile

plan_rich pypy.commits at gmail.com
Thu Feb 9 06:29:13 EST 2017


Author: Richard Plangger <planrichi at gmail.com>
Branch: vmprof-native
Changeset: r90022:f6addbdf4889
Date: 2017-02-09 12:28 +0100
http://bitbucket.org/pypy/pypy/changeset/f6addbdf4889/

Log:	handle all vmprof TAGS in the test that decodes the logfile

diff --git a/pypy/module/_vmprof/test/test__vmprof.py b/pypy/module/_vmprof/test/test__vmprof.py
--- a/pypy/module/_vmprof/test/test__vmprof.py
+++ b/pypy/module/_vmprof/test/test__vmprof.py
@@ -43,7 +43,16 @@
                     count += 1
                     i += 2 * WORD + size
                 elif s[i] == '\x06':
-                    i += 8+8+8
+                    print(s[i:i+24])
+                    i += 1+8+8+8
+                elif s[i] == '\x07':
+                    i += 1
+                    # skip string
+                    size, = struct.unpack("l", s[i:i + WORD])
+                    i += WORD+size
+                    # skip string
+                    size, = struct.unpack("l", s[i:i + WORD])
+                    i += WORD+size
                 else:
                     raise AssertionError(ord(s[i]))
             return count


More information about the pypy-commit mailing list