|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH v1 2/7] sched: Remove dependency on __LINE__ for release builds
When using xsplice, use of __LINE__ can generate spurious changes in
functions due to embedded line numbers. For release builds, remove the
use of these line numbers in domain_crash*() and print the current text
address instead.
Signed-off-by: Ross Lagerwall <ross.lagerwall@xxxxxxxxxx>
---
xen/include/xen/sched.h | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/xen/include/xen/sched.h b/xen/include/xen/sched.h
index fe15e9c..b282671 100644
--- a/xen/include/xen/sched.h
+++ b/xen/include/xen/sched.h
@@ -611,20 +611,34 @@ void vcpu_end_shutdown_deferral(struct vcpu *v);
* from any processor.
*/
void __domain_crash(struct domain *d);
+#ifdef NDEBUG
+#define domain_crash(d) do { \
+ printk("domain_crash called from %p\n", current_text_addr()); \
+ __domain_crash(d); \
+} while (0)
+#else
#define domain_crash(d) do { \
printk("domain_crash called from %s:%d\n", __FILE__, __LINE__); \
__domain_crash(d); \
} while (0)
+#endif
/*
* Mark current domain as crashed and synchronously deschedule from the local
* processor. This function never returns.
*/
void noreturn __domain_crash_synchronous(void);
+#ifdef NDEBUG
+#define domain_crash_synchronous() do { \
+ printk("domain_crash_sync called from %p\n", current_text_addr()); \
+ __domain_crash_synchronous(); \
+} while (0)
+#else
#define domain_crash_synchronous() do { \
printk("domain_crash_sync called from %s:%d\n", __FILE__, __LINE__); \
__domain_crash_synchronous(); \
} while (0)
+#endif
/*
* Called from assembly code, with an optional address to help indicate why
--
2.4.3
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |