[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC PATCH 14/21] trace: add support for plugin infrast
From: |
Emilio G. Cota |
Subject: |
Re: [Qemu-devel] [RFC PATCH 14/21] trace: add support for plugin infrastructure |
Date: |
Sat, 6 Oct 2018 21:29:00 -0400 |
User-agent: |
Mutt/1.9.4 (2018-02-28) |
On Fri, Oct 05, 2018 at 16:49:03 +0100, Alex Bennée wrote:
(snip)
> +static int bind_to_tracepoints(GModule *g_module, GPtrArray *events)
> +{
> + int count = 0;
> + TraceEventIter iter;
> + TraceEvent *ev;
> +
> + trace_event_iter_init(&iter, "*");
> + while ((ev = trace_event_iter_next(&iter)) != NULL) {
> + const char *name = trace_event_get_name(ev);
> + gpointer fn;
> +
> + if (g_module_symbol(g_module, name, &fn)) {
> + ev->plugin = (uintptr_t) fn;
> + trace_event_set_state_dynamic(ev, true);
> + count++;
> + }
> + }
I'd rather have subscription functions exposed to the
plugins via an API, so that
- Plugins can turn on and off subscriptions to callbacks
as they see fit, instead of "being called from
the very beginning, and then disable forever"
- We can have compile-time failures when doing something
wrong with callback names :-)
Thanks,
E.
- [Qemu-devel] [RFC PATCH 09/21] trace: suppress log output of trace points, (continued)
- [Qemu-devel] [RFC PATCH 09/21] trace: suppress log output of trace points, Alex Bennée, 2018/10/05
- [Qemu-devel] [RFC PATCH 02/21] util/log: add qemu_dfilter_append_range(), Alex Bennée, 2018/10/05
- [Qemu-devel] [RFC PATCH 16/21] trace: add infrastructure for building plugins, Alex Bennée, 2018/10/05
- [Qemu-devel] [RFC PATCH 11/21] trace: expose a plugin fn pointer in TraceEvent, Alex Bennée, 2018/10/05
- [Qemu-devel] [RFC PATCH 14/21] trace: add support for plugin infrastructure, Alex Bennée, 2018/10/05
- [Qemu-devel] [RFC PATCH 07/21] accel/tcg/cputlb: convert tlb_flush debugging into trace events, Alex Bennée, 2018/10/05
- [Qemu-devel] [RFC PATCH 03/21] linux-user: add -dfilter progtext shortcut, Alex Bennée, 2018/10/05
- [Qemu-devel] [RFC PATCH 06/21] trace: show trace point counts in the monitor, Alex Bennée, 2018/10/05