#include "ltt-tracer-core.h"
-/* Traces structures */
-struct ltt_traces ltt_traces = {
- .setup_head = LIST_HEAD_INIT(ltt_traces.setup_head),
- .head = LIST_HEAD_INIT(ltt_traces.head),
-};
-EXPORT_SYMBOL(ltt_traces);
-
-/* Traces list writer locking */
-static DEFINE_MUTEX(ltt_traces_mutex);
-
-/* root dentry mutex */
-static DEFINE_MUTEX(ltt_root_mutex);
-/* dentry of ltt's root dir */
-static struct dentry *ltt_root_dentry;
-static struct kref ltt_root_kref = {
- .refcount = ATOMIC_INIT(0),
-};
-
-static void ltt_root_release(struct kref *ref)
-{
- debugfs_remove(ltt_root_dentry);
- ltt_root_dentry = NULL;
-}
-
-void put_ltt_root(void)
-{
- mutex_lock(<t_root_mutex);
- if (ltt_root_dentry)
- kref_put(<t_root_kref, ltt_root_release);
- mutex_unlock(<t_root_mutex);
-}
-EXPORT_SYMBOL_GPL(put_ltt_root);
-
-struct dentry *get_ltt_root(void)
-{
- mutex_lock(<t_root_mutex);
- if (!ltt_root_dentry) {
- ltt_root_dentry = debugfs_create_dir(LTT_ROOT, NULL);
- if (!ltt_root_dentry) {
- printk(KERN_ERR "LTT : create ltt root dir failed\n");
- goto out;
- }
- kref_init(<t_root_kref);
- goto out;
- }
- kref_get(<t_root_kref);
-out:
- mutex_unlock(<t_root_mutex);
- return ltt_root_dentry;
-}
-EXPORT_SYMBOL_GPL(get_ltt_root);
-
-/*
- * ltt_lock_traces/ltt_unlock_traces also disables cpu hotplug.
- */
-void ltt_lock_traces(void)
-{
- mutex_lock(<t_traces_mutex);
- get_online_cpus();
-}
-EXPORT_SYMBOL_GPL(ltt_lock_traces);
-
-void ltt_unlock_traces(void)
-{
- put_online_cpus();
- mutex_unlock(<t_traces_mutex);
-}
-EXPORT_SYMBOL_GPL(ltt_unlock_traces);
-
-DEFINE_PER_CPU(unsigned int, ltt_nesting);
-EXPORT_PER_CPU_SYMBOL(ltt_nesting);
-
-int ltt_run_filter_default(void *trace, uint16_t eID)
+int ltt_run_filter_default(struct ltt_session *session,
+ struct ltt_channel *chan,
+ struct ltt_event *event)
{
return 1;
}