aboutsummaryrefslogtreecommitdiffstats
path: root/xen/common/trace.c
diff options
context:
space:
mode:
authorKeir Fraser <keir@xen.org>2011-04-06 15:52:50 +0100
committerKeir Fraser <keir@xen.org>2011-04-06 15:52:50 +0100
commite15c160c0f6ee65e0160826d8a3987a65ccfa9ec (patch)
tree63d428f29490aa7112e9c7ea36dc6ed82702b536 /xen/common/trace.c
parent620ce29a2d454c131498aebbc927510c63592735 (diff)
downloadxen-e15c160c0f6ee65e0160826d8a3987a65ccfa9ec.tar.gz
xen-e15c160c0f6ee65e0160826d8a3987a65ccfa9ec.tar.bz2
xen-e15c160c0f6ee65e0160826d8a3987a65ccfa9ec.zip
xentrace: Move register_cpu_notifier() call into boot-time init.
We can't do it lazily from alloc_trace_bufs() as that gets called later if tracing is enabled later by dom0. Signed-off-by: Keir Fraser <keir@xen.org>
Diffstat (limited to 'xen/common/trace.c')
-rw-r--r--xen/common/trace.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/xen/common/trace.c b/xen/common/trace.c
index 4225f0413f..373a3dc022 100644
--- a/xen/common/trace.c
+++ b/xen/common/trace.c
@@ -225,8 +225,6 @@ static int alloc_trace_bufs(unsigned int pages)
t_buf_highwater = data_size >> 1; /* 50% high water */
opt_tbuf_size = pages;
- register_cpu_notifier(&cpu_nfb);
-
printk("xentrace: initialised\n");
wmb(); /* above must be visible before tb_init_done flag set */
tb_init_done = 1;
@@ -309,6 +307,8 @@ int trace_will_trace_event(u32 event)
*/
void __init init_trace_bufs(void)
{
+ register_cpu_notifier(&cpu_nfb);
+
if ( opt_tbuf_size && alloc_trace_bufs(opt_tbuf_size) )
{
printk(XENLOG_INFO "xentrace: allocation size %d failed, disabling\n",