1*1b4c136bSAlex Bennée /*
2*1b4c136bSAlex Bennée * Copyright (C) 2018, Emilio G. Cota <cota@braap.org>
3*1b4c136bSAlex Bennée *
4*1b4c136bSAlex Bennée * License: GNU GPL, version 2 or later.
5*1b4c136bSAlex Bennée * See the COPYING file in the top-level directory.
6*1b4c136bSAlex Bennée */
7*1b4c136bSAlex Bennée #include <inttypes.h>
8*1b4c136bSAlex Bennée #include <assert.h>
9*1b4c136bSAlex Bennée #include <stdlib.h>
10*1b4c136bSAlex Bennée #include <string.h>
11*1b4c136bSAlex Bennée #include <unistd.h>
12*1b4c136bSAlex Bennée #include <stdio.h>
13*1b4c136bSAlex Bennée
14*1b4c136bSAlex Bennée #include <qemu-plugin.h>
15*1b4c136bSAlex Bennée
16*1b4c136bSAlex Bennée QEMU_PLUGIN_EXPORT int qemu_plugin_version = QEMU_PLUGIN_VERSION;
17*1b4c136bSAlex Bennée
18*1b4c136bSAlex Bennée /*
19*1b4c136bSAlex Bennée * Empty TB translation callback.
20*1b4c136bSAlex Bennée * This allows us to measure the overhead of injecting and then
21*1b4c136bSAlex Bennée * removing empty instrumentation.
22*1b4c136bSAlex Bennée */
vcpu_tb_trans(qemu_plugin_id_t id,struct qemu_plugin_tb * tb)23*1b4c136bSAlex Bennée static void vcpu_tb_trans(qemu_plugin_id_t id, struct qemu_plugin_tb *tb)
24*1b4c136bSAlex Bennée { }
25*1b4c136bSAlex Bennée
qemu_plugin_install(qemu_plugin_id_t id,const qemu_info_t * info,int argc,char ** argv)26*1b4c136bSAlex Bennée QEMU_PLUGIN_EXPORT int qemu_plugin_install(qemu_plugin_id_t id,
27*1b4c136bSAlex Bennée const qemu_info_t *info,
28*1b4c136bSAlex Bennée int argc, char **argv)
29*1b4c136bSAlex Bennée {
30*1b4c136bSAlex Bennée qemu_plugin_register_vcpu_tb_trans_cb(id, vcpu_tb_trans);
31*1b4c136bSAlex Bennée return 0;
32*1b4c136bSAlex Bennée }
33