[pypy-commit] pypy vmprof: have a custom sanity check
fijal
noreply at buildbot.pypy.org
Mon Feb 23 13:09:38 CET 2015
Author: Maciej Fijalkowski <fijall at gmail.com>
Branch: vmprof
Changeset: r76068:2e668504f253
Date: 2015-02-23 14:08 +0200
http://bitbucket.org/pypy/pypy/changeset/2e668504f253/
Log: have a custom sanity check
diff --git a/pypy/module/_vmprof/src/get_custom_offset.c b/pypy/module/_vmprof/src/get_custom_offset.c
--- a/pypy/module/_vmprof/src/get_custom_offset.c
+++ b/pypy/module/_vmprof/src/get_custom_offset.c
@@ -5,10 +5,17 @@
long pypy_find_codemap_at_addr(long);
long pypy_yield_codemap_at_addr(long, long, long*);
+extern volatile int pypy_codemap_currently_invalid;
+
void vmprof_set_tramp_range(void* start, void* end)
{
}
+int custom_sanity_check()
+{
+ return !pypy_codemap_currently_invalid;
+}
+
static ptrdiff_t vmprof_unw_get_custom_offset(void* ip, unw_cursor_t *cp) {
intptr_t ip_l = (intptr_t)ip;
diff --git a/pypy/module/_vmprof/src/vmprof.c b/pypy/module/_vmprof/src/vmprof.c
--- a/pypy/module/_vmprof/src/vmprof.c
+++ b/pypy/module/_vmprof/src/vmprof.c
@@ -141,6 +141,9 @@
if (recursive) {
return 0;
}
+ if (!custom_sanity_check()) {
+ return 0;
+ }
++recursive;
int ret = unw_init_local(&cursor, &uc);
More information about the pypy-commit
mailing list