From: Mahmoud Mandour <ma.mandourr@gmail.com>
To: qemu-devel@nongnu.org
Cc: "Mahmoud Mandour" <ma.mandourr@gmail.com>,
"Alex Bennée" <alex.bennee@linaro.org>
Subject: [PATCH v5] docs/devel: Added cache plugin to the plugins docs
Date: Mon, 28 Jun 2021 07:38:08 +0200 [thread overview]
Message-ID: <20210628053808.17422-1-ma.mandourr@gmail.com> (raw)
In-Reply-To: <20210623125458.450462-5-ma.mandourr@gmail.com>
Signed-off-by: Mahmoud Mandour <ma.mandourr@gmail.com>
---
v4 -> v5:
Fixed the illustrated command since it has path problems...
docs/devel/tcg-plugins.rst | 59 ++++++++++++++++++++++++++++++++++++++
1 file changed, 59 insertions(+)
diff --git a/docs/devel/tcg-plugins.rst b/docs/devel/tcg-plugins.rst
index 18c6581d85..595b8e0ea4 100644
--- a/docs/devel/tcg-plugins.rst
+++ b/docs/devel/tcg-plugins.rst
@@ -319,3 +319,62 @@ the user to see what hardware is accessed how often. It has a number of options:
off:0000001c, 1, 2
off:00000020, 1, 2
...
+
+- contrib/plugins/cache
+
+Cache modelling plugin that measures the performance of a given cache
+configuration when a given working set is run::
+
+ ./x86_64-linux-user/qemu-x86_64 -plugin ./contrib/plugins/libcache.so \
+ -d plugin -D cache.log ./tests/tcg/x86_64-linux-user/float_convs
+
+will report the following::
+
+ Data accesses: 996479, Misses: 507
+ Miss rate: 0.050879%
+
+ Instruction accesses: 2641737, Misses: 18617
+ Miss rate: 0.704726%
+
+ address, data misses, instruction
+ 0x424f1e (_int_malloc), 109, movq %rax, 8(%rcx)
+ 0x41f395 (_IO_default_xsputn), 49, movb %dl, (%rdi, %rax)
+ 0x42584d (ptmalloc_init.part.0), 33, movaps %xmm0, (%rax)
+ 0x454d48 (__tunables_init), 20, cmpb $0, (%r8)
+ ...
+
+ address, fetch misses, instruction
+ 0x4160a0 (__vfprintf_internal), 744, movl $1, %ebx
+ 0x41f0a0 (_IO_setb), 744, endbr64
+ 0x415882 (__vfprintf_internal), 744, movq %r12, %rdi
+ 0x4268a0 (__malloc), 696, andq $0xfffffffffffffff0, %rax
+ ...
+
+The plugin has a number of arguments, all of them are optional:
+
+ * arg="limit=N"
+
+ Print top N icache and dcache thrashing instructions along with their
+ address, number of misses, and its disassembly. (default: 32)
+
+ * arg="icachesize=N"
+ * arg="iblksize=B"
+ * arg="iassoc=A"
+
+ Instruction cache configuration arguments. They specify the cache size, block
+ size, and associativity of the instruction cache, respectively.
+ (default: N = 16384, B = 64, A = 8)
+
+ * arg="dcachesize=N"
+ * arg="dblksize=B"
+ * arg="dassoc=A"
+
+ Data cache configuration arguments. They specify the cache size, block size,
+ and associativity of the data cache, respectively.
+ (default: N = 16384, B = 64, A = 8)
+
+ * arg="evict=POLICY"
+
+ Sets the eviction policy to POLICY. Available policies are: :code:`lru`,
+ :code:`fifo`, and :code:`rand`. The plugin will use the specified policy for
+ both instruction and data caches. (default: POLICY = :code:`lru`)
--
2.25.1
next prev parent reply other threads:[~2021-06-28 5:39 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-23 12:54 [PATCH v4 0/5] plugins: New TCG plugin for cache modelling Mahmoud Mandour
2021-06-23 12:54 ` [PATCH v4 1/5] plugins: Added a new cache modelling plugin Mahmoud Mandour
2021-06-23 12:54 ` [PATCH v4 2/5] plugins/cache: Enable cache parameterization Mahmoud Mandour
2021-06-23 12:54 ` [PATCH v4 3/5] plugins/cache: Added FIFO and LRU eviction policies Mahmoud Mandour
2021-06-23 12:54 ` [PATCH v4 4/5] docs/devel: Added cache plugin to the plugins docs Mahmoud Mandour
2021-06-23 14:00 ` Mahmoud Mandour
2021-06-28 5:38 ` Mahmoud Mandour [this message]
2021-06-23 12:54 ` [PATCH v4 5/5] MAINTAINTERS: Added myself as a reviewer for TCG Plugins Mahmoud Mandour
2021-07-07 9:27 ` [PATCH v5] MAINTAINERS: " Mahmoud Mandour
2021-07-05 16:11 ` [PATCH v4 0/5] plugins: New TCG plugin for cache modelling Alex Bennée
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210628053808.17422-1-ma.mandourr@gmail.com \
--to=ma.mandourr@gmail.com \
--cc=alex.bennee@linaro.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).