Stefan Hajnoczi 0f08586c71 util/async: add a human-readable name to BHs for debugging
It can be difficult to debug issues with BHs in production environments.
Although BHs can usually be identified by looking up their ->cb()
function pointer, this requires debug information for the program. It is
also not possible to print human-readable diagnostics about BHs because
they have no identifier.

This patch adds a name to each BH. The name is not unique per instance
but differentiates between cb() functions, which is usually enough. It's
done by changing aio_bh_new() and friends to macros that stringify cb.

The next patch will use the name field when reporting leaked BHs.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20210414200247.917496-2-stefanha@redhat.com>
2021-07-05 11:40:32 +01:00
..
2020-01-06 18:41:32 +04:00
2019-09-11 08:46:17 +02:00
2021-04-30 12:27:47 +02:00
2021-05-10 13:55:28 +02:00
2020-12-10 17:16:44 +01:00
2021-06-13 17:42:40 -07:00
2018-12-20 10:29:08 +01:00
2021-04-30 12:27:47 +02:00
2018-08-24 20:26:37 +02:00
2018-06-29 12:32:10 +02:00
2021-04-01 15:27:44 +04:00