[pypy-commit] pypy vmprof-native: rename callsite method name, handle stack walking for jit frames
plan_rich
pypy.commits at gmail.com
Sat Feb 11 11:37:50 EST 2017
Author: Richard Plangger <planrichi at gmail.com>
Branch: vmprof-native
Changeset: r90051:ba06665d9168
Date: 2017-02-11 17:37 +0100
http://bitbucket.org/pypy/pypy/changeset/ba06665d9168/
Log: rename callsite method name, handle stack walking for jit frames
diff --git a/rpython/jit/metainterp/memmgr.py b/rpython/jit/metainterp/memmgr.py
--- a/rpython/jit/metainterp/memmgr.py
+++ b/rpython/jit/metainterp/memmgr.py
@@ -71,7 +71,7 @@
for looptoken in self.alive_loops.keys():
if (0 <= looptoken.generation < max_generation or
looptoken.invalidated):
- rvmprof.vmp_dyn_cancel(looptoken)
+ rvmprof.dyn_cancel(looptoken)
del self.alive_loops[looptoken]
newtotal = len(self.alive_loops)
debug_print("Loop tokens freed: ", oldtotal - newtotal)
diff --git a/rpython/rlib/rvmprof/src/shared/vmp_stack.c b/rpython/rlib/rvmprof/src/shared/vmp_stack.c
--- a/rpython/rlib/rvmprof/src/shared/vmp_stack.c
+++ b/rpython/rlib/rvmprof/src/shared/vmp_stack.c
@@ -241,10 +241,15 @@
// this is possible because compiler align to 8 bytes.
//
#ifdef PYPY_JIT_CODEMAP
- if (top_most_frame->kind == VMPROF_JITTED_TAG) {
+ if (pip.format == UNW_INFO_FORMAT_DYNAMIC) {
+ if (top_most_frame->kind != VMPROF_JITTED_TAG) {
+ // if this is encountered frequently something is wrong with
+ // the stack building
+ return 0;
+ }
intptr_t pc = ((intptr_t*)(top_most_frame->value - sizeof(intptr_t)))[0];
depth = vmprof_write_header_for_jit_addr(result, depth, pc, max_depth);
- frame = FRAME_STEP(frame);
+ top_most_frame = FRAME_STEP(top_most_frame);
} else if (func_addr != 0x0) {
depth = _write_native_stack((void*)(func_addr | 0x1), result, depth);
}
More information about the pypy-commit
mailing list