#include <linux/kprobes.h>
#include <linux/kref.h>
#include <lttng-cpuhotplug.h>
-#include <wrapper/uuid.h>
+#include <linux/uuid.h>
#include <wrapper/uprobes.h>
#include <lttng-tracer.h>
#include <lttng-abi.h>
struct lttng_enabler *ref; /* backward ref */
};
+struct lttng_uprobe_handler {
+ struct lttng_event *event;
+ loff_t offset;
+ struct uprobe_consumer up_consumer;
+ struct list_head node;
+};
+
/*
* lttng_event structure is referred to by the tracing fast path. It must be
* kept small.
char *symbol_name;
} kretprobe;
struct {
- char *symbol_name;
- } ftrace;
- struct {
- struct uprobe_consumer up_consumer;
struct inode *inode;
- loff_t offset;
+ struct list_head head;
} uprobe;
} u;
struct list_head list; /* Event list in session */
struct list_head list; /* Stream list */
struct lttng_transport *transport;
uint64_t version; /* Current version of the metadata cache */
+ bool coherent; /* Stream in a coherent state */
};
#define LTTNG_DYNAMIC_LEN_STACK_SIZE 128
struct list_head enablers_head;
/* Hash table of events */
struct lttng_event_ht events_ht;
+ char name[LTTNG_KERNEL_SESSION_NAME_LEN];
+ char creation_time[LTTNG_KERNEL_SESSION_CREATION_TIME_ISO8601_LEN];
};
struct lttng_metadata_cache {
char *data; /* Metadata cache */
unsigned int cache_alloc; /* Metadata allocated size (bytes) */
unsigned int metadata_written; /* Number of bytes written in metadata cache */
+ int producing; /* Metadata being produced (incomplete) */
struct kref refcount; /* Metadata cache usage */
struct list_head metadata_stream; /* Metadata stream list */
uuid_le uuid; /* Trace session unique ID (copy) */
void lttng_probes_exit(void);
int lttng_metadata_output_channel(struct lttng_metadata_stream *stream,
- struct channel *chan);
+ struct channel *chan, bool *coherent);
int lttng_pid_tracker_get_node_pid(const struct lttng_pid_hash_node *node);
struct lttng_pid_tracker *lttng_pid_tracker_create(void);
}
#endif
+int lttng_event_add_callsite(struct lttng_event *event,
+ struct lttng_kernel_event_callsite *callsite);
+
#ifdef CONFIG_UPROBES
int lttng_uprobes_register(const char *name,
- const char *path,
- uint64_t offset,
- struct lttng_event *event);
+ int fd, struct lttng_event *event);
+int lttng_uprobes_add_callsite(struct lttng_event *event,
+ struct lttng_kernel_event_callsite *callsite);
void lttng_uprobes_unregister(struct lttng_event *event);
void lttng_uprobes_destroy_private(struct lttng_event *event);
#else
static inline
int lttng_uprobes_register(const char *name,
- const char *path,
- uint64_t offset,
- struct lttng_event *event)
+ int fd, struct lttng_event *event)
+{
+ return -ENOSYS;
+}
+
+static inline
+int lttng_uprobes_add_callsite(struct lttng_event *event,
+ struct lttng_kernel_event_callsite *callsite)
{
return -ENOSYS;
}
}
#endif
-#if defined(CONFIG_DYNAMIC_FTRACE) && !defined(LTTNG_FTRACE_MISSING_HEADER)
-int lttng_ftrace_register(const char *name,
- const char *symbol_name,
- struct lttng_event *event);
-void lttng_ftrace_unregister(struct lttng_event *event);
-void lttng_ftrace_destroy_private(struct lttng_event *event);
-#else
-static inline
-int lttng_ftrace_register(const char *name,
- const char *symbol_name,
- struct lttng_event *event)
-{
- return -ENOSYS;
-}
-
-static inline
-void lttng_ftrace_unregister(struct lttng_event *event)
-{
-}
-
-static inline
-void lttng_ftrace_destroy_private(struct lttng_event *event)
-{
-}
-#endif
-
int lttng_calibrate(struct lttng_kernel_calibrate *calibrate);
extern const struct file_operations lttng_tracepoint_list_fops;