#
1b01b786 |
| 24-May-2023 |
Ben Noordhuis |
unix,win: replace QUEUE with struct uv__queue (#4022) Recent versions of gcc have started emitting warnings about the liberal type casting inside the QUEUE macros. Although the warnings
unix,win: replace QUEUE with struct uv__queue (#4022) Recent versions of gcc have started emitting warnings about the liberal type casting inside the QUEUE macros. Although the warnings are false positives, let's use them as the impetus to switch to a type-safer and arguably cleaner approach. Fixes: https://github.com/libuv/libuv/issues/4019
show more ...
|
#
e02642cf |
| 17-Apr-2023 |
Trevor Norris |
src: fix events/events_waiting metrics counter (#3957) The worker pool calls all callbacks locally within the queue. So the value of nevents doesn't properly reflect that case. Increase
src: fix events/events_waiting metrics counter (#3957) The worker pool calls all callbacks locally within the queue. So the value of nevents doesn't properly reflect that case. Increase the number of events directly from the worker pool's callback to correct this. In order to properly determine if the events_waiting counter needs to be incremented, store the timeout value at the time the event provider was called.
show more ...
|
#
e1415860 |
| 11-Nov-2022 |
Trevor Norris |
src: add new metrics APIs (#3749) The following metrics are now always recorded and available via the new uv_metrics_info() API. * loop_count: Number of event loop iterations.
src: add new metrics APIs (#3749) The following metrics are now always recorded and available via the new uv_metrics_info() API. * loop_count: Number of event loop iterations. * events: Total number of events processed by the event handler. * events_waiting: Total number of events waiting in the event queue when the event provider request was made. Benchmarking has shown no noticeable impact recording these metrics. PR-URL: https://github.com/libuv/libuv/pull/3749
show more ...
|
Revision tags: v1.41.0, v1.40.0, v1.39.0, v1.38.1, v1.38.0, v1.37.0, v1.36.0 |
|
#
e8effd45 |
| 26-Mar-2020 |
Trevor Norris |
core: add API to measure event loop idle time The API addition `uv_metrics_idle_time()` is a thread safe call that allows the user to retrieve the amount of time the event loop has spent
core: add API to measure event loop idle time The API addition `uv_metrics_idle_time()` is a thread safe call that allows the user to retrieve the amount of time the event loop has spent in the kernel's event provider (i.e. poll). It was done this way to allow retrieving this value without needing to interrupt the execution of the event loop. This option can be enabled by passing `UV_METRICS_IDLE_TIME` to `uv_loop_configure()`. One important aspect of this change is, when enabled, to always first call the event provider with a `timeout == 0`. This allows libuv to know whether any events were waiting in the event queue when the event provider was called. The importance of this is because libuv is tracking the amount of "idle time", not "poll time". Thus the provider entry time is not recorded when `timeout == 0` (the event provider never idles in this case). While this does add a small amount of overhead, when enabled, but the overhead decreases when the event loop has a heavier load. This is because poll events will be waiting when the event provider is called. Thus never actually recording the provider entry time. Checking if `uv_loop_t` is configured with `UV_METRICS_IDLE_TIME` always happens in `uv__metrics_set_provider_entry_time()` and `uv__metrics_update_idle_time()`. Making the conditional logic wrapping each call simpler and allows for instrumentation to always hook into those two function calls. Rather than placing the fields directly on `uv__loop_internal_fields_t` add the struct `uv__loop_metrics_t` as a location for future metrics API additions. Tests and additional documentation has been included. PR-URL: https://github.com/libuv/libuv/pull/2725 Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com> Reviewed-By: Jameson Nash <vtjnash@gmail.com>
show more ...
|
Revision tags: v1.35.0 |
|
#
1bcfbfd0 |
| 10-Mar-2020 |
Ben Noordhuis |
src: add uv__reallocf() Modeled after FreeBSD's `reallocf(3)`: a version of `realloc(3)` that frees the memory when reallocation fails, simplifying error handling in many cases.
src: add uv__reallocf() Modeled after FreeBSD's `reallocf(3)`: a version of `realloc(3)` that frees the memory when reallocation fails, simplifying error handling in many cases. PR-URL: https://github.com/libuv/libuv/pull/2735 Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
show more ...
|
Revision tags: v1.34.2, v1.34.1, v1.34.0, v1.33.1, v1.33.0, v1.32.0, v1.31.0, v1.30.1, v1.30.0, v1.29.1, v1.29.0, v1.28.0, v1.27.0, v1.26.0 |
|
#
1ce6393a |
| 10-Feb-2019 |
Ben Noordhuis |
unix: don't attempt to invalidate invalid fd Add a missing check in uv__io_close() where it called uv__platform_invalidate_fd() without checking that the watcher actually has a valid
unix: don't attempt to invalidate invalid fd Add a missing check in uv__io_close() where it called uv__platform_invalidate_fd() without checking that the watcher actually has a valid file descriptor assigned. Fixes: https://github.com/libuv/libuv/issues/2181 PR-URL: https://github.com/libuv/libuv/pull/2182 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
show more ...
|
Revision tags: v1.25.0, v1.24.1, v1.24.0, v1.23.2, v1.23.1, v1.23.0, v1.22.0, v1.21.0, v1.20.3, v1.20.2, v1.20.1, v1.20.0, v1.19.2 |
|
#
875ce430 |
| 13-Feb-2018 |
ThePrez |
posix: fix uv__pollfds_del() for invalidated fd's Fix bug in `uv__pollfds_del()` where only one invalidated fd is purged. Calls to `uv__platform_invalidate_fd()` will invalidate descript
posix: fix uv__pollfds_del() for invalidated fd's Fix bug in `uv__pollfds_del()` where only one invalidated fd is purged. Calls to `uv__platform_invalidate_fd()` will invalidate descriptors (rather than removing them) when `poll()` is iterating. Under stressful conditions, this may happen more frequently than `uv__pollfds_del()` is called. So, when uv__pollfds_del() is called with a value of -1, it should iterate the entire array to remove all invalidated descriptors. PR-URL: https://github.com/libuv/libuv/pull/1738 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
show more ...
|
Revision tags: v1.19.1 |
|
#
89cbbc89 |
| 19-Jan-2018 |
Mason X |
include,src: introduce UV__ERR() macro Using -errno, -E**, and -pthread_function() can be error prone, and breaks compatibility with some operating systems that already negate errno'
include,src: introduce UV__ERR() macro Using -errno, -E**, and -pthread_function() can be error prone, and breaks compatibility with some operating systems that already negate errno's (e.g. Haiku). This commit adds a UV__ERR() macro that ensures libuv errors are negative. Fixes: https://github.com/libuv/help/issues/39 PR-URL: https://github.com/libuv/libuv/pull/1687 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com> Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
show more ...
|
Revision tags: v1.19.0, v1.18.0, v1.17.0, v1.16.1, v1.16.0, v1.15.0, v1.14.1, v1.14.0, v1.13.1, v1.13.0, v1.12.0 |
|
#
c108137d |
| 16-Feb-2017 |
Brad King |
unix: add a uv__io_poll impl using POSIX poll(2) POSIX defines `poll()` as a portable way to wait on file descriptors. Use it to provide an implementation of our poll abstraction for use
unix: add a uv__io_poll impl using POSIX poll(2) POSIX defines `poll()` as a portable way to wait on file descriptors. Use it to provide an implementation of our poll abstraction for use on platforms that do not provide a more specialized polling method. PR-URL: https://github.com/libuv/libuv/pull/1312 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
show more ...
|