Skip to contentSkip to conversation

xentrace: broken by c/s 23050:4ebba54b666f

DISCUSSION Christoph Egger 2 participants 5 messages Mar 21, 2011 – Mar 23, 2011

lore
Share & tools
lore
#0 lore raw

Hi,

C/s 23050:4ebba54b666f broke xentrace:

# xentrace -e 0x8f000 ./xentrace.out
(XEN) Xen trace buffers: cpu 0 p 0000000000000000
(XEN) Xen trace buffers: cpu 1 p 0000000000000000
(XEN) Xen trace buffers: cpu 2 p 0000000000000000
(XEN) Xen trace buffers: cpu 3 p 0000000000000000
(XEN) Xen trace buffers: cpu 4 p 0000000000000000
(XEN) Xen trace buffers: cpu 5 p 0000000000000000
(XEN) Xen trace buffers: cpu 6 p 0000000000000000
(XEN) Xen trace buffers: cpu 7 p 0000000000000000
(XEN) Xen trace buffers: allocation failed! Tracing disabled.
Couldn't enable trace buffers: Invalid argument
#

Christoph

Signature · 6 lines
---to satisfy European Law for business letters:
Advanced Micro Devices GmbH
Einsteinring 24, 85689 Dornach b. Muenchen
Geschaeftsfuehrer: Alberto Bozzo, Andrew Bowd
Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen
Registergericht Muenchen, HRB Nr. 43632
#1 lore raw
Quoted 7 lines · Christoph Egger

Hi,

C/s 23050:4ebba54b666f broke xentrace:

# xentrace -e 0x8f000 ./xentrace.out
(XEN) Xen trace buffers: cpu 0 p 0000000000000000

The system you test on has 8 cpus, like mine. t_info_pages got too big, so alloc_xenheap_pages() failed. Can you add a printk to se whats happening in calculate_tbuf_size()?

Olaf

#2 lore raw
Quoted 5 lines · Olaf Hering
Quoted 3 lines · Christoph Egger

Hi,

Quoted 8 lines
Quoted 4 lines

C/s 23050:4ebba54b666f broke xentrace:

# xentrace -e 0x8f000 ./xentrace.out
(XEN) Xen trace buffers: cpu 0 p 0000000000000000

The system you test on has 8 cpus, like mine. t_info_pages got too big, so alloc_xenheap_pages() failed. Can you add a printk to se whats happening in calculate_tbuf_size()?

compile tested patch:

# HG changeset patch
# Parent c81f0ef5a77d90fbf108d3efe489d08df45b63c2
xentrace: print calculated numbers in calculate_tbuf_size()

Print number of pages to allocate for per-cpu tracebuffer and metadata to ease debugging when allocation fails.

xen/common/trace.c +2 -0
diff -r c81f0ef5a77d xen/common/trace.c
@@ -127,6 +127,8 @@
     t_info_pages /= PAGE_SIZE;
     if ( t_info_pages % PAGE_SIZE )
         t_info_pages++;
+    gdprintk(XENLOG_INFO, "requested %u t_info_pages for %u trace pages on %u cpus\n",
+               t_info_pages, pages, num_online_cpus());
     return pages;
 }
#3 lore raw
Quoted 18 lines · Olaf Hering
Quoted 5 lines · Olaf Hering
Quoted 3 lines · Christoph Egger

Hi,

Quoted 8 lines
Quoted 4 lines

C/s 23050:4ebba54b666f broke xentrace:

# xentrace -e 0x8f000 ./xentrace.out
(XEN) Xen trace buffers: cpu 0 p 0000000000000000

The system you test on has 8 cpus, like mine. t_info_pages got too big, so alloc_xenheap_pages() failed. Can you add a printk to se whats happening in calculate_tbuf_size()?

compile tested patch:

xen/common/trace.c line 131

Quoted 2 lines
xen/common/trace.c +2 -0
+    gdprintk(XENLOG_INFO, "requested %u t_info_pages for %u trace pages on %u cpus\n",
+               t_info_pages, pages, num_online_cpus());

I can reproduce it now. For some reason the line above will print nothing. A plain printk gives:

(XEN) requested 0 t_info_pages for 32 trace pages on 8 cpus

I will investigate.

Olaf

#4 lore raw
In reply to Christoph Egger
Quoted 1 line · Christoph Egger

C/s 23050:4ebba54b666f broke xentrace:

Christoph, I sent a series of xentrace patches yesterday. The first one which checks for t_info_pages becoming zero should fix the issue you are seeing.

Olaf