X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=include%2Flttng%2Fevents.h;h=3ba8525f3f2a7da566f50cc04bfa58ef25320c10;hb=badfe9f5c396efb1b00e5f2abcded2e4ac4a5bac;hp=80358e920d3d7a83f646c1da63d01c5364177d59;hpb=c02eb85907f43fe17d97604633ae9aa1ed2afb36;p=lttng-modules.git diff --git a/include/lttng/events.h b/include/lttng/events.h index 80358e92..3ba8525f 100644 --- a/include/lttng/events.h +++ b/include/lttng/events.h @@ -273,6 +273,16 @@ struct lttng_uprobe_handler { struct list_head node; }; +enum lttng_syscall_entryexit { + LTTNG_SYSCALL_ENTRY, + LTTNG_SYSCALL_EXIT, +}; + +enum lttng_syscall_abi { + LTTNG_SYSCALL_ABI_NATIVE, + LTTNG_SYSCALL_ABI_COMPAT, +}; + /* * lttng_event structure is referred to by the tracing fast path. It must be * kept small. @@ -299,6 +309,11 @@ struct lttng_event { struct inode *inode; struct list_head head; } uprobe; + struct { + char *syscall_name; + enum lttng_syscall_entryexit entryexit; + enum lttng_syscall_abi abi; + } syscall; } u; struct list_head list; /* Event list in session */ unsigned int metadata_dumped:1; @@ -438,10 +453,10 @@ struct lttng_channel { struct lttng_syscall_filter *sc_filter; int header_type; /* 0: unset, 1: compact, 2: large */ enum channel_type channel_type; + int syscall_all; unsigned int metadata_dumped:1, sys_enter_registered:1, sys_exit_registered:1, - syscall_all:1, tstate:1; /* Transient enable state */ }; @@ -530,7 +545,7 @@ 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) */ + atomic_t 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) */ @@ -634,10 +649,11 @@ void lttng_clock_unref(void); #if defined(CONFIG_HAVE_SYSCALL_TRACEPOINTS) int lttng_syscalls_register(struct lttng_channel *chan, void *filter); int lttng_syscalls_unregister(struct lttng_channel *chan); +int lttng_syscalls_destroy(struct lttng_channel *chan); int lttng_syscall_filter_enable(struct lttng_channel *chan, - const char *name); + struct lttng_event *event); int lttng_syscall_filter_disable(struct lttng_channel *chan, - const char *name); + struct lttng_event *event); long lttng_channel_syscall_mask(struct lttng_channel *channel, struct lttng_kernel_syscall_mask __user *usyscall_mask); #else @@ -651,14 +667,19 @@ static inline int lttng_syscalls_unregister(struct lttng_channel *chan) return 0; } +static inline int lttng_syscalls_destroy(struct lttng_channel *chan) +{ + return 0; +} + static inline int lttng_syscall_filter_enable(struct lttng_channel *chan, - const char *name) + struct lttng_event *event); { return -ENOSYS; } static inline int lttng_syscall_filter_disable(struct lttng_channel *chan, - const char *name) + struct lttng_event *event); { return -ENOSYS; } @@ -805,6 +826,17 @@ int lttng_add_uts_ns_to_ctx(struct lttng_ctx **ctx) } #endif +#if defined(CONFIG_TIME_NS) && \ + (LINUX_VERSION_CODE >= KERNEL_VERSION(5,6,0)) +int lttng_add_time_ns_to_ctx(struct lttng_ctx **ctx); +#else +static inline +int lttng_add_time_ns_to_ctx(struct lttng_ctx **ctx) +{ + return -ENOSYS; +} +#endif + int lttng_add_uid_to_ctx(struct lttng_ctx **ctx); int lttng_add_euid_to_ctx(struct lttng_ctx **ctx); int lttng_add_suid_to_ctx(struct lttng_ctx **ctx);