From patchwork Mon Jan 8 15:13:46 2024 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: 760767 Delivered-To: patch@linaro.org Received: by 2002:a5d:6e02:0:b0:337:62d3:c6d5 with SMTP id h2csp935338wrz; Mon, 8 Jan 2024 07:14:38 -0800 (PST) X-Google-Smtp-Source: AGHT+IFifOaFMSj9N9uY01fFTqrMyOpfjrEPUYyNVM1nYMMKO2m45SIiMuAyqLTSEBPhlrSH2wr4 X-Received: by 2002:a05:620a:288f:b0:781:a645:8a24 with SMTP id j15-20020a05620a288f00b00781a6458a24mr9642430qkp.55.1704726878162; Mon, 08 Jan 2024 07:14:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704726878; cv=none; d=google.com; s=arc-20160816; b=ps18YiB4h5WIdFSkRYXTb2uIyqvnLO+Th/KDMfZ6QdpZjkDLSa2fA+3WefuNH0a9lc i+hqVSHq7CQVt6/QtXuNtfAtdSRyvVOVqnNdlVieU0e8i2VM1EZNC77CPAILlq0GreoM IoGmFRzfJLUsky+aF2yRPxqg6+rm2unzc9R/7mqtj9u36ITfhRpp3QsQ/lWZ1zx6N3ET nHszLxKHm1BPdjdOx7WBCbKv2WR5vFGw9+x0/tBmVa3WfYuVzyj2ZoMD+7DaLjsbP10t YCALFN1hihOBbFA9cH3ZwVSyzOpdBht0+RFJ1wc7Mn2tJzue160hcv0gXquZyJrOmLsD YaQQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=sGtlVmj/cLSRItSFI6o6Pd2FVVc8E9gmG7YjPACLCW8=; fh=bjKFmQKxNnC3SfFt2fSIy5ygbVRALQM+QebBlFG0Z4Y=; b=QFFacmH25FVsRqk4rsHtMj7NbBALY2oOz2hy8rM1Zwjf7iGV/hh21rnd7LeBA7jJ4Z 5h9+4L5eN7c7dvvHwcfJhMngFwPHxJxHLzm1sJt1A3HcaxsRYumTQT2gfFOTdWcFatTb Asf6iiniRUIyLIsKMLqSSZPZilfZ2g2j7qtU6MmmzEM/ZtdYle0rBQsyrCAtVAoSL2Kt sIWGdXYqbJolTcrHV9EXkE48aAwUVWG3s8WEv9kUU9v4k+J82L2Lwa/fJJERP8JxiWDX frqDVd8iw7h2dwDesy9KBHSkA/UeaxZxuoEW/NCR5WbV0OnQjzuJ5GuAe+bOU28NNl0c nJFg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=jPRLjZp3; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id da1-20020a05620a360100b0078306193918si7651561qkb.532.2024.01.08.07.14.38 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 08 Jan 2024 07:14:38 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=jPRLjZp3; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rMrKP-0004LU-4H; Mon, 08 Jan 2024 10:14:13 -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 1rMrKO-0004Jx-0D for qemu-devel@nongnu.org; Mon, 08 Jan 2024 10:14:12 -0500 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rMrKA-0001Yf-TN for qemu-devel@nongnu.org; Mon, 08 Jan 2024 10:14:11 -0500 Received: by mail-wm1-x330.google.com with SMTP id 5b1f17b1804b1-40d87df95ddso21231725e9.0 for ; Mon, 08 Jan 2024 07:13:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1704726837; x=1705331637; 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=sGtlVmj/cLSRItSFI6o6Pd2FVVc8E9gmG7YjPACLCW8=; b=jPRLjZp3PetcpyNYsqbZve+HKDNZynXGDxa1QO7/T++T5HTUYpnndHHxndk8UPquUN RlcxaeKjOC3R651AtOSsuWRZTEmfxs+SWPUrNy+cgshaj3a439+PA/uuOz6cK3hufso3 to6kXPSjaQCC5e1rdBMBRNGe3Rv6i7SkmW0Zo5SpN5UXbJNrBAQrmfPC1eZL1zbA0NxA yiaXARki24AjlQrgB1QD8bJ846/bWS6aAetc5kkSSLWGcrJ/Ap16y92VKbvfmny+ggOX lsydc9uI3kBG4eiFUmsMvIz18d8H6uwTRl8QZZvXJauQvASOj5XJBkif3uwMSL9dZLaL h91g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704726837; x=1705331637; 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=sGtlVmj/cLSRItSFI6o6Pd2FVVc8E9gmG7YjPACLCW8=; b=puUhRB7b7j+5nRGLHJ6ErYhwqcpfilozj+iq7GhD9oHfM6YuwLcZUSymVv77k8vTRP hm4l2xdXzwNW5+RhXk6PAfZ3igIItlAGdhmEbkXpDikc7rX/h/RSiE9pBtt3pkQCzaes rXgBw0uuMy3Qpubk6LCnWvOj6Aslp0Ettb7IaZaoPtJylc9Q8DAc1ASitNP1WvNqzVYP gqnWQJORl7iRjqXxB7KTan8vbIrEielhmmfRFxyo7OFD5PVCF3y013DiK0WUcshzbVzY D7+vVlEK2hkcG6d980UrcsXUqVa1v0acM4NE2R9Mlp29vtO/Y46FGlWZzmFYIKWWpB9h TglA== X-Gm-Message-State: AOJu0Yx/boptH2Us+anGn4TyuEhQTwwzdrDan9AGMLGIyF+U3Y34V44z HuaK66lvyzmF4nMLmCgUapBtOTxpJRHqMA== X-Received: by 2002:a05:600c:1f16:b0:40e:4239:5075 with SMTP id bd22-20020a05600c1f1600b0040e42395075mr876947wmb.364.1704726836992; Mon, 08 Jan 2024 07:13:56 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id u2-20020a7bc042000000b0040d79997731sm5233915wmc.0.2024.01.08.07.13.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Jan 2024 07:13:56 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 775185F949; Mon, 8 Jan 2024 15:13:53 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , Pavel Dovgalyuk , =?utf-8?q?Philippe_Mathieu-Dau?= =?utf-8?q?d=C3=A9?= , Pavel Dovgalyuk , Paolo Bonzini Subject: [PULL 07/13] replay: add proper kdoc for ReplayState Date: Mon, 8 Jan 2024 15:13:46 +0000 Message-Id: <20240108151352.2199097-8-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240108151352.2199097-1-alex.bennee@linaro.org> References: <20240108151352.2199097-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::330; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x330.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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Remove the non-standard comment formatting and move the descriptions into a proper kdoc comment. Reviewed-by: Pavel Dovgalyuk Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Alex Bennée Message-Id: <20231211091346.14616-8-alex.bennee@linaro.org> diff --git a/replay/replay-internal.h b/replay/replay-internal.h index 516147ddbca..98ca3748edb 100644 --- a/replay/replay-internal.h +++ b/replay/replay-internal.h @@ -63,24 +63,31 @@ enum ReplayEvents { EVENT_COUNT }; +/** + * 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;