bf3afd5f41
Sometimes it is useful to have a quick histogram to represent a certain distribution -- for example, when investigating a performance regression in a hash table due to inadequate hashing. The appended allows us to easily represent a distribution using Unicode characters. Further, the data structure keeping track of the distribution is so simple that obtaining its values for off-line processing is trivial. Example, taking the last 10 commits to QEMU: Characters in commit title Count ----------------------------------- 39 1 48 1 53 1 54 2 57 1 61 1 67 1 78 1 80 1 qdist_init(&dist); qdist_inc(&dist, 39); [...] qdist_inc(&dist, 80); char *str = qdist_pr(&dist, 9, QDIST_PR_LABELS); // -> [39.0,43.6)▂▂ █▂ ▂ ▄[75.4,80.0] g_free(str); char *str = qdist_pr(&dist, 4, QDIST_PR_LABELS); // -> [39.0,49.2)▁█▁▁[69.8,80.0] g_free(str); Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Emilio G. Cota <cota@braap.org> Message-Id: <1465412133-3029-9-git-send-email-cota@braap.org> Signed-off-by: Richard Henderson <rth@twiddle.net>
36 lines
1.3 KiB
Makefile
36 lines
1.3 KiB
Makefile
util-obj-y = osdep.o cutils.o unicode.o qemu-timer-common.o
|
|
util-obj-$(CONFIG_POSIX) += compatfd.o
|
|
util-obj-$(CONFIG_POSIX) += event_notifier-posix.o
|
|
util-obj-$(CONFIG_POSIX) += mmap-alloc.o
|
|
util-obj-$(CONFIG_POSIX) += oslib-posix.o
|
|
util-obj-$(CONFIG_POSIX) += qemu-openpty.o
|
|
util-obj-$(CONFIG_POSIX) += qemu-thread-posix.o
|
|
util-obj-$(CONFIG_WIN32) += event_notifier-win32.o
|
|
util-obj-$(CONFIG_POSIX) += memfd.o
|
|
util-obj-$(CONFIG_WIN32) += oslib-win32.o
|
|
util-obj-$(CONFIG_WIN32) += qemu-thread-win32.o
|
|
util-obj-y += envlist.o path.o module.o
|
|
util-obj-$(call lnot,$(CONFIG_INT128)) += host-utils.o
|
|
util-obj-y += bitmap.o bitops.o hbitmap.o
|
|
util-obj-y += fifo8.o
|
|
util-obj-y += acl.o
|
|
util-obj-y += error.o qemu-error.o
|
|
util-obj-y += id.o
|
|
util-obj-y += iov.o qemu-config.o qemu-sockets.o uri.o notify.o
|
|
util-obj-y += qemu-option.o qemu-progress.o
|
|
util-obj-y += hexdump.o
|
|
util-obj-y += crc32c.o
|
|
util-obj-y += throttle.o
|
|
util-obj-y += getauxval.o
|
|
util-obj-y += readline.o
|
|
util-obj-y += rfifolock.o
|
|
util-obj-y += rcu.o
|
|
util-obj-y += qemu-coroutine.o qemu-coroutine-lock.o qemu-coroutine-io.o
|
|
util-obj-y += qemu-coroutine-sleep.o
|
|
util-obj-y += coroutine-$(CONFIG_COROUTINE_BACKEND).o
|
|
util-obj-y += buffer.o
|
|
util-obj-y += timed-average.o
|
|
util-obj-y += base64.o
|
|
util-obj-y += log.o
|
|
util-obj-y += qdist.o
|