WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [RFC][PATCH] eliminate extra tb_init_done check

To: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [RFC][PATCH] eliminate extra tb_init_done check
From: "Lu, Guanqun" <guanqun.lu@xxxxxxxxx>
Date: Wed, 15 Oct 2008 14:20:31 +0800
Accept-language: en-US
Acceptlanguage: en-US
Delivery-date: Tue, 14 Oct 2008 23:23:55 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: Ackujh/1zJ1t6mC1QvuJDyrbjliW1w==
Thread-topic: [RFC][PATCH] eliminate extra tb_init_done check
Hi,

As c/s 18441 does the following changes:
-    ASSERT(tb_init_done);
+    if( !tb_init_done )
+        return;
in the function __trace_var in the file xen/common/trace.c.
We don't need to check the variable tb_init_done before we invoke __trace_var.

This patch simplies such logic:
        if ( tb_init_done )
                __trace_var(...)

to
        __trace_var(...)
.

Two corner conditions are left untouched. One is the assembly in entry.S,
the other is the check of tb_init_done not immediately followed by __trace_var.

Or more aggressively, we can eliminate all the extra checks, make tb_init_done
a static variable, and rename __trace_var to trace_var which looks more like
a right interface name.


--
Guanqun

Attachment: eliminate-extra-tb_init_done-check.patch
Description: eliminate-extra-tb_init_done-check.patch

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>