pike.git/
src/
interpret_functions.h
Branch:
Tag:
Non-build tags
All tags
No tags
2012-01-07
2012-01-07 02:36:30 by 0
5ca7b541e774d0c5ce2850587b3666017e6fb33d (
6
lines) (+
5
/-
1
)
[
Show
|
Annotate
]
Branch:
7.9
Fix profiling of recursive functions by tracking recursion level. Fixes [bug
5131 (#5131)
].
2499:
new_frame->context = Pike_fp->context; \ \ DO_IF_PROFILING({ \
+
struct identifier *func; \
new_frame->start_time = \ get_cpu_time() - Pike_interpreter.unlocked_time; \ new_frame->ident = Pike_fp->ident; \ new_frame->children_base = Pike_interpreter.accounted_time; \
-
new_frame->context->prog->identifiers
[
new_frame->ident
].
num_calls++; \
+
func =
new_frame->context->prog->identifiers
+
new_frame->ident
; \
+
func->
num_calls++;
\
+
func->recur_depth++; \
DO_IF_PROFILING_DEBUG({ \ fprintf(stderr, "%p{: Push at %" PRINT_CPU_TIME \ " %" PRINT_CPU_TIME "\n", \