[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH v1] xen/trace: remove trace_will_trace_event


  • To: xen-devel@xxxxxxxxxxxxxxxxxxxx
  • From: Olaf Hering <olaf@xxxxxxxxx>
  • Date: Mon, 19 Jun 2023 14:18:17 +0200
  • Arc-authentication-results: i=1; strato.com; arc=none; dkim=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1687177102; s=strato-dkim-0002; d=strato.com; h=Message-Id:Date:Subject:Cc:To:From:Cc:Date:From:Subject:Sender; bh=x9mJuvJNsXsFr6EcOYezPM8ioU1HxGzJYO7MRAPHFMY=; b=qyKFZZZD7x84hNj4IFMrmZcfw+gP8IqmcDa3XSQJ+xFIEAY/uLxsAWED8ZM4Bs+WF+ qjoLPyj6xBDl6tsGbzkTGBxOW8wREau/1+c+T8B7SGvU4rkCrUYpNBksdvbAj//zopIV +zfQYBsvOIj2oqVuRnI1Ivu5UqIzQ21CtdmNix660HOLtpiiJ3Qn7dxD/TkoBiXGLKMd bF99bDDOwLhlIC2RZ6v3wxwUTv8N7u5GVIgChZKCBInoQrCXNlw0aGXhDSoPGs3KEVl7 btpGxqLdca/0ERD7FEAVC5VB8yMBHea+gVyZwCmMl/amOmJ72rwgq/RAs7B7dANbgJ/r 26pQ==
  • Arc-seal: i=1; a=rsa-sha256; t=1687177102; cv=none; d=strato.com; s=strato-dkim-0002; b=GEvz2mpLLnHR6omjJAtqvkteo3y2s2MoAxDETwoBDzZXuNyW3+R+YYw0s/hcLOF5Lh kqUatZA+7NcRwWvZk5+0xFHH6KgQhNP6F0VTBLkA0NW2bWRxAvdkxqaAlPVUu+CA/QRL L6CtCuVyVw6JWbtOXvdFWZWDw/RuKHWE4DEHiIjsi93jrKI5jL16MycZcewIuzvRaZWG 3izzaPBnuyjRncJKrLDGA6R8RUVD3xweH4c3gZq7uP1Xh5ANR85O3MRuNi0zIQtH1gnj ALAavAbpBwJ7hVh33ehBHY7nL7CHWODcLRLZOXrwKo68MwuQtLEAhswbPSLvtommHr/i ktKw==
  • Cc: Jan Beulich <jbeulich@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Jun Nakajima <jun.nakajima@xxxxxxxxx>, Kevin Tian <kevin.tian@xxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>
  • Delivery-date: Mon, 19 Jun 2023 12:19:04 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

There are just two callers of this function. It is identical to the
checks done in __trace_var.
The commit message of 9a86ac1aa3d2ebe1be05dc7fe78dd6759aa3241d
("xentrace 5/7: Additional tracing for the shadow code.") gives no
indication what the benefit of this function is.

Signed-off-by: Olaf Hering <olaf@xxxxxxxxx>
---
 xen/arch/x86/hvm/svm/svm.c |  2 --
 xen/arch/x86/hvm/vmx/vmx.c |  2 --
 xen/common/trace.c         | 26 --------------------------
 xen/include/xen/trace.h    |  2 --
 4 files changed, 32 deletions(-)

diff --git a/xen/arch/x86/hvm/svm/svm.c b/xen/arch/x86/hvm/svm/svm.c
index 59a6e88dff..c10d0015e8 100644
--- a/xen/arch/x86/hvm/svm/svm.c
+++ b/xen/arch/x86/hvm/svm/svm.c
@@ -2812,8 +2812,6 @@ void svm_vmexit_handler(void)
 
         if ( rc )
         {
-            if ( trace_will_trace_event(TRC_SHADOW) )
-                break;
             if ( hvm_long_mode_active(v) )
                 HVMTRACE_LONG_2D(PF_XEN, regs->error_code, TRC_PAR_LONG(va));
             else
diff --git a/xen/arch/x86/hvm/vmx/vmx.c b/xen/arch/x86/hvm/vmx/vmx.c
index 40767b94c3..08dd297cae 100644
--- a/xen/arch/x86/hvm/vmx/vmx.c
+++ b/xen/arch/x86/hvm/vmx/vmx.c
@@ -4352,8 +4352,6 @@ void vmx_vmexit_handler(struct cpu_user_regs *regs)
 
             if ( paging_fault(exit_qualification, regs) )
             {
-                if ( trace_will_trace_event(TRC_SHADOW) )
-                    break;
                 if ( hvm_long_mode_active(v) )
                     HVMTRACE_LONG_2D(PF_XEN, regs->error_code,
                                      TRC_PAR_LONG(exit_qualification) );
diff --git a/xen/common/trace.c b/xen/common/trace.c
index 77f8ce0ce5..60db45104e 100644
--- a/xen/common/trace.c
+++ b/xen/common/trace.c
@@ -308,32 +308,6 @@ static int tb_set_size(unsigned int pages)
     return alloc_trace_bufs(pages);
 }
 
-int trace_will_trace_event(u32 event)
-{
-    if ( !tb_init_done )
-        return 0;
-
-    /*
-     * Copied from __trace_var()
-     */
-    if ( (tb_event_mask & event) == 0 )
-        return 0;
-
-    /* match class */
-    if ( ((tb_event_mask >> TRC_CLS_SHIFT) & (event >> TRC_CLS_SHIFT)) == 0 )
-        return 0;
-
-    /* then match subclass */
-    if ( (((tb_event_mask >> TRC_SUBCLS_SHIFT) & 0xf )
-                & ((event >> TRC_SUBCLS_SHIFT) & 0xf )) == 0 )
-        return 0;
-
-    if ( !cpumask_test_cpu(smp_processor_id(), &tb_cpu_mask) )
-        return 0;
-
-    return 1;
-}
-
 /**
  * init_trace_bufs - performs initialization of the per-cpu trace buffers.
  *
diff --git a/xen/include/xen/trace.h b/xen/include/xen/trace.h
index 055883287e..6e9f80dd94 100644
--- a/xen/include/xen/trace.h
+++ b/xen/include/xen/trace.h
@@ -35,8 +35,6 @@ void init_trace_bufs(void);
 /* used to retrieve the physical address of the trace buffers */
 int tb_control(struct xen_sysctl_tbuf_op *tbc);
 
-int trace_will_trace_event(u32 event);
-
 void __trace_var(uint32_t event, bool cycles, unsigned int extra, const void 
*);
 
 static inline void trace_var(uint32_t event, bool cycles, unsigned int extra,



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.