[pypy-commit] pypy vmprof-native: exchange header, add paramter to _write_python_stack_entry
plan_rich
pypy.commits at gmail.com
Thu Feb 9 10:03:05 EST 2017
Author: Richard Plangger <planrichi at gmail.com>
Branch: vmprof-native
Changeset: r90027:66868b7d5e79
Date: 2017-02-09 15:56 +0100
http://bitbucket.org/pypy/pypy/changeset/66868b7d5e79/
Log: exchange header, add paramter to _write_python_stack_entry
diff --git a/rpython/rlib/rvmprof/src/rvmprof.c b/rpython/rlib/rvmprof/src/rvmprof.c
--- a/rpython/rlib/rvmprof/src/rvmprof.c
+++ b/rpython/rlib/rvmprof/src/rvmprof.c
@@ -19,7 +19,7 @@
#ifdef RPYTHON_LL2CTYPES
-#define IS_VMPROF_EVAL(ptr) 0
+int IS_VMPROF_EVAL(void * ptr) { return 0; }
#else
extern void * __vmprof_eval_vmprof;
int IS_VMPROF_EVAL(void * ptr)
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
@@ -54,7 +54,7 @@
return _vmp_profiles_lines;
}
-static PY_STACK_FRAME_T * _write_python_stack_entry(PY_STACK_FRAME_T * frame, void ** result, int * depth)
+static PY_STACK_FRAME_T * _write_python_stack_entry(PY_STACK_FRAME_T * frame, void ** result, int * depth, int max_depth)
{
int len;
int addr;
@@ -122,7 +122,7 @@
int max_depth, int depth, intptr_t pc)
{
while (depth < max_depth && frame) {
- frame = _write_python_stack_entry(frame, result, &depth);
+ frame = _write_python_stack_entry(frame, result, &depth, max_depth);
}
return depth;
}
@@ -218,7 +218,7 @@
{
#endif
if (top_most_frame != NULL) {
- top_most_frame = _write_python_stack_entry(top_most_frame, result, &depth);
+ top_most_frame = _write_python_stack_entry(top_most_frame, result, &depth, max_depth);
} else {
// Signals can occur at the two places (1) and (2), that will
// have added a stack entry, but the function __vmprof_eval_vmprof
diff --git a/rpython/rlib/rvmprof/src/shared/vmprof_get_custom_offset.h b/rpython/rlib/rvmprof/src/shared/vmprof_get_custom_offset.h
--- a/rpython/rlib/rvmprof/src/shared/vmprof_get_custom_offset.h
+++ b/rpython/rlib/rvmprof/src/shared/vmprof_get_custom_offset.h
@@ -1,6 +1,6 @@
#pragma once
-#include "vmprof.h"
+#include <stdint.h>
void *pypy_find_codemap_at_addr(long addr, long *start_addr);
long pypy_yield_codemap_at_addr(void *codemap_raw, long addr,
More information about the pypy-commit
mailing list