From nobody Fri Apr 26 22:40:44 2024 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1560128664; cv=none; d=zoho.com; s=zohoarc; b=chjDN9GqoRNmcuXvL+OTuMyyvJm0WovXEp+Rr2/O6vfyho0a8CgXKH6BY7ChUbON0cK2Hizs03w4g2rzkFZUaJCQf7pr0YyyWLTOrQxNKTvdm08jvQPQwgI4bfPBR4y/inyJcl8IAkPk5HUCP8ENfhMRBn2GPGVGd+1o4r+DD1o= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1560128664; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To:ARC-Authentication-Results; bh=y1VGZhmmsTyfIcGr1/r1AWSds3+g8Yf3TQ+Pz05HLo0=; b=HDFAsuK+TSrF7w+wUMUX3nvS6cPtNf2IgWgb3hvi0YsyGh7KPoKeKZDQhsm2b9DBVuG+fPriBAmf9eYaxrDVVCYgrdmOM4+tN5ZdMMlonYXmkvOyQE5zaWi1a917SUxISgGPRaBOCgkZOFdQt4Jm5Xgs8Hm2F45YEPAIZsFHK0E= ARC-Authentication-Results: i=1; mx.zoho.com; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1560128664662633.3838872406759; Sun, 9 Jun 2019 18:04:24 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1ha8iU-0003QR-F6; Mon, 10 Jun 2019 01:03:18 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1ha8iT-0003QJ-93 for xen-devel@lists.xenproject.org; Mon, 10 Jun 2019 01:03:17 +0000 Received: from mxnavi-mail.mxnavi.com (unknown [116.90.87.199]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 8455306e-8b1b-11e9-bf86-f76a39bc58d7; Mon, 10 Jun 2019 01:03:13 +0000 (UTC) Received: from localhost.localdomain (61.161.186.150) by mxnavi-mail.mxnavi.com (116.90.87.199) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1591.10; Mon, 10 Jun 2019 08:59:57 +0800 X-Inumbo-ID: 8455306e-8b1b-11e9-bf86-f76a39bc58d7 From: Baodong Chen To: Date: Mon, 10 Jun 2019 09:01:55 +0800 Message-ID: <1560128515-20347-1-git-send-email-chenbaodong@mxnavi.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 X-Originating-IP: [61.161.186.150] X-ClientProxiedBy: mxnavi-mail.mxnavi.com (116.90.87.199) To mxnavi-mail.mxnavi.com (116.90.87.199) Subject: [Xen-devel] [PATCH v4] xen: make tracebuffer configurable X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Stefano Stabellini , Wei Liu , Konrad Rzeszutek Wilk , George Dunlap , Andrew Cooper , Ian Jackson , Tim Deegan , Julien Grall , Jan Beulich , Baodong Chen Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" Xen internal running status(trace event at pre-defined trace point) will be saved to trace memory when enabled. Trace event data and config params can be read/changed by system control hypercall at run time. Can be disabled for smaller code footprint. Signed-off-by: Baodong Chen Acked-by: George Dunlap #include #include =20 +#ifdef CONFIG_TRACEBUFFER /* Used to initialise trace buffer functionality */ void init_trace_bufs(void); =20 @@ -47,6 +53,26 @@ static inline void trace_var(u32 event, int cycles, int = extra, void __trace_hypercall(uint32_t event, unsigned long op, const xen_ulong_t *args); =20 +#else +static inline void init_trace_bufs(void) {} +static inline int tb_control(struct xen_sysctl_tbuf_op *tbc) +{ + return -ENOSYS; +} + +static inline int trace_will_trace_event(uint32_t event) +{ + return 0; +} + +static inline void trace_var(uint32_t event, int cycles, int extra, + const void *extra_data) {} +static inline void __trace_var(uint32_t event, bool cycles, unsigned int e= xtra, + const void *extra_data) {} +static inline void __trace_hypercall(uint32_t event, unsigned long op, + const xen_ulong_t *args) {} +#endif + /* Convenience macros for calling the trace function. */ #define TRACE_0D(_e) \ do { \ --=20 2.7.4 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel