* Mathieu Desnoyers (mathieu.desnoyers@polymtl.ca)
*/
-#include <linux/module.h>
-#include <linux/ltt-channels.h>
-#include <linux/mutex.h>
-#include <linux/vmalloc.h>
+//ust// #include <linux/module.h>
+//ust// #include <linux/ltt-channels.h>
+//ust// #include <linux/mutex.h>
+//ust// #include <linux/vmalloc.h>
+
+#include "kernelcompat.h"
+#include "channels.h"
+#include "usterr.h"
/*
* ltt_channel_mutex may be nested inside the LTT trace mutex.
iter->index = free_index++;
iter->free_event_id = 0;
}
- markers_compact_event_ids();
+//ust// markers_compact_event_ids();
}
}
mutex_unlock(<t_channel_mutex);
return ret;
}
-EXPORT_SYMBOL_GPL(ltt_channels_register);
+//ust// EXPORT_SYMBOL_GPL(ltt_channels_register);
/**
* ltt_channels_unregister - Unregister a trace channel.
mutex_unlock(<t_channel_mutex);
return ret;
}
-EXPORT_SYMBOL_GPL(ltt_channels_unregister);
+//ust// EXPORT_SYMBOL_GPL(ltt_channels_unregister);
/**
* ltt_channels_set_default - Set channel default behavior.
mutex_unlock(<t_channel_mutex);
return ret;
}
-EXPORT_SYMBOL_GPL(ltt_channels_set_default);
+//ust// EXPORT_SYMBOL_GPL(ltt_channels_set_default);
/**
* ltt_channels_get_name_from_index - get channel name from channel index
return iter->name;
return NULL;
}
-EXPORT_SYMBOL_GPL(ltt_channels_get_name_from_index);
+//ust// EXPORT_SYMBOL_GPL(ltt_channels_get_name_from_index);
static struct ltt_channel_setting *
ltt_channels_get_setting_from_name(const char *name)
else
return -1;
}
-EXPORT_SYMBOL_GPL(ltt_channels_get_index_from_name);
+//ust// EXPORT_SYMBOL_GPL(ltt_channels_get_index_from_name);
/**
* ltt_channels_trace_alloc - Allocate channel structures for a trace
struct ltt_channel_setting *iter;
mutex_lock(<t_channel_mutex);
- if (!free_index)
+ if (!free_index) {
+ WARN("ltt_channels_trace_alloc: no free_index; are there any probes connected?");
goto end;
+ }
if (!atomic_read(&index_kref.refcount))
kref_init(&index_kref);
else
*nr_channels = free_index;
channel = kzalloc(sizeof(struct ltt_channel_struct) * free_index,
GFP_KERNEL);
- if (!channel)
+ if (!channel) {
+ WARN("ltt_channel_struct: channel null after alloc");
goto end;
+ }
list_for_each_entry(iter, <t_channels, list) {
if (!atomic_read(&iter->kref.refcount))
continue;
mutex_unlock(<t_channel_mutex);
return channel;
}
-EXPORT_SYMBOL_GPL(ltt_channels_trace_alloc);
+//ust// EXPORT_SYMBOL_GPL(ltt_channels_trace_alloc);
/**
* ltt_channels_trace_free - Free one trace's channels
mutex_unlock(<t_channel_mutex);
unlock_markers();
}
-EXPORT_SYMBOL_GPL(ltt_channels_trace_free);
+//ust// EXPORT_SYMBOL_GPL(ltt_channels_trace_free);
/**
* _ltt_channels_get_event_id - get next event ID for a marker
return ret;
}
-MODULE_LICENSE("GPL");
-MODULE_AUTHOR("Mathieu Desnoyers");
-MODULE_DESCRIPTION("Linux Trace Toolkit Next Generation Channel Management");
+//ust// MODULE_LICENSE("GPL");
+//ust// MODULE_AUTHOR("Mathieu Desnoyers");
+//ust// MODULE_DESCRIPTION("Linux Trace Toolkit Next Generation Channel Management");