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