[pypy-commit] pypy vmprof-newstack: missing fixes for pypy
fijal
pypy.commits at gmail.com
Mon Jan 11 04:13:30 EST 2016
Author: fijal
Branch: vmprof-newstack
Changeset: r81663:6d7759d0694a
Date: 2016-01-11 11:12 +0200
http://bitbucket.org/pypy/pypy/changeset/6d7759d0694a/
Log: missing fixes for pypy
diff --git a/rpython/rlib/rvmprof/src/vmprof_get_custom_offset.h b/rpython/rlib/rvmprof/src/vmprof_get_custom_offset.h
--- a/rpython/rlib/rvmprof/src/vmprof_get_custom_offset.h
+++ b/rpython/rlib/rvmprof/src/vmprof_get_custom_offset.h
@@ -24,9 +24,8 @@
// modify the last entry to point to start address and not the random one
// in the middle
- result[n] = VMPROF_ASSEMBLER_TAG;
- result[n + 1] = start_addr;
- n += 2;
+ result[n++] = VMPROF_ASSEMBLER_TAG;
+ result[n++] = start_addr;
start = n;
while (n < max_depth) {
id = pypy_yield_codemap_at_addr(codemap, addr, ¤t_pos);
diff --git a/rpython/rlib/rvmprof/src/vmprof_main.h b/rpython/rlib/rvmprof/src/vmprof_main.h
--- a/rpython/rlib/rvmprof/src/vmprof_main.h
+++ b/rpython/rlib/rvmprof/src/vmprof_main.h
@@ -151,10 +151,19 @@
}
#endif
while (n < max_depth - 1 && stack) {
- result[n] = stack->kind;
- result[n + 1] = stack->value;
- stack = stack->next;
- n += 2;
+ if (stack->kind == VMPROF_CODE_TAG) {
+ result[n] = stack->kind;
+ result[n + 1] = stack->value;
+ stack = stack->next;
+ n += 2;
+ }
+#ifdef PYPY_JIT_CODEMAP
+ if (stack->kind == VMPROF_JITTED_TAG) {
+ pc = stack->value;
+ n = vmprof_write_header_for_jit_addr(result, n, pc, max_depth);
+ stack = stack->next;
+ }
+#endif
}
return n;
}
More information about the pypy-commit
mailing list