From 172def9e1a21ffc8dc50acd27d1a674a7644c9e5 Mon Sep 17 00:00:00 2001 From: Armin Rigo Date: Sun, 1 Nov 2009 18:57:20 +0000 Subject: Merge the 'logging2' branch. Add a general way to record logging events to pypy.rlib.debug. In addition to debug_print() there is now debug_start() and debug_stop() to mark the start/stop of a category. svn merge -r68854:68901 svn+ssh://codespeak.net/svn/pypy/branch/logging2 Use it in the GC (replaces the gcconfig.debugprint config option) and in the JIT (similar to jitprof.py, which is not dead yet but obsoleting). To enable logging run the compiled program with 'PYPYLOG=:file'. To enable lightweight logging only, suitable for profiling, run it with 'PYPYLOG=file'. See translator/c/src/debug.h for more options. To turn the profiling logs into nice graphics, see pypy/tool/logparser.py. --- pypy/jit/tool/jitoutput.py | 6 +++--- pypy/jit/tool/test/test_jitoutput.py | 6 ++---- 2 files changed, 5 insertions(+), 7 deletions(-) (limited to 'pypy/jit/tool') diff --git a/pypy/jit/tool/jitoutput.py b/pypy/jit/tool/jitoutput.py index 6fc26e3a03..fad4f10e7a 100644 --- a/pypy/jit/tool/jitoutput.py +++ b/pypy/jit/tool/jitoutput.py @@ -10,9 +10,9 @@ import re REGEXES = [ (('tracing_no', 'tracing_time'), '^Tracing:\s+([\d.]+)\s+([\d.]+)$'), (('backend_no', 'backend_time'), '^Backend:\s+([\d.]+)\s+([\d.]+)$'), - (('asm_no', 'asm_time'), '^Running asm:\s+([\d.]+)\s+([\d.]+)$'), - (('blackhole_no', 'blackhole_time'), - '^Blackhole:\s+([\d.]+)\s+([\d.]+)$'), + (('asm_no',), '^Running asm:\s+([\d.]+)$'), + (('blackhole_no',), + '^Blackhole:\s+([\d.]+)$'), (None, '^TOTAL.*$'), (('ops.total',), '^ops:\s+(\d+)$'), (('ops.calls',), '^\s+calls:\s+(\d+)$'), diff --git a/pypy/jit/tool/test/test_jitoutput.py b/pypy/jit/tool/test/test_jitoutput.py index 093f406599..0b9306acdd 100644 --- a/pypy/jit/tool/test/test_jitoutput.py +++ b/pypy/jit/tool/test/test_jitoutput.py @@ -51,8 +51,8 @@ def test_really_run(): DATA = '''Tracing: 1 0.006992 Backend: 1 0.000525 -Running asm: 1 0.016957 -Blackhole: 1 0.000233 +Running asm: 1 +Blackhole: 1 TOTAL: 0.025532 ops: 2 calls: 1 @@ -75,9 +75,7 @@ def test_parse(): assert info.tracing_no == 1 assert info.tracing_time == 0.006992 assert info.asm_no == 1 - assert info.asm_time == 0.016957 assert info.blackhole_no == 1 - assert info.blackhole_time == 0.000233 assert info.backend_no == 1 assert info.backend_time == 0.000525 assert info.ops.total == 2 -- cgit v1.2.3-65-gdbad