dbus-latency: make it work
Apparently, dbus-latency was measuring something, but it was definitely
NOT latency.
This commit fixes numerous bugs and misdesigned parts:
- enums are 32-bit also on 64-bit platforms;
- uprobes for gio were set on g_dbus_message_lock, which is called
not only during sending and receiving messages, but also in other cases;
now, there are two uprobes for glib: one for sending, one for receiving;
- uprobes for libdbus were set on _dbus_connection_message_sent_unlocked()
which is called _after_ sending and dbus_connection_dispatch() which
is not called for replies at all;
- intervals were mislabeled as "ms" instead of "us";
- dbus-daemon sends and receives messages with the same set of functions
as libdbus clients; if measuring starts on sending and ends on receiving
it was only a half of the job when we counted dbus-daemon; it is now excluded
- lots of messages were lost, for examples some signals could be never received;
this clogged up the maps up to 10240 elements, and then measuring stopped;
we only count method calls now;
- message about Ctrl-C was issued too soon, even before compiling; now, it is
in the waiting loop.
This part still needs fixing:
- identifying messages by their serial number. It works quite well with
randomized serial numbers in the libraries;
- sd_bus is not supported.
Change-Id: Ibc42375402c0d832e95c9b10742443839092171e