summaryrefslogtreecommitdiff
path: root/src/profiler.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/profiler.c')
-rw-r--r--src/profiler.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/src/profiler.c b/src/profiler.c
index 6f2f2d0a8..3638a0b5c 100644
--- a/src/profiler.c
+++ b/src/profiler.c
@@ -555,6 +555,24 @@ func_do_profile(ufunc_T *fp)
}
/*
+ * Save time when starting to invoke another script or function.
+ */
+ static void
+script_prof_save(
+ proftime_T *tm) // place to store wait time
+{
+ scriptitem_T *si;
+
+ if (SCRIPT_ID_VALID(current_sctx.sc_sid))
+ {
+ si = SCRIPT_ITEM(current_sctx.sc_sid);
+ if (si->sn_prof_on && si->sn_pr_nest++ == 0)
+ profile_start(&si->sn_pr_child);
+ }
+ profile_get_wait(tm);
+}
+
+/*
* When calling a function: may initialize for profiling.
*/
void
@@ -793,24 +811,6 @@ script_do_profile(scriptitem_T *si)
}
/*
- * Save time when starting to invoke another script or function.
- */
- void
-script_prof_save(
- proftime_T *tm) // place to store wait time
-{
- scriptitem_T *si;
-
- if (SCRIPT_ID_VALID(current_sctx.sc_sid))
- {
- si = SCRIPT_ITEM(current_sctx.sc_sid);
- if (si->sn_prof_on && si->sn_pr_nest++ == 0)
- profile_start(&si->sn_pr_child);
- }
- profile_get_wait(tm);
-}
-
-/*
* Count time spent in children after invoking another script or function.
*/
void