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

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


  • To: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
  • 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
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>
  • 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

 


Rackspace

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