[pypy-svn] r76573 - in pypy/branch/memrecord: . pypy/translator/c/src
arigo at codespeak.net
arigo at codespeak.net
Tue Aug 10 18:58:24 CEST 2010
Author: arigo
Date: Tue Aug 10 18:58:22 2010
New Revision: 76573
Modified:
pypy/branch/memrecord/dump.py
pypy/branch/memrecord/pypy/translator/c/src/debug_memrecord.h
Log:
gzip the file. Reduces it roughly 5x.
Modified: pypy/branch/memrecord/dump.py
==============================================================================
--- pypy/branch/memrecord/dump.py (original)
+++ pypy/branch/memrecord/dump.py Tue Aug 10 18:58:22 2010
@@ -1,7 +1,7 @@
#! /usr/bin/env python
-import struct
+import struct, os
-f = open('debug_memrecord', 'rb')
+f = os.popen('zcat debug_memrecord.gz', 'r')
while 1:
data = f.read(20)
if len(data) < 20:
Modified: pypy/branch/memrecord/pypy/translator/c/src/debug_memrecord.h
==============================================================================
--- pypy/branch/memrecord/pypy/translator/c/src/debug_memrecord.h (original)
+++ pypy/branch/memrecord/pypy/translator/c/src/debug_memrecord.h Tue Aug 10 18:58:22 2010
@@ -40,7 +40,7 @@
void debug_memrecord_startup(void)
{
- debug_memrecord_f = fopen("debug_memrecord", "wb");
+ debug_memrecord_f = popen("gzip -c -3 > debug_memrecord.gz", "w");
assert(debug_memrecord_f);
}
More information about the Pypy-commit
mailing list