1671f760bSEmilio G. Cota /* 2671f760bSEmilio G. Cota * Copyright (C) 2018, Emilio G. Cota <cota@braap.org> 3671f760bSEmilio G. Cota * 4671f760bSEmilio G. Cota * License: GNU GPL, version 2 or later. 5671f760bSEmilio G. Cota * See the COPYING file in the top-level directory. 6671f760bSEmilio G. Cota */ 7671f760bSEmilio G. Cota #include <inttypes.h> 8671f760bSEmilio G. Cota #include <assert.h> 9671f760bSEmilio G. Cota #include <stdlib.h> 10671f760bSEmilio G. Cota #include <string.h> 11671f760bSEmilio G. Cota #include <unistd.h> 12671f760bSEmilio G. Cota #include <stdio.h> 13671f760bSEmilio G. Cota 14671f760bSEmilio G. Cota #include <qemu-plugin.h> 15671f760bSEmilio G. Cota 16*3fb356ccSAlex Bennée QEMU_PLUGIN_EXPORT int qemu_plugin_version = QEMU_PLUGIN_VERSION; 17*3fb356ccSAlex Bennée 18671f760bSEmilio G. Cota /* 19671f760bSEmilio G. Cota * Empty TB translation callback. 20671f760bSEmilio G. Cota * This allows us to measure the overhead of injecting and then 21671f760bSEmilio G. Cota * removing empty instrumentation. 22671f760bSEmilio G. Cota */ 23671f760bSEmilio G. Cota static void vcpu_tb_trans(qemu_plugin_id_t id, struct qemu_plugin_tb *tb) 24671f760bSEmilio G. Cota { } 25671f760bSEmilio G. Cota 26671f760bSEmilio G. Cota QEMU_PLUGIN_EXPORT int qemu_plugin_install(qemu_plugin_id_t id, 27671f760bSEmilio G. Cota const qemu_info_t *info, 28671f760bSEmilio G. Cota int argc, char **argv) 29671f760bSEmilio G. Cota { 30671f760bSEmilio G. Cota qemu_plugin_register_vcpu_tb_trans_cb(id, vcpu_tb_trans); 31671f760bSEmilio G. Cota return 0; 32671f760bSEmilio G. Cota } 33