From nobody Wed Nov 27 04:38:43 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1701808979; cv=none; d=zohomail.com; s=zohoarc; b=kr6QdR5AEHrfHWd3qHlJBl3q7FfywG5VrktJsccl856DEE0egFbe6Q4s5gVEU1hYeQzEexISyC5nIZ1nt5BuTNUaFD270vL7TaTo7AJL2yiTH2X3LnwI6HMcuZbw5od+Hkxj6XbRbsZrFseHU54qbabxFR4XeRe3QYggy058Phs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1701808979; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=WUlXUbQdrj2zN2x2QSDq9TzSC9U/EAD4vSnBXQIoxM8=; b=U1pScJFoBuT1+InF+vMBLBGF9t97M9IlEheRKKja3fze2R1KjQo//POi4TMZe/ZQLCpKv38SWJS8s6c4GJQppofxJns5aoTxOS454zgMqkg2nI26bz3IJJy2+ZN7FDn+ET4gBIRfqHkpg9g8TjltRrrR/8whhqygY5dDm/ZhyvU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1701808979347883.4900714634773; Tue, 5 Dec 2023 12:42:59 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rAcEO-0007Sg-NB; Tue, 05 Dec 2023 15:41:24 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rAcEG-0007Qz-Sw for qemu-devel@nongnu.org; Tue, 05 Dec 2023 15:41:16 -0500 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rAcEF-0002Fg-4b for qemu-devel@nongnu.org; Tue, 05 Dec 2023 15:41:16 -0500 Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-40c0a11a914so28309695e9.2 for ; Tue, 05 Dec 2023 12:41:14 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id i1-20020a05600c354100b0040588d85b3asm23273563wmq.15.2023.12.05.12.41.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Dec 2023 12:41:09 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 81A585FBC4; Tue, 5 Dec 2023 20:41:06 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1701808872; x=1702413672; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=WUlXUbQdrj2zN2x2QSDq9TzSC9U/EAD4vSnBXQIoxM8=; b=r77Z25BZR/RG/lIOQIOMsUAymqpIYr6ziT1zA6OZEUrLkyiOYDPQ/QZgzoNXIEh/T6 6YdagoaDAabwxNBsxDzW4O37g4Q6Wew1PGOT5w61optK27JHr/jWPmgiXEXIANVL9oSA NGYHGpLE6x5BoBrmBZgrbgO6TC/RMR5GwZvYLeW3Heaq64+QYT/VY6sC68VNNQ2PvToR CXP9JsJnAubodX2eddVvDvL+30dbjJDlgN1ITSUKMA7wg6yvAs3Y+jKqgfVvIOnj7tHs TEfr3y9CcVAMOxiGdxkalU39Zi6aLOGb5bUwd0f2wwrjXcvTKtr80SKeoRy9yHhdOGxU I4JA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701808872; x=1702413672; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=WUlXUbQdrj2zN2x2QSDq9TzSC9U/EAD4vSnBXQIoxM8=; b=RrjivUoEpTxFjaedxKzx44pZcOFHBt3DBUTKJw6dnO4GCn2mCrY20d7qg2KqUW3v4l VDSMz0ugy0UPVqdd73Abhzm9yCJrFXiTNRG0NRnzcEXRKpClpld0L8Tg3muoQnNGRgUu BzNUqQdkN5qLeZODd6viuBzqkl3OKh3hirz0Q9Hb6OVGE6fKwvu70SLGdLLyjnIKGtgS clSmRlGVKsmQyfqx0l4tVET3bQD37cOVq1W4nLeE9qb72dsN3+YaZS3SO8+0zO9lPRGV O6L1VrfjQ5nDkLGSFVjsRz4dCJl6jf1xvRpLxDRO21YrBPLyUoUaqT5qMjzPmOIdK2WM 5kQw== X-Gm-Message-State: AOJu0YwxHKLF3Qg9Mm4OySJkqlpQcrj2i5X6AaBnTOQDfwbiEJPL74XL K/dS79QR674P6tz37lPhrgZXjw== X-Google-Smtp-Source: AGHT+IE+6x8TOdKzl2SgGuAsymv1Nq78tToMCiz4gejngXqHRacjLbfQqJ/L+h44qIa2FKe2NR3W8g== X-Received: by 2002:a05:600c:3512:b0:40b:5e1e:b3b6 with SMTP id h18-20020a05600c351200b0040b5e1eb3b6mr975084wmq.52.1701808872704; Tue, 05 Dec 2023 12:41:12 -0800 (PST) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Cleber Rosa , Beraldo Leal , Eduardo Habkost , Richard Henderson , Wainer dos Santos Moschetta , Paolo Bonzini , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , John Snow , Pavel Dovgalyuk , =?UTF-8?q?Alex=20Benn=C3=A9e?= Subject: [PATCH 06/11] replay: add proper kdoc for ReplayState Date: Tue, 5 Dec 2023 20:41:01 +0000 Message-Id: <20231205204106.95531-7-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231205204106.95531-1-alex.bennee@linaro.org> References: <20231205204106.95531-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::32a; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32a.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1701808980841100006 Remove the non-standard comment formatting and move the descriptions into a proper kdoc comment. Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Pavel Dovgalyuk Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- replay/replay-internal.h | 27 ++++++++++++++++---------- roms/SLOF | 2 +- tests/tcg/i386/Makefile.softmmu-target | 19 ++++++++++++++++++ 3 files changed, 37 insertions(+), 11 deletions(-) diff --git a/replay/replay-internal.h b/replay/replay-internal.h index 516147ddbc..98ca3748ed 100644 --- a/replay/replay-internal.h +++ b/replay/replay-internal.h @@ -63,24 +63,31 @@ enum ReplayEvents { EVENT_COUNT }; =20 +/** + * typedef ReplayState - global tracking Replay state + * + * This structure tracks where we are in the current ReplayState + * including the logged events from the recorded replay stream. Some + * of the data is also stored/restored from VMStateDescription when VM + * save/restore events take place. + * + * @cached_clock: Cached clocks values + * @current_icount: number of processed instructions + * @instruction_count: number of instructions until next event + * @data_kind: current event + * @has_unread_data: 1 if event not yet processed + * @file_offset: offset into replay log at replay snapshot + * @block_request_id: current serialised block request id + * @read_event_id: current async read event id + */ typedef struct ReplayState { - /*! Cached clock values. */ int64_t cached_clock[REPLAY_CLOCK_COUNT]; - /*! Current icount - number of processed instructions. */ uint64_t current_icount; - /*! Number of instructions to be executed before other events happen. = */ int instruction_count; - /*! Type of the currently executed event. */ unsigned int data_kind; - /*! Flag which indicates that event is not processed yet. */ unsigned int has_unread_data; - /*! Temporary variable for saving current log offset. */ uint64_t file_offset; - /*! Next block operation id. - This counter is global, because requests from different - block devices should not get overlapping ids. */ uint64_t block_request_id; - /*! Asynchronous event id read from the log */ uint64_t read_event_id; } ReplayState; extern ReplayState replay_state; diff --git a/roms/SLOF b/roms/SLOF index 3a259df244..6b6c16b4b4 160000 --- a/roms/SLOF +++ b/roms/SLOF @@ -1 +1 @@ -Subproject commit 3a259df2449fc4a4e43ab5f33f0b2c66484b4bc3 +Subproject commit 6b6c16b4b40763507cf1f518096f3c3883c5cf2d diff --git a/tests/tcg/i386/Makefile.softmmu-target b/tests/tcg/i386/Makefi= le.softmmu-target index 5266f2335a..b9bef72dcf 100644 --- a/tests/tcg/i386/Makefile.softmmu-target +++ b/tests/tcg/i386/Makefile.softmmu-target @@ -33,5 +33,24 @@ EXTRA_RUNS+=3D$(MULTIARCH_RUNS) =20 memory: CFLAGS+=3D-DCHECK_UNALIGNED=3D1 =20 +# Simple Record/Replay Test +.PHONY: memory-record +run-memory-record: memory-record memory + $(call run-test, $<, \ + $(QEMU) -monitor none -display none \ + -chardev file$(COMMA)path=3D$<.out$(COMMA)id=3Doutput \ + -icount shift=3D5$(COMMA)rr=3Drecord$(COMMA)rrfile=3Drecord.bin \ + $(QEMU_OPTS) memory) + +.PHONY: memory-replay +run-memory-replay: memory-replay run-memory-record + $(call run-test, $<, \ + $(QEMU) -monitor none -display none \ + -chardev file$(COMMA)path=3D$<.out$(COMMA)id=3Doutput \ + -icount shift=3D5$(COMMA)rr=3Dreplay$(COMMA)rrfile=3Drecord.bin \ + $(QEMU_OPTS) memory) + +EXTRA_RUNS+=3Drun-memory-replay + # Running QEMU_OPTS+=3D-device isa-debugcon,chardev=3Doutput -device isa-debug-exit,= iobase=3D0xf4,iosize=3D0x4 -kernel --=20 2.39.2