qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [RFC v2 06/38] plugin: add core code


From: Pavel Dovgalyuk
Subject: Re: [Qemu-devel] [RFC v2 06/38] plugin: add core code
Date: Mon, 10 Dec 2018 14:37:25 +0300

> From: Emilio G. Cota [mailto:address@hidden
> +/*
> + * A dynamic callback has an insertion point that is determined at run-time.
> + * Usually the insertion point is somewhere in the code cache; think for
> + * instance of a callback to be called upon the execution of a particular TB.
> + */
> +struct qemu_plugin_dyn_cb {
> +    union qemu_plugin_cb_sig f;
> +    void *userp;
> +    unsigned tcg_flags;
> +    enum plugin_dyn_cb_type type;
> +    /* @rw applies to mem callbacks only (both regular and inline) */
> +    enum qemu_plugin_mem_rw rw;
> +    /* fields specific to each dyn_cb type go here */
> +    union {
> +        struct {
> +            bool haddr;
> +        } mem;
> +        struct {
> +            enum qemu_plugin_op op;
> +            uint64_t imm;
> +        } inline_insn;
> +    };
> +};
> +
> +struct qemu_plugin_dyn_cb_arr {
> +    struct qemu_plugin_dyn_cb *data;
> +    size_t n;
> +    size_t capacity;
> +};
> +

Why not list or something dynamic? Is the indexing required?

Can you add the comments for the data structures and functions?
It is very hard to seek through the whole patch to get the details about them.

Pavel Dovgalyuk




reply via email to

[Prev in Thread] Current Thread [Next in Thread]