2 * Copyright (C) 2005,2006 Mathieu Desnoyers (mathieu.desnoyers@polymtl.ca)
4 * This contains the core definitions for the Linux Trace Toolkit.
6 * Dual LGPL v2.1/GPL v2 license.
9 #ifndef LTT_TRACER_CORE_H
10 #define LTT_TRACER_CORE_H
12 #include <linux/list.h>
13 #include <linux/percpu.h>
14 #include <linux/ltt-core.h>
16 /* ltt's root dir in debugfs */
17 #define LTT_ROOT "ltt"
20 * All modifications of ltt_traces must be done by ltt-tracer.c, while holding
21 * the semaphore. Only reading of this information can be done elsewhere, with
22 * the RCU mechanism : the preemption must be disabled while reading the
26 struct list_head setup_head
; /* Pre-allocated traces list */
27 struct list_head head
; /* Allocated Traces list */
28 unsigned int num_active_traces
; /* Number of active traces */
29 } ____cacheline_aligned
;
31 extern struct ltt_traces ltt_traces
;
34 * get dentry of ltt's root dir
36 struct dentry
*get_ltt_root(void);
38 void put_ltt_root(void);
40 /* Keep track of trap nesting inside LTT */
41 DECLARE_PER_CPU(unsigned int, ltt_nesting
);
43 typedef int (*ltt_run_filter_functor
)(void *trace
, uint16_t eID
);
45 extern ltt_run_filter_functor ltt_run_filter
;
47 extern void ltt_filter_register(ltt_run_filter_functor func
);
48 extern void ltt_filter_unregister(void);
50 #endif /* LTT_TRACER_CORE_H */