[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [PATCH v2 6/7] tests/plugin/mem: add option to print memory accesses
From: |
Xingtao Yao (Fujitsu) |
Subject: |
RE: [PATCH v2 6/7] tests/plugin/mem: add option to print memory accesses |
Date: |
Thu, 27 Jun 2024 03:17:58 +0000 |
Hi, Pierrick
> +static void print_access(unsigned int cpu_index, qemu_plugin_meminfo_t
> meminfo,
> + uint64_t vaddr, void *udata)
> +{
> + unsigned size = 8 << qemu_plugin_mem_size_shift(meminfo);
> + const char *type = qemu_plugin_mem_is_store(meminfo) ? "store" : "load";
> + uint64_t upper = qemu_plugin_mem_get_value_upper_bits(meminfo);
> + uint64_t lower = qemu_plugin_mem_get_value_lower_bits(meminfo);
> + const char *sym = udata ? udata : "";
> + g_autoptr(GString) out = g_string_new("");
> + g_string_printf(out, "access: 0x%.0"PRIx64"%"PRIx64",%d,%s,%s\n",
> + upper, lower, size, type, sym);
> + qemu_plugin_outs(out->str);
> +}
I think it may be helpful to output the GVA and GPA, can you append these
information?
Thanks
Xingtao
[PATCH v2 7/7] tests/tcg/x86_64: add test for plugin memory access, Pierrick Bouvier, 2024/06/26
[PATCH v2 4/7] tests/tcg: add mechanism to run specific tests with plugins, Pierrick Bouvier, 2024/06/26