From nobody Fri Nov 7 12:57:27 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1538755602977796.5530041691926; Fri, 5 Oct 2018 09:06:42 -0700 (PDT) Received: from localhost ([::1]:35820 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g8Scj-0006zG-O6 for importer@patchew.org; Fri, 05 Oct 2018 12:06:41 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57105) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g8SMF-0006fL-FE for qemu-devel@nongnu.org; Fri, 05 Oct 2018 11:49:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g8SM9-0006F4-LU for qemu-devel@nongnu.org; Fri, 05 Oct 2018 11:49:39 -0400 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]:52743) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1g8SM9-00065z-76 for qemu-devel@nongnu.org; Fri, 05 Oct 2018 11:49:33 -0400 Received: by mail-wm1-x333.google.com with SMTP id 189-v6so2314139wmw.2 for ; Fri, 05 Oct 2018 08:49:25 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id h82-v6sm1675625wmf.14.2018.10.05.08.49.15 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 05 Oct 2018 08:49:20 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id 95B9F3E064A; Fri, 5 Oct 2018 16:49:11 +0100 (BST) 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=FZGK1pX/0lWiGdcNEkGvPFwvqa10Iu+WxjAabnC7X4I=; b=DHDRI1bvqoNhG6gDIDAvocvXUfX+gpqLHrSXs0aCxH5isB6/yF+FTsj1lV4mySyaDr jO6Yc7vDlfzinKueNEYpqFjxMS9g1nC+9CaO2KvlLEukmJ0RV/vF2qg6VEW9S2xqcEOD ITL33sB/Yw+mhwzv7OA3icK9+WkMNqUTuSUus= 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=FZGK1pX/0lWiGdcNEkGvPFwvqa10Iu+WxjAabnC7X4I=; b=P0NUifSVliPJTq/xceqLVeW5DMXLb+ml2ioT2FCRROg1p+TJbMk5vz3VIavHVwzf7i +URLO/EUX8l1/FDktVtaCACQfUt8r35RgG9U6mY8CJGgcETa//zFljR6cRTvvAD2DpDL iJwqDp1M1DzurnZHDHB158cL2h/npkbgHXLdD8HxqNrwKjkFYfHfOWQTGTPU/qAsV2YW aadWr62crmsWnlhigGru4P7EjJvpYcCyuFULhJsZFnhlcQzTGghLu+qYNacsgeIP3ocf fl3G4vo9tAe+PlLFFe8LmOrvVWLunTKu2zutfaNQUluZXzIRkL4e2EzN5wmDbna8zNsE GnEw== X-Gm-Message-State: ABuFfogZACwubf4tuSj5morGUH3FSDoKDYOZd351jH7nlasZ2cngoLpf 2/eJVN3ArD80hlNtEgNVUmXV3w== X-Google-Smtp-Source: ACcGV63T4XzHWTYewKx0BC2OwJr9foMfhJwuNJ4W2QlZCCofyRlss3aDqd0EAjAHYVcb1D3YzUEf2w== X-Received: by 2002:a1c:845:: with SMTP id 66-v6mr8845296wmi.61.1538754564760; Fri, 05 Oct 2018 08:49:24 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Date: Fri, 5 Oct 2018 16:49:00 +0100 Message-Id: <20181005154910.3099-12-alex.bennee@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181005154910.3099-1-alex.bennee@linaro.org> References: <20181005154910.3099-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::333 Subject: [Qemu-devel] [RFC PATCH 11/21] trace: expose a plugin fn pointer in TraceEvent 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: Stefan Hajnoczi , cota@braap.org, =?UTF-8?q?Alex=20Benn=C3=A9e?= , vilanova@ac.upc.edu, Pavel.Dovgaluk@ispras.ru Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDMRC_1 RDKM_2 RSF_0 Z_629925259 SPT_0 We'll need somewhere to stash this later. It's up to the generated code to do the funky casting to what it really is. Signed-off-by: Alex Benn=C3=A9e --- trace/control-internal.h | 6 ++++++ trace/event-internal.h | 3 +++ 2 files changed, 9 insertions(+) diff --git a/trace/control-internal.h b/trace/control-internal.h index c7fbe2d3bf..d734576948 100644 --- a/trace/control-internal.h +++ b/trace/control-internal.h @@ -80,6 +80,12 @@ static inline bool trace_event_get_vcpu_state_dynamic(CP= UState *vcpu, return trace_event_get_vcpu_state_dynamic_by_vcpu_id(vcpu, vcpu_id); } =20 +#ifdef CONFIG_TRACE_PLUGIN +static inline uintptr_t trace_event_get_plugin(TraceEvent *ev) +{ + return ev->plugin; +} +#endif =20 void trace_event_register_group(TraceEvent **events); =20 diff --git a/trace/event-internal.h b/trace/event-internal.h index 8ab3a29941..3895ee9883 100644 --- a/trace/event-internal.h +++ b/trace/event-internal.h @@ -38,6 +38,9 @@ typedef struct TraceEvent { const bool sstate; uint16_t *dstate; uint64_t count; +#ifdef CONFIG_TRACE_PLUGIN + uintptr_t plugin; +#endif } TraceEvent; =20 void trace_event_set_state_dynamic_init(TraceEvent *ev, bool state); --=20 2.17.1