mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-11 03:24:58 -06:00
plugins: getting qemu_plugin_get_hwaddr only expose one function prototype
This is used for counting how much function are export to qemu plugin. Signed-off-by: Yonggang Luo <luoyonggang@gmail.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20201013002806.1447-2-luoyonggang@gmail.com> Message-Id: <20210312172821.31647-14-alex.bennee@linaro.org>
This commit is contained in:
parent
fc292a7e7c
commit
a2b8816977
1 changed files with 3 additions and 5 deletions
|
@ -266,10 +266,12 @@ bool qemu_plugin_mem_is_store(qemu_plugin_meminfo_t info)
|
||||||
|
|
||||||
#ifdef CONFIG_SOFTMMU
|
#ifdef CONFIG_SOFTMMU
|
||||||
static __thread struct qemu_plugin_hwaddr hwaddr_info;
|
static __thread struct qemu_plugin_hwaddr hwaddr_info;
|
||||||
|
#endif
|
||||||
|
|
||||||
struct qemu_plugin_hwaddr *qemu_plugin_get_hwaddr(qemu_plugin_meminfo_t info,
|
struct qemu_plugin_hwaddr *qemu_plugin_get_hwaddr(qemu_plugin_meminfo_t info,
|
||||||
uint64_t vaddr)
|
uint64_t vaddr)
|
||||||
{
|
{
|
||||||
|
#ifdef CONFIG_SOFTMMU
|
||||||
CPUState *cpu = current_cpu;
|
CPUState *cpu = current_cpu;
|
||||||
unsigned int mmu_idx = info >> TRACE_MEM_MMU_SHIFT;
|
unsigned int mmu_idx = info >> TRACE_MEM_MMU_SHIFT;
|
||||||
hwaddr_info.is_store = info & TRACE_MEM_ST;
|
hwaddr_info.is_store = info & TRACE_MEM_ST;
|
||||||
|
@ -281,14 +283,10 @@ struct qemu_plugin_hwaddr *qemu_plugin_get_hwaddr(qemu_plugin_meminfo_t info,
|
||||||
}
|
}
|
||||||
|
|
||||||
return &hwaddr_info;
|
return &hwaddr_info;
|
||||||
}
|
|
||||||
#else
|
#else
|
||||||
struct qemu_plugin_hwaddr *qemu_plugin_get_hwaddr(qemu_plugin_meminfo_t info,
|
|
||||||
uint64_t vaddr)
|
|
||||||
{
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
bool qemu_plugin_hwaddr_is_io(const struct qemu_plugin_hwaddr *haddr)
|
bool qemu_plugin_hwaddr_is_io(const struct qemu_plugin_hwaddr *haddr)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue