aboutsummaryrefslogtreecommitdiffstats
path: root/xen
diff options
context:
space:
mode:
authormwilli2@equilibrium.research.intel-research.net <mwilli2@equilibrium.research.intel-research.net>2004-05-11 17:04:48 +0000
committermwilli2@equilibrium.research.intel-research.net <mwilli2@equilibrium.research.intel-research.net>2004-05-11 17:04:48 +0000
commitc5c7615f281ee0a9ec2a5c9cadd2f49a73c565f4 (patch)
tree19b23e259e7202f46012cf95a032d51fb0ef96e6 /xen
parent1de448f4c54eac94a966d65e72b15bcbef3a7e5d (diff)
downloadxen-c5c7615f281ee0a9ec2a5c9cadd2f49a73c565f4.tar.gz
xen-c5c7615f281ee0a9ec2a5c9cadd2f49a73c565f4.tar.bz2
xen-c5c7615f281ee0a9ec2a5c9cadd2f49a73c565f4.zip
bitkeeper revision 1.891.3.1 (40a107b0xATyR-Pt7aENgr5O6ydSyA)
Improvements to trace buffer features.
Diffstat (limited to 'xen')
-rw-r--r--xen/arch/i386/setup.c3
-rw-r--r--xen/common/kernel.c3
-rw-r--r--xen/common/trace.c10
3 files changed, 11 insertions, 5 deletions
diff --git a/xen/arch/i386/setup.c b/xen/arch/i386/setup.c
index c9eccfeb1d..ebd68d3801 100644
--- a/xen/arch/i386/setup.c
+++ b/xen/arch/i386/setup.c
@@ -15,7 +15,6 @@
#include <asm/desc.h>
#include <asm/domain_page.h>
#include <asm/pdb.h>
-#include <xen/trace.h>
char ignore_irq13; /* set if exception 16 works */
struct cpuinfo_x86 boot_cpu_data = { 0, 0, 0, 0, -1, 1, 0, 0, -1 };
@@ -451,6 +450,4 @@ void __init start_of_day(void)
#endif
watchdog_on = 1;
-
- init_trace_bufs();
}
diff --git a/xen/common/kernel.c b/xen/common/kernel.c
index 0d5fa023a1..6cd567d601 100644
--- a/xen/common/kernel.c
+++ b/xen/common/kernel.c
@@ -31,6 +31,7 @@
#include <xen/console.h>
#include <xen/net_headers.h>
#include <xen/serial.h>
+#include <xen/trace.h>
kmem_cache_t *task_struct_cachep;
@@ -288,6 +289,8 @@ void cmain(unsigned long magic, multiboot_info_t *mbi)
add_to_domain_alloc_list(__pa(frame_table) + frame_table_size,
dom0_memory_start);
+ init_trace_bufs();
+
wake_up(new_dom);
startup_cpu_idle_loop();
diff --git a/xen/common/trace.c b/xen/common/trace.c
index 59cefadf9a..0140e7444a 100644
--- a/xen/common/trace.c
+++ b/xen/common/trace.c
@@ -53,6 +53,7 @@ void init_trace_bufs(void)
unsigned long nr_pages;
char *rawbuf;
struct t_buf *buf;
+ struct task_struct *dom0;
if ( opt_tbuf_size == 0 )
{
@@ -69,10 +70,15 @@ void init_trace_bufs(void)
return;
}
- /* share pages so that xentrace can map them */
+ /* Share pages so that xentrace can map them. */
+
+ dom0 = find_domain_by_id(0);
+
for( i = 0; i < nr_pages; i++)
- SHARE_PFN_WITH_DOMAIN(virt_to_page(rawbuf+(i*PAGE_SIZE)), 0);
+ SHARE_PFN_WITH_DOMAIN(virt_to_page(rawbuf+(i*PAGE_SIZE)), dom0);
+ put_task_struct(dom0);
+
for ( i = 0; i < smp_num_cpus; i++ )
{
buf = t_bufs[i] = (struct t_buf *)&rawbuf[i*opt_tbuf_size*PAGE_SIZE];