mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-01 23:03:54 -06:00
io: add ability to set a name for IO channels
The GSource object has ability to have a name, which is useful when debugging performance problems with the mainloop event callbacks that take too long. By associating a name with a QIOChannel object, we can then set the name on any GSource associated with the channel. Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
This commit is contained in:
parent
af8096b2c3
commit
20f4aa265e
3 changed files with 39 additions and 5 deletions
|
@ -304,4 +304,11 @@ static inline void g_slist_free_full(GSList *list, GDestroyNotify free_func)
|
|||
}
|
||||
#endif
|
||||
|
||||
#if !GLIB_CHECK_VERSION(2, 26, 0)
|
||||
static inline void g_source_set_name(GSource *source, const char *name)
|
||||
{
|
||||
/* This is just a debugging aid, so leaving it a no-op */
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue