From: "Alex Bennée" <alex.bennee@linaro.org>
To: bobby.prani@gmail.com, rth@twiddle.net, stefanha@redhat.com
Cc: qemu-devel@nongnu.org, "Alex Bennée" <alex.bennee@linaro.org>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Peter Crosthwaite" <crosthwaite.peter@gmail.com>
Subject: [Qemu-devel] [PATCH v1 2/3] cpus: dump TLB flush counts as trace event
Date: Tue, 11 Apr 2017 11:50:30 +0100 [thread overview]
Message-ID: <20170411105031.28904-3-alex.bennee@linaro.org> (raw)
In-Reply-To: <20170411105031.28904-1-alex.bennee@linaro.org>
This can be pre-processed later from the trace file.
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
cpus.c | 6 ++++++
trace-events | 3 +++
2 files changed, 9 insertions(+)
diff --git a/cpus.c b/cpus.c
index 740b8dc3f8..fae7344df5 100644
--- a/cpus.c
+++ b/cpus.c
@@ -50,6 +50,8 @@
#include "qapi-event.h"
#include "hw/nmi.h"
#include "sysemu/replay.h"
+#include "exec/cputlb.h"
+#include "trace-root.h"
#ifdef CONFIG_LINUX
@@ -1252,6 +1254,10 @@ static int tcg_cpu_exec(CPUState *cpu)
int64_t ti;
#endif
+ trace_tlb_flush_stats(tlb_self_flush_count,
+ tlb_async_flush_count,
+ tlb_synced_flush_count);
+
#ifdef CONFIG_PROFILER
ti = profile_getclock();
#endif
diff --git a/trace-events b/trace-events
index b07a09ba95..fc23e15d25 100644
--- a/trace-events
+++ b/trace-events
@@ -94,6 +94,9 @@ disable exec_tb(void *tb, uintptr_t pc) "tb:%p pc=0x%"PRIxPTR
disable exec_tb_nocache(void *tb, uintptr_t pc) "tb:%p pc=0x%"PRIxPTR
disable exec_tb_exit(void *last_tb, unsigned int flags) "tb:%p flags=%x"
+# cpus.c
+tlb_flush_stats(int self, int async, int synced) "self:%d async:%d synced:%d"
+
# translate-all.c
translate_block(void *tb, uintptr_t pc, uint8_t *tb_code) "tb:%p, pc:0x%"PRIxPTR", tb_code:%p"
--
2.11.0
next prev parent reply other threads:[~2017-04-11 10:50 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-11 10:50 [Qemu-devel] [PATCH v1 0/3] Fix cputlb flush stats and exporting data Alex Bennée
2017-04-11 10:50 ` [Qemu-devel] [PATCH v1 1/3] cputlb: fix and enhance TLB statistics Alex Bennée
2017-04-11 10:50 ` Alex Bennée [this message]
2017-04-14 5:18 ` [Qemu-devel] [PATCH v1 2/3] cpus: dump TLB flush counts as trace event Paolo Bonzini
2017-04-25 15:32 ` Alex Bennée
2017-04-11 10:50 ` [Qemu-devel] [PATCH v1 3/3] new script/analyse-tlb-flushes-simpletrace.py 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=20170411105031.28904-3-alex.bennee@linaro.org \
--to=alex.bennee@linaro.org \
--cc=bobby.prani@gmail.com \
--cc=crosthwaite.peter@gmail.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=rth@twiddle.net \
--cc=stefanha@redhat.com \
/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).