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