[pypy-commit] pypy default: encode the jitdrivers name in start_trace, jitlog version bump

plan_rich pypy.commits at gmail.com
Tue Aug 16 06:56:35 EDT 2016


Author: Richard Plangger <planrichi at gmail.com>
Branch: 
Changeset: r86219:5847abf293f8
Date: 2016-08-04 16:32 +0200
http://bitbucket.org/pypy/pypy/changeset/5847abf293f8/

Log:	encode the jitdrivers name in start_trace, jitlog version bump

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
@@ -1051,8 +1051,9 @@
     metainterp_sd = metainterp.staticdata
     jitdriver_sd = metainterp.jitdriver_sd
     #
+    jd_name = jitdriver_sd.jitdriver.name
     metainterp_sd.jitlog.start_new_trace(metainterp_sd,
-            faildescr=resumekey, entry_bridge=False)
+            faildescr=resumekey, entry_bridge=False, jd_name=jd_name)
     #
     if isinstance(resumekey, ResumeAtPositionDescr):
         inline_short_preamble = False
diff --git a/rpython/rlib/rjitlog/rjitlog.py b/rpython/rlib/rjitlog/rjitlog.py
--- a/rpython/rlib/rjitlog/rjitlog.py
+++ b/rpython/rlib/rjitlog/rjitlog.py
@@ -212,7 +212,7 @@
         return method
     return decor
 
-JITLOG_VERSION = 1
+JITLOG_VERSION = 2
 JITLOG_VERSION_16BIT_LE = struct.pack("<H", JITLOG_VERSION)
 
 marks = [
@@ -331,7 +331,7 @@
     def finish(self):
         jitlog_teardown()
 
-    def start_new_trace(self, metainterp_sd, faildescr=None, entry_bridge=False):
+    def start_new_trace(self, metainterp_sd, faildescr=None, entry_bridge=False, jd_name=""):
         # even if the logger is not enabled, increment the trace id
         self.trace_id += 1
         if not jitlog_enabled():
@@ -345,6 +345,7 @@
         else:
             content.append(encode_str('loop'))
             content.append(encode_le_addr(int(entry_bridge)))
+        content.append(encode_str(jd_name))
         self._write_marked(MARK_START_TRACE, ''.join(content))
 
     def trace_aborted(self):


More information about the pypy-commit mailing list