mirror of
https://github.com/neovim/neovim.git
synced 2025-12-11 17:12:40 +00:00
fix: prof functions
This commit is contained in:
@@ -1131,7 +1131,7 @@ void *call_func_retlist(const char_u *func, int argc, typval_T *argv)
|
|||||||
void prof_child_enter(proftime_T *tm /* place to store waittime */
|
void prof_child_enter(proftime_T *tm /* place to store waittime */
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
funccall_T *fc = current_funccal;
|
funccall_T *fc = get_current_funccal();
|
||||||
|
|
||||||
if (fc != NULL && fc->func->uf_profiling) {
|
if (fc != NULL && fc->func->uf_profiling) {
|
||||||
fc->prof_child = profile_start();
|
fc->prof_child = profile_start();
|
||||||
@@ -1147,7 +1147,7 @@ void prof_child_enter(proftime_T *tm /* place to store waittime */
|
|||||||
void prof_child_exit(proftime_T *tm /* where waittime was stored */
|
void prof_child_exit(proftime_T *tm /* where waittime was stored */
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
funccall_T *fc = current_funccal;
|
funccall_T *fc = get_current_funccal();
|
||||||
|
|
||||||
if (fc != NULL && fc->func->uf_profiling) {
|
if (fc != NULL && fc->func->uf_profiling) {
|
||||||
fc->prof_child = profile_end(fc->prof_child);
|
fc->prof_child = profile_end(fc->prof_child);
|
||||||
|
|||||||
@@ -1120,6 +1120,11 @@ void restore_funccal(void *vfc)
|
|||||||
current_funccal = (funccall_T *)vfc;
|
current_funccal = (funccall_T *)vfc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
funccall_T *get_current_funccal(void)
|
||||||
|
{
|
||||||
|
return current_funccal;
|
||||||
|
}
|
||||||
|
|
||||||
#if defined(EXITFREE)
|
#if defined(EXITFREE)
|
||||||
void free_all_functions(void)
|
void free_all_functions(void)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user