aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/profile.c
Commit message (Collapse)AuthorAge
* MSVC: include os/os_defs.h for `inline`. #3239Rui Abreu Ferreira2015-08-25
|
* startuptime: always enable startuptimeNicolas Hillegeer2014-07-20
| | | | Removes the STARTUPTIME define.
* startuptime: implement on top of profiling fnsNicolas Hillegeer2014-07-20
| | | | | | Reuse the profiling functions to implement the startuptime functions. Decreases our dependency on `gettimeofday()` and thus gets us a little bit closer to a clean port to Windows.
* startuptime: move code to profile.{c,h} + docNicolas Hillegeer2014-07-20
| | | | | It's a better place to put it. Also slightly documented and reformatted, but not changed.
* profiling: implement on top of os_hrtime()Nicolas Hillegeer2014-07-16
Should be better than gettimeofday() since libuv uses higher resolution clocks on most UNIX platforms. Libuv also tries to use monotonic clocks, kernel bugs notwithstanding, which is another win over gettimeofday(). Necessary for Windows, which doesn't have gettimeofday(). In vanilla vim, Windows uses QueryPerformanceCounter, which is the correct primitive for this sort of things, but that was removed when slimming up the codebase. Libuv uses QueryPerformanceCounter to implement uv_hrtime() on Windows so the behaviour of vim profiling on Windows should now be the same. The behaviour on Linux should be different (better) though, libuv uses more accurate primitives than gettimeofday(). Other misc. changes: - Added function attributes where relevant (const, pure, ...) - Convert functions to receive scalars: Now that proftime_T is always a (uint64_t) scalar (and not a struct), it's clearer to convert the functions to receive it as such instead of a pointer to a scalar. - Extract profiling funcs to profile.c: make everything clearer and reduces the size of the "catch-all" ex_cmds2.c - Add profile.{c,h} to clint and -Wconv: - Don't use sprintf, use snprintf - Don't use long, use int16_t/int32_t/...