Author: Richard Plangger <planri...@gmail.com> Branch: new-jit-log Changeset: r83765:983043f03fcd Date: 2016-04-19 12:09 +0200 http://bitbucket.org/pypy/pypy/changeset/983043f03fcd/
Log: modified ztranslation test to check the get_location and ensure it can be translated diff --git a/rpython/jit/backend/llsupport/test/ztranslation_test.py b/rpython/jit/backend/llsupport/test/ztranslation_test.py --- a/rpython/jit/backend/llsupport/test/ztranslation_test.py +++ b/rpython/jit/backend/llsupport/test/ztranslation_test.py @@ -48,9 +48,13 @@ lltype.Float, macro=True, releasegil=True, compilation_info=eci) + def get_location(): + return "file", 0, "func", 0, "opcode" + jitdriver = JitDriver(greens = [], reds = ['total', 'frame', 'j'], - virtualizables = ['frame']) + virtualizables = ['frame'], + get_location = get_location) def f(i, j): for param, _ in unroll_parameters: defl = PARAMETERS[param] diff --git a/rpython/jit/metainterp/warmstate.py b/rpython/jit/metainterp/warmstate.py --- a/rpython/jit/metainterp/warmstate.py +++ b/rpython/jit/metainterp/warmstate.py @@ -689,8 +689,14 @@ def get_location(greenkey): greenargs = unwrap_greenkey(greenkey) fn = support.maybe_on_top_of_llinterp(rtyper, get_location_ptr) - llres = fn(*greenargs) - return llres + tuple_ptr = fn(*greenargs) + # it seems there is no "hltuple" function + return (hlstr(tuple_ptr.item0), + intmask(tuple_ptr.item1), + hlstr(tuple_ptr.item2), + intmask(tuple_ptr.item3), + hlstr(tuple_ptr.item4) + ) self.get_location = get_location # printable_loc_ptr = self.jitdriver_sd._printable_loc_ptr diff --git a/rpython/rlib/rvmprof/rvmprof.py b/rpython/rlib/rvmprof/rvmprof.py --- a/rpython/rlib/rvmprof/rvmprof.py +++ b/rpython/rlib/rvmprof/rvmprof.py @@ -7,7 +7,6 @@ from rpython.rtyper.lltypesystem import rffi, llmemory from rpython.rtyper.lltypesystem.lloperation import llop from rpython.rlib.rweaklist import RWeakListMixin -from rpython.jit.metainterp import jitlog MAX_FUNC_NAME = 1023 @@ -125,6 +124,7 @@ def enable_jitlog(self, fileno): # initialize the jit log + from rpython.jit.metainterp import jitlog p_error = self.cintf.jitlog_init(fileno) if p_error: raise VMProfError(rffi.charp2str(p_error)) _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit