[pypy-commit] pypy vmprof: an attempt to build the secondary entry points from the JIT in a more official manner
fijal
noreply at buildbot.pypy.org
Fri Jan 16 14:32:44 CET 2015
Author: Maciej Fijalkowski <fijall at gmail.com>
Branch: vmprof
Changeset: r75385:7b8f2499dabe
Date: 2015-01-16 15:32 +0200
http://bitbucket.org/pypy/pypy/changeset/7b8f2499dabe/
Log: an attempt to build the secondary entry points from the JIT in a
more official manner
diff --git a/rpython/jit/metainterp/warmspot.py b/rpython/jit/metainterp/warmspot.py
--- a/rpython/jit/metainterp/warmspot.py
+++ b/rpython/jit/metainterp/warmspot.py
@@ -25,7 +25,8 @@
from rpython.jit.codewriter.policy import JitPolicy
from rpython.jit.codewriter.effectinfo import EffectInfo
from rpython.jit.metainterp.optimizeopt import ALL_OPTS_NAMES
-from rpython.rlib.entrypoint import all_jit_entrypoints
+from rpython.rlib.entrypoint import all_jit_entrypoints,\
+ annotated_jit_entrypoints
# ____________________________________________________________
@@ -681,6 +682,7 @@
def create_jit_entry_points(self):
for func, args, result in all_jit_entrypoints:
self.helper_func(lltype.Ptr(lltype.FuncType(args, result)), func)
+ annotated_jit_entrypoints.append((func, None))
def rewrite_access_helper(self, op):
# make sure we make a copy of function so it no longer belongs
diff --git a/rpython/rlib/entrypoint.py b/rpython/rlib/entrypoint.py
--- a/rpython/rlib/entrypoint.py
+++ b/rpython/rlib/entrypoint.py
@@ -5,6 +5,7 @@
from rpython.rtyper.lltypesystem.lloperation import llop
from rpython.rlib.objectmodel import we_are_translated
+annotated_jit_entrypoints = []
def export_symbol(func):
func.exported_symbol = True
diff --git a/rpython/translator/driver.py b/rpython/translator/driver.py
--- a/rpython/translator/driver.py
+++ b/rpython/translator/driver.py
@@ -10,7 +10,8 @@
from rpython.annotator import policy as annpolicy
from rpython.tool.udir import udir
from rpython.rlib.debug import debug_start, debug_print, debug_stop
-from rpython.rlib.entrypoint import secondary_entrypoints
+from rpython.rlib.entrypoint import secondary_entrypoints,\
+ annotated_jit_entrypoints
import py
from rpython.tool.ansi_print import ansi_log
@@ -416,10 +417,11 @@
from rpython.translator.c.genc import CStandaloneBuilder
cbuilder = CStandaloneBuilder(self.translator, self.entry_point,
config=self.config,
- secondary_entrypoints=self.secondary_entrypoints)
+ secondary_entrypoints=
+ self.secondary_entrypoints + annotated_jit_entrypoints)
else:
from rpython.translator.c.dlltool import CLibraryBuilder
- functions = [(self.entry_point, None)] + self.secondary_entrypoints
+ functions = [(self.entry_point, None)] + self.secondary_entrypoints + annotated_jit_entrypoints
cbuilder = CLibraryBuilder(self.translator, self.entry_point,
functions=functions,
name='libtesting',
More information about the pypy-commit
mailing list