From patchwork Wed Mar 17 07:22:11 2021 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: 403038 Delivered-To: patch@linaro.org Received: by 2002:a02:8562:0:0:0:0:0 with SMTP id g89csp232606jai; Wed, 17 Mar 2021 00:28:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxhuqjstWR6fT4howEZ2L4dTXBa1373qjPrR7HH2hRzBR+f8TyLUiKBsLUwIa+zsX8ECwog X-Received: by 2002:a25:e810:: with SMTP id k16mr2648074ybd.126.1615966111301; Wed, 17 Mar 2021 00:28:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615966111; cv=none; d=google.com; s=arc-20160816; b=p+SzTx41x9punIJ0duUV/mZnue7KVXjOrk9UT9nSkOzmCP4b+iuq1oMpxfM9RhhM4u p5iW5NQ+I4TM2p/IOQpdAntwvHt8EO9DRb0wMOQrRE6zvnUPmNBgiQlvTrrIAPTPPZd4 jil0HvjGYLbvV1PwBOgzosaJ5Iw2kaTsXHVq+pT2mAlfQ5rT+has1uEy/dye76xMwGnE vVhjLAcYyJ76GlM2fk50Noknt80MVXT63zoeKBnF6Y97+FBCiBnhyddqBms+QUYTnmpf yBajLQ3fPuJIlVmGs4rwXzuxdW0t/FkkR1Brd3U1oioVjTYbhLiki/4h/keZl+82Lk6N AIAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc: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:to:from :dkim-signature; bh=rQc1qB+dj1Aep27H7tyCH6v/LAf+f1B6hR9k7rulrqQ=; b=ahWF93QBgIqrex6W9KZ4JioN4cc+FnomYoJQ8JKrR07PUvS0GC+pnrWMiouc7LA1y3 BiMZZrpj1gj+i2FCFYAbFrFAmaZeDYc9s6r91cPaHDgqQLh2KgRPzCEJ0O24Ci1+ySrD LEGRJ95hbf4S5vgWeQmFyl8z2+NdUIse7UMY6UG8+czpZHc1yZnSuALeqN91Uly5vlJ3 VKj/hwPe8r73G1o6fAQl9mlGI/FwSW4MT8GnQqsKRFADr13gruqP2Kmc9mhLMgqOkpz4 froRabHw/t4v17KADV0uRPpUC+45jAiMHeYjRAl2lId8q/T/kt55hAmICUCqq+yUGvpv kMBA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=B8zu3exm; 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=fail (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 j4si18131981ybc.203.2021.03.17.00.28.31 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 17 Mar 2021 00:28:31 -0700 (PDT) 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=fail header.i=@linaro.org header.s=google header.b=B8zu3exm; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:46626 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lMQbW-0003s7-Oz for patch@linaro.org; Wed, 17 Mar 2021 03:28:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44318) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lMQVr-0003wO-10 for qemu-devel@nongnu.org; Wed, 17 Mar 2021 03:22:39 -0400 Received: from mail-ed1-x530.google.com ([2a00:1450:4864:20::530]:40929) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lMQVo-0007zV-Ed for qemu-devel@nongnu.org; Wed, 17 Mar 2021 03:22:38 -0400 Received: by mail-ed1-x530.google.com with SMTP id b16so977850eds.7 for ; Wed, 17 Mar 2021 00:22:36 -0700 (PDT) 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=rQc1qB+dj1Aep27H7tyCH6v/LAf+f1B6hR9k7rulrqQ=; b=B8zu3exmsDI27bxT/ZQdAn2bvvSL81LymVUnEUr8oOWiLHZWkxMhARDhD//mMIO5Mj nhLT27cC2gaiq8YmzZ7P+ds+eiwC9BkS0ftukDbPZQEe4ThIRmrn/fO4qllEManRJ8nL VcocpmUPibYF9c6y+/VZy2kFuoBku7ePIz2EDUfnfN/mGvRMhf13R32y1k3qOYHdZJFy tYNJ+yPvTXyg8hrfjeMv4PhDfZa6qaAyD8gReehvodfKDlgDodvnSoD8HOZ2+P0kHGAH xWg56ObmhpeYMnKn43IIOx0gBvwX48tyrEN/wwcB90SaDOUb8Ire6w1X0Pm8vutHU68E wjrA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=rQc1qB+dj1Aep27H7tyCH6v/LAf+f1B6hR9k7rulrqQ=; b=MDX99z9Hpt3LS6zVopKvegD+wjp4kNOhyTXunlHoLxm+m7usK6V5MBpDvRh8QOgQ8z /vjzyGVpJnO0K2+UQimNEw2l7tvzcMCImBwReGrfcZ2JJ5RehV7r2dw0mU1qHLisJ1Ma i1Tcpw3KBbQzH9rBZxzTyecGcVnQzTaI6U29Yc31WBF545VpKNz4JuMzSfFGR1Pzz1zd +5dnLe3AT7ZvOFZBdN7qD7u/TNVSZEbLnCMfVoUjnp5RR2hXj7F8gyiZngirCDvnoXyS aJnHynALuCBRt3FfAD/BZXzzAyr1rEIxd1Tbv2h0rPGkL7wIFm0A9iiZffrOBKsnkF2Y nbKg== X-Gm-Message-State: AOAM533xPYvxQhWDp05UArHS9ld8xuhI/6tkt4Rl6ZIkwnuGT4Il5brm HZaiw/HKL6yG/gAWGvnxPUWksg== X-Received: by 2002:a05:6402:48c:: with SMTP id k12mr40595149edv.237.1615965755118; Wed, 17 Mar 2021 00:22:35 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id v1sm10347142ejd.3.2021.03.17.00.22.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Mar 2021 00:22:29 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 8CBE91FF99; Wed, 17 Mar 2021 07:22:17 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL v2 10/15] plugins: expand inline exec kernel-doc documentation. Date: Wed, 17 Mar 2021 07:22:11 +0000 Message-Id: <20210317072216.16316-11-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210317072216.16316-1-alex.bennee@linaro.org> References: <20210317072216.16316-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::530; envelope-from=alex.bennee@linaro.org; helo=mail-ed1-x530.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 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Remove the extraneous @cb parameter and document the non-atomic nature of the INLINE_ADD_U64 operation. Signed-off-by: Alex Bennée Message-Id: <20210312172821.31647-11-alex.bennee@linaro.org> -- 2.20.1 diff --git a/include/qemu/qemu-plugin.h b/include/qemu/qemu-plugin.h index 272d240a8f..a3805bb299 100644 --- a/include/qemu/qemu-plugin.h +++ b/include/qemu/qemu-plugin.h @@ -269,6 +269,14 @@ void qemu_plugin_register_vcpu_tb_exec_cb(struct qemu_plugin_tb *tb, enum qemu_plugin_cb_flags flags, void *userdata); +/** + * enum qemu_plugin_op - describes an inline op + * + * @QEMU_PLUGIN_INLINE_ADD_U64: add an immediate value uint64_t + * + * Note: currently only a single inline op is supported. + */ + enum qemu_plugin_op { QEMU_PLUGIN_INLINE_ADD_U64, }; @@ -283,6 +291,9 @@ enum qemu_plugin_op { * Insert an inline op to every time a translated unit executes. * Useful if you just want to increment a single counter somewhere in * memory. + * + * Note: ops are not atomic so in multi-threaded/multi-smp situations + * you will get inexact results. */ void qemu_plugin_register_vcpu_tb_exec_inline(struct qemu_plugin_tb *tb, enum qemu_plugin_op op, @@ -305,7 +316,6 @@ void qemu_plugin_register_vcpu_insn_exec_cb(struct qemu_plugin_insn *insn, /** * qemu_plugin_register_vcpu_insn_exec_inline() - insn execution inline op * @insn: the opaque qemu_plugin_insn handle for an instruction - * @cb: callback function * @op: the type of qemu_plugin_op (e.g. ADD_U64) * @ptr: the target memory location for the op * @imm: the op data (e.g. 1)