X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=libtracing%2Ftracer.h;h=e39947f0185141146ae86d8eea61e9ff134b0bdb;hb=9c67dc50afb2eaa1c3966ee73fac3ce55935556c;hp=3143ab185089713992c1aae5f31c6e9f070bfef0;hpb=5f54827b88b093974e4bf58f67490036718644c7;p=ust.git diff --git a/libtracing/tracer.h b/libtracing/tracer.h index 3143ab1..e39947f 100644 --- a/libtracing/tracer.h +++ b/libtracing/tracer.h @@ -28,6 +28,8 @@ #include "list.h" #include "kernelcompat.h" #include "channels.h" +#include "tracercore.h" +#include "marker.h" /* Number of bytes to log with a read/write event */ #define LTT_LOG_RW_SIZE 32L @@ -68,13 +70,13 @@ size_t ltt_serialize_data(struct rchan_buf *buf, size_t buf_offset, void *serialize_private, int *largest_align, const char *fmt, va_list *args); -//ust// struct ltt_available_probe { -//ust// const char *name; /* probe name */ -//ust// const char *format; -//ust// marker_probe_func *probe_func; -//ust// ltt_serialize_cb callbacks[LTT_NR_CALLBACKS]; -//ust// struct list_head node; /* registered probes list */ -//ust// }; +struct ltt_available_probe { + const char *name; /* probe name */ + const char *format; + marker_probe_func *probe_func; + ltt_serialize_cb callbacks[LTT_NR_CALLBACKS]; + struct list_head node; /* registered probes list */ +}; struct ltt_probe_private_data { struct ltt_trace_struct *trace; /* @@ -144,18 +146,17 @@ struct ltt_trace_ops { void **transport_data, size_t data_size, size_t *slot_size, long *buf_offset, u64 *tsc, unsigned int *rflags, - int largest_align, - int cpu); + int largest_align); void (*commit_slot) (struct ltt_channel_struct *channel, void **transport_data, long buf_offset, size_t slot_size); void (*wakeup_channel) (struct ltt_channel_struct *ltt_channel); -//ust// int (*user_blocking) (struct ltt_trace_struct *trace, -//ust// unsigned int index, size_t data_size, -//ust// struct user_dbg_data *dbg); -//ust// /* End of first 32 bytes cacheline */ -//ust// int (*create_dirs) (struct ltt_trace_struct *new_trace); -//ust// void (*remove_dirs) (struct ltt_trace_struct *new_trace); + int (*user_blocking) (struct ltt_trace_struct *trace, + unsigned int index, size_t data_size, + struct user_dbg_data *dbg); + /* End of first 32 bytes cacheline */ + int (*create_dirs) (struct ltt_trace_struct *new_trace); + void (*remove_dirs) (struct ltt_trace_struct *new_trace); int (*create_channel) (const char *trace_name, struct ltt_trace_struct *trace, struct dentry *dir, const char *channel_name, @@ -166,7 +167,7 @@ struct ltt_trace_ops { void (*remove_channel) (struct ltt_channel_struct *channel); void (*user_errors) (struct ltt_trace_struct *trace, unsigned int index, size_t data_size, - struct user_dbg_data *dbg, int cpu); + struct user_dbg_data *dbg); //ust// #ifdef CONFIG_HOTPLUG_CPU //ust// int (*handle_cpuhp) (struct notifier_block *nb, //ust// unsigned long action, void *hcpu, @@ -332,7 +333,7 @@ static inline unsigned char ltt_get_header_size( size_t orig_offset = offset; size_t padding; - BUILD_BUG_ON(sizeof(struct ltt_event_header) != sizeof(u32)); +//ust// BUILD_BUG_ON(sizeof(struct ltt_event_header) != sizeof(u32)); padding = ltt_align(offset, sizeof(struct ltt_event_header)); offset += padding; @@ -496,12 +497,11 @@ static inline int ltt_reserve_slot( long *buf_offset, u64 *tsc, unsigned int *rflags, - int largest_align, - int cpu) + int largest_align) { return trace->ops->reserve_slot(trace, channel, transport_data, data_size, slot_size, buf_offset, tsc, rflags, - largest_align, cpu); + largest_align); } @@ -547,11 +547,14 @@ static inline void ltt_commit_slot( #define LTT_FLIGHT_PREFIX "flight-" /* Tracer properties */ -#define LTT_DEFAULT_SUBBUF_SIZE_LOW 65536 +//#define LTT_DEFAULT_SUBBUF_SIZE_LOW 65536 +#define LTT_DEFAULT_SUBBUF_SIZE_LOW 4096 #define LTT_DEFAULT_N_SUBBUFS_LOW 2 -#define LTT_DEFAULT_SUBBUF_SIZE_MED 262144 +//#define LTT_DEFAULT_SUBBUF_SIZE_MED 262144 +#define LTT_DEFAULT_SUBBUF_SIZE_MED 4096 #define LTT_DEFAULT_N_SUBBUFS_MED 2 -#define LTT_DEFAULT_SUBBUF_SIZE_HIGH 1048576 +//#define LTT_DEFAULT_SUBBUF_SIZE_HIGH 1048576 +#define LTT_DEFAULT_SUBBUF_SIZE_HIGH 4096 #define LTT_DEFAULT_N_SUBBUFS_HIGH 2 #define LTT_TRACER_MAGIC_NUMBER 0x00D6B7ED #define LTT_TRACER_VERSION_MAJOR 2