Author: Maciej Fijalkowski <[email protected]>
Branch: vmprof
Changeset: r75723:7afaf0219041
Date: 2015-02-05 13:40 +0200
http://bitbucket.org/pypy/pypy/changeset/7afaf0219041/
Log: add a check to the module
diff --git a/pypy/config/pypyoption.py b/pypy/config/pypyoption.py
--- a/pypy/config/pypyoption.py
+++ b/pypy/config/pypyoption.py
@@ -102,6 +102,7 @@
"_hashlib" : ["pypy.module._ssl.interp_ssl"],
"_minimal_curses": ["pypy.module._minimal_curses.fficurses"],
"_continuation": ["rpython.rlib.rstacklet"],
+ "_vmprof" : ["pypy.module._vmprof.interp_vmprof"],
}
def get_module_validator(modname):
diff --git a/pypy/module/_vmprof/interp_vmprof.py
b/pypy/module/_vmprof/interp_vmprof.py
--- a/pypy/module/_vmprof/interp_vmprof.py
+++ b/pypy/module/_vmprof/interp_vmprof.py
@@ -3,7 +3,8 @@
from rpython.translator.tool.cbuild import ExternalCompilationInfo
from rpython.rtyper.annlowlevel import cast_instance_to_gcref,
cast_base_ptr_to_instance
from rpython.rlib.objectmodel import we_are_translated
-from rpython.rlib import jit, rposix, entrypoint, rstruct
+from rpython.rlib import jit, rposix, entrypoint
+from rpython.rtyper.tool import rffi_platform as platform
from rpython.rlib.rstring import StringBuilder
from pypy.interpreter.baseobjspace import W_Root
from pypy.interpreter.error import oefmt, wrap_oserror, OperationError
@@ -48,6 +49,10 @@
eci = ExternalCompilationInfo(**eci_kwds)
+check_eci = eci.merge(ExternalCompilationInfo(separate_module_files=[
+ SRC.join('fake_pypy_api.c')]))
+
+platform.verify_eci(check_eci)
pypy_execute_frame_trampoline = rffi.llexternal(
"pypy_execute_frame_trampoline",
diff --git a/pypy/module/_vmprof/src/fake_pypy_api.c
b/pypy/module/_vmprof/src/fake_pypy_api.c
new file mode 100644
--- /dev/null
+++ b/pypy/module/_vmprof/src/fake_pypy_api.c
@@ -0,0 +1,29 @@
+
+long pypy_jit_start_addr(void)
+{
+ return 3;
+}
+
+long pypy_jit_end_addr(void)
+{
+ return 3;
+}
+
+long pypy_jit_stack_depth_at_loc(long x)
+{
+ return 0;
+}
+
+long pypy_find_codemap_at_addr(long x)
+{
+ return 0;
+}
+
+long pypy_yield_codemap_at_addr(long x, long y, long *a)
+{
+ return 0;
+}
+
+void pypy_pyframe_execute_frame(void)
+{
+}
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit