7 Mathieu Desnoyers, November 2006
11 Only allow a single channel. Directory consumed by a lttd-xen client through
12 hypercalls. This design choice is made because there are no RCU lists and there
13 is no link between the number of CPUs seen by Xen and number of CPUs in the
16 Does better than Xentrace :
18 Easily extensible event description
19 // not planned : missing RCU list. Multiple active traces
20 Reader uses poll()-like mechanism instead of polling the buffers each 100ms.
23 * Dom0 lttd-xen process
25 Does an hypercall to map the buffers (increment refcount)
26 Does an hypercall to poll for data, put to sleep by the OS.
27 Uses write from the mapped buffers to a file.
28 unmap buffer, decrement refcount.
33 tb_control (hypercalls seen from dom0 OS)
34 (hypercalls done by lttctl-xen)
36 Map a page for control information, return it for mapping by user space. (rw)
37 Map multiple pages for buffers. return them for mapping by user space.
38 (shared, read-only for consumer)
41 Activate tracing in control information.
43 Stop tracing in control information.
45 wait for pending writers (is the hypervisor preemptible ? not full.)
46 Preemption : not full -> spinlock does not disable preemption : would deadlock
47 for the non irq_disable case.
48 volountary : poll call -> volountary. explicit __schedule call., do_yield().
49 Quiescent state detection.
53 decrement refcount : destroy the channels
55 Events coming from xen :
57 through virq sent to dom0
58 - wakes up poll on the buffers FD.
63 Receive virq upon buffer switch.
64 xen_wakeup_readers handler : wakes up the readers for the channel.
66 Hypercalls are autonomous from LTTng linux kernel tracing.
68 on lttngxentrace create, hypercall channel_create
69 on lttngxentrace start, hypercall channel_start
70 on lttngxentrace stop, hypercall channel_stop
71 on lttngxentrace destroy, hypercall channel_destroy
76 Export a facilities per cpu channel too.
79 Q1 : In Xen preemptible ? Full ? Volountary ? Volountary X
80 Q2 : How to synchronize to wait for writers to finish writing ? X
83 Number of CPUs in dom0 != number of CPUs in Xen.
84 CPU hotplug in kernel tracing ? Done.