mirror of
https://github.com/neovim/neovim.git
synced 2025-09-29 06:28:35 +00:00
Add ":profile dump"
Currently the logfile (":profile start {logfile}") only gets written when Vim exits. This new command allows to dump the log immediately without exiting.
This commit is contained in:
@@ -609,6 +609,9 @@ For example, to profile the one_script.vim script file: >
|
|||||||
after this command. A :profile command in the script itself
|
after this command. A :profile command in the script itself
|
||||||
won't work.
|
won't work.
|
||||||
|
|
||||||
|
:prof[ile] dump
|
||||||
|
Don't wait until exiting Vim and write the current state of
|
||||||
|
profiling to the log immediately.
|
||||||
|
|
||||||
:profd[el] ... *:profd* *:profdel*
|
:profd[el] ... *:profd* *:profdel*
|
||||||
Stop profiling for the arguments specified. See |:breakdel|
|
Stop profiling for the arguments specified. See |:breakdel|
|
||||||
|
@@ -773,6 +773,8 @@ void ex_profile(exarg_T *eap)
|
|||||||
profile_set_wait(profile_add(profile_get_wait(), pause_time));
|
profile_set_wait(profile_add(profile_get_wait(), pause_time));
|
||||||
}
|
}
|
||||||
do_profiling = PROF_YES;
|
do_profiling = PROF_YES;
|
||||||
|
} else if (STRCMP(eap->arg, "dump") == 0) {
|
||||||
|
profile_dump();
|
||||||
} else {
|
} else {
|
||||||
/* The rest is similar to ":breakadd". */
|
/* The rest is similar to ":breakadd". */
|
||||||
ex_breakadd(eap);
|
ex_breakadd(eap);
|
||||||
@@ -821,6 +823,7 @@ static char *pexpand_cmds[] = {
|
|||||||
"continue",
|
"continue",
|
||||||
"func",
|
"func",
|
||||||
"file",
|
"file",
|
||||||
|
"dump",
|
||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user