diff options
author | Bram Moolenaar <Bram@vim.org> | 2019-07-14 15:48:38 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2019-07-14 15:48:38 +0200 |
commit | 660a10ad41c14363326f83451c3c425201923119 (patch) | |
tree | 98da3e8bf0b6653517fe6142ba9159109aa3d75f /src/proto | |
parent | 1850b14c0d338eb27fb32d0d6e0bfb6944c75c5a (diff) | |
download | vim-git-660a10ad41c14363326f83451c3c425201923119.tar.gz |
patch 8.1.1689: profiling code is spread outv8.1.1689
Problem: Profiling code is spread out.
Solution: Move more profiling code to profiler.c. (Yegappan Lakshmanan,
closes #4668)
Diffstat (limited to 'src/proto')
-rw-r--r-- | src/proto/ex_cmds2.pro | 7 | ||||
-rw-r--r-- | src/proto/profiler.pro | 12 | ||||
-rw-r--r-- | src/proto/userfunc.pro | 7 |
3 files changed, 9 insertions, 17 deletions
diff --git a/src/proto/ex_cmds2.pro b/src/proto/ex_cmds2.pro index ee74b0b49..b66be2f69 100644 --- a/src/proto/ex_cmds2.pro +++ b/src/proto/ex_cmds2.pro @@ -9,10 +9,6 @@ void add_timer_info(typval_T *rettv, timer_T *timer); void add_timer_info_all(typval_T *rettv); int set_ref_in_timer(int copyID); void timer_free_all(void); -void script_do_profile(scriptitem_T *si); -void script_prof_save(proftime_T *tm); -void script_prof_restore(proftime_T *tm); -void script_dump_profile(FILE *fd); int autowrite(buf_T *buf, int forceit); void autowrite_all(void); int check_changed(buf_T *buf, int flags); @@ -63,9 +59,6 @@ char_u *get_scriptname(scid_T id); void free_scriptnames(void); linenr_T get_sourced_lnum(char_u *(*fgetline)(int, void *, int, int), void *cookie); char_u *getsourceline(int c, void *cookie, int indent, int do_concat); -void script_line_start(void); -void script_line_exec(void); -void script_line_end(void); void ex_scriptencoding(exarg_T *eap); void ex_scriptversion(exarg_T *eap); void ex_finish(exarg_T *eap); diff --git a/src/proto/profiler.pro b/src/proto/profiler.pro index e7bcb479a..64398f52c 100644 --- a/src/proto/profiler.pro +++ b/src/proto/profiler.pro @@ -17,18 +17,20 @@ int profile_cmp(const proftime_T *tm1, const proftime_T *tm2); void ex_profile(exarg_T *eap); char_u *get_profile_name(expand_T *xp, int idx); void set_context_in_profile_cmd(expand_T *xp, char_u *arg); -void profile_dump(void); void prof_inchar_enter(void); void prof_inchar_exit(void); int prof_def_func(void); -void prof_sort_list(FILE *fd, ufunc_T **sorttab, int st_len, char *title, int prefer_self); -void prof_func_line(FILE *fd, int count, proftime_T *total, proftime_T *self, int prefer_self); -int prof_total_cmp(const void *s1, const void *s2); -int prof_self_cmp(const void *s1, const void *s2); void func_do_profile(ufunc_T *fp); void prof_child_enter(proftime_T *tm); void prof_child_exit(proftime_T *tm); void func_line_start(void *cookie); void func_line_exec(void *cookie); void func_line_end(void *cookie); +void script_do_profile(scriptitem_T *si); +void script_prof_save(proftime_T *tm); +void script_prof_restore(proftime_T *tm); +void profile_dump(void); +void script_line_start(void); +void script_line_exec(void); +void script_line_end(void); /* vim: set ft=c : */ diff --git a/src/proto/userfunc.pro b/src/proto/userfunc.pro index 8395e01b9..2b59473ea 100644 --- a/src/proto/userfunc.pro +++ b/src/proto/userfunc.pro @@ -1,12 +1,13 @@ /* userfunc.c */ void func_init(void); +hashtab_T *func_tbl_get(void); int get_lambda_tv(char_u **arg, typval_T *rettv, int evaluate); char_u *deref_func_name(char_u *name, int *lenp, partial_T **partialp, int no_autoload); int get_func_tv(char_u *name, int len, typval_T *rettv, char_u **arg, linenr_T firstline, linenr_T lastline, int *doesrange, int evaluate, partial_T *partial, dict_T *selfdict); ufunc_T *find_func(char_u *name); void save_funccal(funccal_entry_T *entry); void restore_funccal(void); -funccall_T * get_current_funccal(void); +funccall_T *get_current_funccal(void); void free_all_functions(void); int func_call(char_u *name, typval_T *args, partial_T *partial, dict_T *selfdict, typval_T *rettv); int call_callback(callback_T *callback, int len, typval_T *rettv, int argcount, typval_T *argvars, int (*argv_func)(int, typval_T *, int), linenr_T firstline, linenr_T lastline, int *doesrange, int evaluate, dict_T *selfdict); @@ -17,7 +18,6 @@ int eval_fname_script(char_u *p); int translated_function_exists(char_u *name); int function_exists(char_u *name, int no_deref); char_u *get_expanded_name(char_u *name, int check); -void func_dump_profile(FILE *fd); char_u *get_user_func_name(expand_T *xp, int idx); void ex_delfunction(exarg_T *eap); void func_unref(char_u *name); @@ -30,9 +30,6 @@ int do_return(exarg_T *eap, int reanimate, int is_cmd, void *rettv); void discard_pending_return(void *rettv); char_u *get_return_cmd(void *rettv); char_u *get_func_line(int c, void *cookie, int indent, int do_concat); -void func_line_start(void *cookie); -void func_line_exec(void *cookie); -void func_line_end(void *cookie); int func_has_ended(void *cookie); int func_has_abort(void *cookie); dict_T *make_partial(dict_T *selfdict_in, typval_T *rettv); |