//ust// #include <linux/delay.h>
//ust// #include <linux/vmalloc.h>
//ust// #include <asm/atomic.h>
+#include "kernelcompat.h"
#include "tracercore.h"
#include "tracer.h"
-#include "kernelcompat.h"
#include "usterr.h"
//ust// static void async_wakeup(unsigned long data);
* vmalloc_sync_all. Therefore, only if the module allocates virtual memory
* after its registration must it synchronize the TLBs.
*/
-//ust// void ltt_transport_register(struct ltt_transport *transport)
-//ust// {
-//ust// /*
-//ust// * Make sure no page fault can be triggered by the module about to be
-//ust// * registered. We deal with this here so we don't have to call
-//ust// * vmalloc_sync_all() in each module's init.
-//ust// */
-//ust// vmalloc_sync_all();
-//ust//
-//ust// ltt_lock_traces();
-//ust// list_add_tail(&transport->node, <t_transport_list);
-//ust// ltt_unlock_traces();
-//ust// }
+void ltt_transport_register(struct ltt_transport *transport)
+{
+ /*
+ * Make sure no page fault can be triggered by the module about to be
+ * registered. We deal with this here so we don't have to call
+ * vmalloc_sync_all() in each module's init.
+ */
+//ust// vmalloc_sync_all();
+
+ ltt_lock_traces();
+ list_add_tail(&transport->node, <t_transport_list);
+ ltt_unlock_traces();
+}
//ust// EXPORT_SYMBOL_GPL(ltt_transport_register);
/**
* ltt_transport_unregister - LTT transport unregistration
* @transport: transport structure
*/
-//ust// void ltt_transport_unregister(struct ltt_transport *transport)
-//ust// {
-//ust// ltt_lock_traces();
-//ust// list_del(&transport->node);
-//ust// ltt_unlock_traces();
-//ust// }
+void ltt_transport_unregister(struct ltt_transport *transport)
+{
+ ltt_lock_traces();
+ list_del(&transport->node);
+ ltt_unlock_traces();
+}
//ust// EXPORT_SYMBOL_GPL(ltt_transport_unregister);
static inline int is_channel_overwrite(enum ltt_channels chan,
*
* Returns a pointer to the trace structure, NULL if not found.
*/
-static struct ltt_trace_struct *_ltt_trace_find(const char *trace_name)
+struct ltt_trace_struct *_ltt_trace_find(const char *trace_name)
{
struct ltt_trace_struct *trace;
//ust// jiffies + LTT_PERCPU_TIMER_INTERVAL);
//ust// set_kernel_trace_flag_all_tasks();
//ust// }
-//ust// list_add_rcu(&trace->list, <t_traces.head);
+ list_add_rcu(&trace->list, <t_traces.head);
//ust// synchronize_sched();
ltt_unlock_traces();
trace->ops->finish_channel(chan);
}
+ return; /* FIXME: temporary for ust */
//ust// flush_scheduled_work();
/*
* directly using this trace handle inside the logging function.
*/
-//ust// ltt_dump_marker_state(trace);
+ ltt_dump_marker_state(trace);
//ust// if (!try_module_get(ltt_statedump_owner)) {
//ust// err = -ENODEV;