Author: Richard Plangger <planri...@gmail.com> Branch: new-jit-log Changeset: r85362:2816d1b93aad Date: 2016-06-23 18:15 +0200 http://bitbucket.org/pypy/pypy/changeset/2816d1b93aad/
Log: printing rewritten for PYPYLOG again diff --git a/rpython/jit/backend/x86/assembler.py b/rpython/jit/backend/x86/assembler.py --- a/rpython/jit/backend/x86/assembler.py +++ b/rpython/jit/backend/x86/assembler.py @@ -544,6 +544,11 @@ if logger: log = logger.log_trace(MARK_TRACE_ASM, None, self.mc) log.write(inputargs, operations, ops_offset=ops_offset) + + # legacy + if log.logger_ops: + log.logger_ops.log_loop(inputargs, operations, 0, "rewritten", + name=loopname, ops_offset=ops_offset) self.fixup_target_tokens(rawstart) self.teardown() @@ -613,6 +618,11 @@ log.write(inputargs, operations, ops_offset) # log that the already written bridge is stitched to a descr! logger.log_patch_guard(descr_number, rawstart) + + # legacy + if log.logger_ops: + log.logger_ops.log_bridge(inputargs, operations, "rewritten", + faildescr, ops_offset=ops_offset) self.fixup_target_tokens(rawstart) self.update_frame_depth(frame_depth) self.teardown() diff --git a/rpython/jit/metainterp/compile.py b/rpython/jit/metainterp/compile.py --- a/rpython/jit/metainterp/compile.py +++ b/rpython/jit/metainterp/compile.py @@ -485,6 +485,9 @@ def do_compile_loop(jd_id, unique_id, metainterp_sd, inputargs, operations, looptoken, log=True, name='', memo=None): + # legacy + metainterp_sd.logger_ops.log_loop(inputargs, operations, -2, + 'compiling', None, name, memo) _log = metainterp_sd.jitlog.log_trace(MARK_TRACE_OPT, metainterp_sd, None) _log.write(inputargs, operations) return metainterp_sd.cpu.compile_loop(inputargs, @@ -495,6 +498,9 @@ def do_compile_bridge(metainterp_sd, faildescr, inputargs, operations, original_loop_token, log=True, memo=None): + # legacy + metainterp_sd.logger_ops.log_bridge(inputargs, operations, "compiling", + memo=memo) _log = metainterp_sd.jitlog.log_trace(MARK_TRACE_OPT, metainterp_sd, None) _log.write(inputargs, operations) assert isinstance(faildescr, AbstractFailDescr) diff --git a/rpython/jit/metainterp/pyjitpl.py b/rpython/jit/metainterp/pyjitpl.py --- a/rpython/jit/metainterp/pyjitpl.py +++ b/rpython/jit/metainterp/pyjitpl.py @@ -1761,6 +1761,9 @@ self.jitlog = jl.VMProfJitLogger(self.cpu) self.logger_noopt = Logger(self) self.logger_ops = Logger(self, guard_number=True) + # legacy loggers + self.jitlog.logger_noopt = self.logger_noopt + self.jitlog.logger_ops = self.logger_ops self.profiler = ProfilerClass() self.profiler.cpu = cpu diff --git a/rpython/rlib/jitlog.py b/rpython/rlib/jitlog.py --- a/rpython/rlib/jitlog.py +++ b/rpython/rlib/jitlog.py @@ -240,6 +240,9 @@ self.trace_id = -1 self.metainterp_sd = None self.cintf = _get_vmprof().cintf + # legacy + self.logger_ops = None + self.logger_noopt = None def setup_once(self): if self.cintf.jitlog_enabled(): _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit