qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Alex Bennée" <alex.bennee@linaro.org>
To: peter.maydell@linaro.org
Cc: qemu-devel@nongnu.org, joserz@linux.vnet.ibm.com,
	"Alex Bennée" <alex.bennee@linaro.org>
Subject: [Qemu-devel] [RISU PATCH v3 01/10] risu: a bit more verbosity when running
Date: Fri,  9 Dec 2016 11:48:21 +0000	[thread overview]
Message-ID: <20161209114830.9158-2-alex.bennee@linaro.org> (raw)
In-Reply-To: <20161209114830.9158-1-alex.bennee@linaro.org>

Before this is could seem a little quite when running as you had no
indication stuff was happening (or how fast). I only dump on the master
side as I want to minimise the amount of qemu logs to sift through.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>

--
v3
  - use portable fmt string for image_start_address
  - include arm dumping position
---
 risu.c         | 15 +++++++++++++--
 risu.h         |  3 +++
 risu_aarch64.c |  3 +++
 risu_arm.c     |  3 +++
 4 files changed, 22 insertions(+), 2 deletions(-)

diff --git a/risu.c b/risu.c
index 7e42160..bcdc219 100644
--- a/risu.c
+++ b/risu.c
@@ -37,6 +37,16 @@ sigjmp_buf jmpbuf;
 /* Should we test for FP exception status bits? */
 int test_fp_exc = 0;
 
+long executed_tests = 0;
+void report_test_status(void *pc)
+{
+   executed_tests += 1;
+   if (executed_tests % 100 == 0) {
+      fprintf(stderr,"Executed %ld test instructions (pc=%p)\r",
+              executed_tests, pc);
+   }
+}
+
 void master_sigill(int sig, siginfo_t *si, void *uc)
 {
    switch (recv_and_compare_register_info(master_socket, uc))
@@ -61,6 +71,7 @@ void apprentice_sigill(int sig, siginfo_t *si, void *uc)
          return;
       case 1:
          /* end of test */
+         fprintf(stderr, "\nend of test\n");
          exit(0);
       default:
          /* mismatch */
@@ -129,7 +140,7 @@ int master(int sock)
    }
    master_socket = sock;
    set_sigill_handler(&master_sigill);
-   fprintf(stderr, "starting image\n");
+   fprintf(stderr, "starting master image at 0x%"PRIxPTR"\n", image_start_address);
    image_start();
    fprintf(stderr, "image returned unexpectedly\n");
    exit(1);
@@ -139,7 +150,7 @@ int apprentice(int sock)
 {
    apprentice_socket = sock;
    set_sigill_handler(&apprentice_sigill);
-   fprintf(stderr, "starting image\n");
+   fprintf(stderr, "starting apprentice image at 0x%"PRIxPTR"\n", image_start_address);
    image_start();
    fprintf(stderr, "image returned unexpectedly\n");
    exit(1);
diff --git a/risu.h b/risu.h
index 26ed834..e4bb323 100644
--- a/risu.h
+++ b/risu.h
@@ -26,6 +26,7 @@ extern uintptr_t image_start_address;
 extern void *memblock;
 
 extern int test_fp_exc;
+extern int ismaster;
 
 /* Ops code under test can request from risu: */
 #define OP_COMPARE 0
@@ -59,6 +60,8 @@ int recv_and_compare_register_info(int sock, void *uc);
  */
 int report_match_status(void);
 
+void report_test_status(void *pc);
+
 /* Move the PC past this faulting insn by adjusting ucontext
  */
 void advance_pc(void *uc);
diff --git a/risu_aarch64.c b/risu_aarch64.c
index 547f987..1595604 100644
--- a/risu_aarch64.c
+++ b/risu_aarch64.c
@@ -28,6 +28,9 @@ void advance_pc(void *vuc)
 {
     ucontext_t *uc = vuc;
     uc->uc_mcontext.pc += 4;
+    if (ismaster) {
+      report_test_status((void *) uc->uc_mcontext.pc);
+    }
 }
 
 static void set_x0(void *vuc, uint64_t x0)
diff --git a/risu_arm.c b/risu_arm.c
index bdfb59b..c3fe3d3 100644
--- a/risu_arm.c
+++ b/risu_arm.c
@@ -50,6 +50,9 @@ void advance_pc(void *vuc)
 {
    ucontext_t *uc = vuc;
    uc->uc_mcontext.arm_pc += insnsize(uc);
+   if (ismaster) {
+      report_test_status((void *) uc->uc_mcontext.arm_pc);
+   }
 }
 
 static void set_r0(void *vuc, uint32_t r0)
-- 
2.11.0

  reply	other threads:[~2016-12-09 11:49 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-09 11:48 [Qemu-devel] [RISU PATCH v3 00/10] Record/payback patches Alex Bennée
2016-12-09 11:48 ` Alex Bennée [this message]
2016-12-16 18:27   ` [Qemu-devel] [RISU PATCH v3 01/10] risu: a bit more verbosity when running Peter Maydell
2016-12-09 11:48 ` [Qemu-devel] [RISU PATCH v3 02/10] aarch64: add hand-coded risu skeleton for directed testing Alex Bennée
2016-12-16 18:33   ` Peter Maydell
2016-12-09 11:48 ` [Qemu-devel] [RISU PATCH v3 03/10] risu: paramterise send/receive functions Alex Bennée
2016-12-16 18:54   ` Peter Maydell
2016-12-09 11:48 ` [Qemu-devel] [RISU PATCH v3 04/10] risu: add simple trace and replay support Alex Bennée
2016-12-16 19:00   ` Peter Maydell
2016-12-09 11:48 ` [Qemu-devel] [RISU PATCH v3 05/10] risu: add support compressed tracefiles Alex Bennée
2016-12-16 19:06   ` Peter Maydell
2016-12-09 11:48 ` [Qemu-devel] [RISU PATCH v3 06/10] risu_aarch64: it's -> it is Alex Bennée
2016-12-16 18:36   ` Peter Maydell
2016-12-09 11:48 ` [Qemu-devel] [RISU PATCH v3 07/10] risugen: remove grocer's apostrophe from REs Alex Bennée
2016-12-16 18:37   ` Peter Maydell
2016-12-09 11:48 ` [Qemu-devel] [RISU PATCH v3 08/10] new: generate_all.sh script Alex Bennée
2016-12-09 11:48 ` [Qemu-devel] [RISU PATCH v3 09/10] new: record_traces.sh helper script Alex Bennée
2016-12-09 11:48 ` [Qemu-devel] [RISU PATCH v3 10/10] new: run_risu.sh script Alex Bennée
2016-12-16 19:09 ` [Qemu-devel] [RISU PATCH v3 00/10] Record/payback patches Peter Maydell
2016-12-23  1:41 ` joserz

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=20161209114830.9158-2-alex.bennee@linaro.org \
    --to=alex.bennee@linaro.org \
    --cc=joserz@linux.vnet.ibm.com \
    --cc=peter.maydell@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).