aboutsummaryrefslogtreecommitdiffstats
path: root/xen/include/public/trace.h
diff options
context:
space:
mode:
Diffstat (limited to 'xen/include/public/trace.h')
-rw-r--r--xen/include/public/trace.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/xen/include/public/trace.h b/xen/include/public/trace.h
new file mode 100644
index 0000000000..5e7904d52a
--- /dev/null
+++ b/xen/include/public/trace.h
@@ -0,0 +1,31 @@
+/******************************************************************************
+ * trace.h
+ */
+
+#ifndef __XEN_PUBLIC_TRACE_H__
+#define __XEN_PUBLIC_TRACE_H__
+
+/* This structure represents a single trace buffer record. */
+struct t_rec {
+ u64 cycles; /* 64 bit cycle counter timestamp */
+ u32 event; /* 32 bit event ID */
+ u32 d1, d2, d3, d4, d5; /* event data items */
+};
+
+/*
+ * This structure contains the metadata for a single trace buffer. The head
+ * field, indexes into an array of struct t_rec's.
+ */
+struct t_buf {
+ unsigned long data; /* pointer to data area. machine address
+ * for convenience in user space code */
+
+ unsigned long size; /* size of the data area, in t_recs */
+ unsigned long head; /* array index of the most recent record */
+
+ /* Xen-private elements follow... */
+ struct t_rec *head_ptr; /* pointer to the head record */
+ struct t_rec *vdata; /* virtual address pointer to data */
+};
+
+#endif /* __XEN_PUBLIC_TRACE_H__ */