tracectl cleanup v3
[ust.git] / libust / tracercore.h
index 8dfffa13f2c0750ca2d9b9a0bf5e739bb9479a3e..5c396f464fec001b9aca07829c452dfb5bae01ee 100644 (file)
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA
  */
 
-#ifndef LTT_CORE_H
-#define LTT_CORE_H
+#ifndef UST_TRACERCORE_H
+#define UST_TRACERCORE_H
 
-#include "kernelcompat.h"
-//ust// #include <linux/percpu.h>
-
-/* ltt's root dir in debugfs */
-#define LTT_ROOT        "ltt"
+#include <ust/kcompat/kcompat.h>
+#include <ust/core.h>
+#include <urcu/list.h>
 
 /*
  * All modifications of ltt_traces must be done by ltt-tracer.c, while holding
@@ -41,14 +39,8 @@ struct ltt_traces {
 
 extern struct ltt_traces ltt_traces;
 
-/*
- * get dentry of ltt's root dir
- */
-struct dentry *get_ltt_root(void);
-
 /* Keep track of trap nesting inside LTT */
-//ust// DECLARE_PER_CPU(unsigned int, ltt_nesting);
-extern unsigned int ltt_nesting;
+extern __thread int ltt_nesting;
 
 typedef int (*ltt_run_filter_functor)(void *trace, uint16_t eID);
 //typedef int (*ltt_run_filter_functor)(void *, __u16);
@@ -58,39 +50,4 @@ extern ltt_run_filter_functor ltt_run_filter;
 extern void ltt_filter_register(ltt_run_filter_functor func);
 extern void ltt_filter_unregister(void);
 
-#if defined(CONFIG_LTT) && defined(CONFIG_LTT_ALIGNMENT)
-
-/*
- * Calculate the offset needed to align the type.
- * size_of_type must be non-zero.
- */
-static inline unsigned int ltt_align(size_t align_drift, size_t size_of_type)
-{
-       size_t alignment = min(sizeof(void *), size_of_type);
-       return (alignment - align_drift) & (alignment - 1);
-}
-/* Default arch alignment */
-#define LTT_ALIGN
-
-static inline int ltt_get_alignment(void)
-{
-       return sizeof(void *);
-}
-
-#else
-
-static inline unsigned int ltt_align(size_t align_drift,
-                size_t size_of_type)
-{
-       return 0;
-}
-
-#define LTT_ALIGN __attribute__((packed))
-
-static inline int ltt_get_alignment(void)
-{
-       return 0;
-}
-#endif /* defined(CONFIG_LTT) && defined(CONFIG_LTT_ALIGNMENT) */
-
-#endif /* LTT_CORE_H */
+#endif /* UST_TRACERCORE_H */
This page took 0.023393 seconds and 4 git commands to generate.