From patchwork Fri Dec 9 11:48:21 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 87448 Delivered-To: patch@linaro.org Received: by 10.140.20.101 with SMTP id 92csp264322qgi; Fri, 9 Dec 2016 03:56:12 -0800 (PST) X-Received: by 10.200.45.245 with SMTP id q50mr68374460qta.47.1481284572696; Fri, 09 Dec 2016 03:56:12 -0800 (PST) Return-Path: Received: from lists.gnu.org (lists.gnu.org. [208.118.235.17]) by mx.google.com with ESMTPS id p26si19842946qtf.36.2016.12.09.03.56.12 for (version=TLS1 cipher=AES128-SHA bits=128/128); Fri, 09 Dec 2016 03:56:12 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org; dmarc=fail (p=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:46058 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cFJme-0004oe-61 for patch@linaro.org; Fri, 09 Dec 2016 06:56:12 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41750) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cFJgM-0007E6-DO for qemu-devel@nongnu.org; Fri, 09 Dec 2016 06:49:48 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cFJgI-0007ni-FH for qemu-devel@nongnu.org; Fri, 09 Dec 2016 06:49:42 -0500 Received: from mail-wm0-f54.google.com ([74.125.82.54]:38575) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cFJgI-0007nI-AV for qemu-devel@nongnu.org; Fri, 09 Dec 2016 06:49:38 -0500 Received: by mail-wm0-f54.google.com with SMTP id f82so23294674wmf.1 for ; Fri, 09 Dec 2016 03:49:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=4fhMECRzE5Zb1HKM8DxSxcpJb7Vu1Nx4v8VudYCkuZw=; b=gd6kbIwfmClG2dbYRygJfKBSQXyRtjJGdb0CMfdVjBuMfrtbTz6iiwWaoriEfrZ+t4 AbBb+0rx6ymMPE1gPcmBtrJX/iPobEHs0SzJvhA/SbAH/esATHJr5xqkf5CzHd/fVjyh 3L8T6H5SKkNfSC9gyUSvNw/LYsnDVYVPuhSnQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=4fhMECRzE5Zb1HKM8DxSxcpJb7Vu1Nx4v8VudYCkuZw=; b=QsJEeFzAezsvGGht4jn2VsWS4EkIH1uilFW2ntn2iO2oC4DfIRHrJzVd+fDBGzYTbm Uo8XAyJQl9tNe5cg+YyJ/UAREvyYj0iORjK8A8yA6idQhx7xDUUPxHk6joPWPDO8qOx2 T1Oy8WW3pgC1Bs/5PdXWC/p0hMRRjXPgaGAjvccfAExI2064+k5J0AvEFVofhqHDVk8q zS5K7xObDG69XAP4ISol5PlYIpJ7UVXdXCjBpuBg1CY3USa1vfkarIZiMNKBIcjgMlGq dyiEsEEmK2ugmGDpuVkXR/lv/Doymvhy1/Wi0hklSM/vfPuwWoVJA8OrI9t/Om54mLRi 0kZQ== X-Gm-Message-State: AKaTC03VA1nc0TGjm54e2Q4paQ6nXaoRaePO1gTfG+qHBBNr2mu/h7gMTtGkMFEz19XxsTwM X-Received: by 10.28.134.204 with SMTP id i195mr6266998wmd.77.1481284117109; Fri, 09 Dec 2016 03:48:37 -0800 (PST) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id c187sm20144001wmd.13.2016.12.09.03.48.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 09 Dec 2016 03:48:35 -0800 (PST) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id 937FD3E06AD; Fri, 9 Dec 2016 11:48:34 +0000 (GMT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: peter.maydell@linaro.org Date: Fri, 9 Dec 2016 11:48:21 +0000 Message-Id: <20161209114830.9158-2-alex.bennee@linaro.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20161209114830.9158-1-alex.bennee@linaro.org> References: <20161209114830.9158-1-alex.bennee@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 74.125.82.54 Subject: [Qemu-devel] [RISU PATCH v3 01/10] risu: a bit more verbosity when running X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Alex=20Benn=C3=A9e?= , joserz@linux.vnet.ibm.com, qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" 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 -- 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(-) -- 2.11.0 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)