X-Git-Url: http://git.lttng.org/?a=blobdiff_plain;f=liblttng-ust%2Flttng-ust-comm.c;h=204db9de37c6ace3f9a99041b27e4dd95fd52698;hb=dc325c1d762bbbdc1866e590f4649078f8600664;hp=fcf2cb1411636e46b76d0c10f54c2086a43d6c52;hpb=ddabe860f4cf41a4206a8157d83e6b9354f85cb5;p=lttng-ust.git diff --git a/liblttng-ust/lttng-ust-comm.c b/liblttng-ust/lttng-ust-comm.c index fcf2cb14..204db9de 100644 --- a/liblttng-ust/lttng-ust-comm.c +++ b/liblttng-ust/lttng-ust-comm.c @@ -29,12 +29,14 @@ #include #include +#include #include #include -#include +#include #include #include #include +#include #include #include #include @@ -52,9 +54,6 @@ #include "context-internal.h" #include "ust-compat.h" -/* Concatenate lttng ust shared library name with its major version number. */ -#define LTTNG_UST_LIB_SO_NAME "liblttng-ust.so." __ust_stringify(CONFIG_LTTNG_UST_LIBRARY_VERSION_MAJOR) - /* * Has lttng ust comm constructor been called ? */ @@ -638,11 +637,11 @@ int register_to_sessiond(int socket, enum ustctl_socket_type type) return ustcomm_send_reg_msg(socket, type, CAA_BITS_PER_LONG, - lttng_alignof(uint8_t) * CHAR_BIT, - lttng_alignof(uint16_t) * CHAR_BIT, - lttng_alignof(uint32_t) * CHAR_BIT, - lttng_alignof(uint64_t) * CHAR_BIT, - lttng_alignof(unsigned long) * CHAR_BIT); + lttng_ust_rb_alignof(uint8_t) * CHAR_BIT, + lttng_ust_rb_alignof(uint16_t) * CHAR_BIT, + lttng_ust_rb_alignof(uint32_t) * CHAR_BIT, + lttng_ust_rb_alignof(uint64_t) * CHAR_BIT, + lttng_ust_rb_alignof(unsigned long) * CHAR_BIT); } static @@ -768,7 +767,7 @@ int handle_bytecode_recv(struct sock_info *sock_info, int sock, struct ustcomm_ust_msg *lum) { struct lttng_ust_bytecode_node *bytecode = NULL; - enum lttng_ust_bytecode_node_type type; + enum lttng_ust_bytecode_type type; const struct lttng_ust_abi_objd_ops *ops; uint32_t data_size, data_size_max, reloc_offset; uint64_t seqnum; @@ -777,14 +776,14 @@ int handle_bytecode_recv(struct sock_info *sock_info, switch (lum->cmd) { case LTTNG_UST_ABI_FILTER: - type = LTTNG_UST_BYTECODE_NODE_TYPE_FILTER; + type = LTTNG_UST_BYTECODE_TYPE_FILTER; data_size = lum->u.filter.data_size; data_size_max = LTTNG_UST_ABI_FILTER_BYTECODE_MAX_LEN; reloc_offset = lum->u.filter.reloc_offset; seqnum = lum->u.filter.seqnum; break; case LTTNG_UST_ABI_CAPTURE: - type = LTTNG_UST_BYTECODE_NODE_TYPE_CAPTURE; + type = LTTNG_UST_BYTECODE_TYPE_CAPTURE; data_size = lum->u.capture.data_size; data_size_max = LTTNG_UST_ABI_CAPTURE_BYTECODE_MAX_LEN; reloc_offset = lum->u.capture.reloc_offset; @@ -2092,7 +2091,7 @@ void __attribute__((constructor)) lttng_ust_init(void) * liblttng-ust.so to increment the dynamic loader's internal refcount for * this library so it never becomes zero, thus never gets unloaded from the * address space of the process. Since we are already running in the - * constructor of the LTTNG_UST_LIB_SO_NAME library, calling dlopen will + * constructor of the LTTNG_UST_LIB_SONAME library, calling dlopen will * simply increment the refcount and no additionnal work is needed by the * dynamic loader as the shared library is already loaded in the address * space. As a safe guard, we use the RTLD_NODELETE flag to prevent @@ -2100,9 +2099,9 @@ void __attribute__((constructor)) lttng_ust_init(void) * never happen). Do the return value check but discard the handle at the * end of the function as it's not needed. */ - handle = dlopen(LTTNG_UST_LIB_SO_NAME, RTLD_LAZY | RTLD_NODELETE); + handle = dlopen(LTTNG_UST_LIB_SONAME, RTLD_LAZY | RTLD_NODELETE); if (!handle) { - ERR("dlopen of liblttng-ust shared library (%s).", LTTNG_UST_LIB_SO_NAME); + ERR("dlopen of liblttng-ust shared library (%s).", LTTNG_UST_LIB_SONAME); } /* @@ -2370,7 +2369,7 @@ void ust_context_vgids_reset(void) * in the middle of an tracepoint or ust tracing state modification. * Holding this mutex protects these structures across fork and clone. */ -void ust_before_fork(sigset_t *save_sigset) +void lttng_ust_before_fork(sigset_t *save_sigset) { /* * Disable signals. This is to avoid that the child intervenes @@ -2419,7 +2418,7 @@ static void ust_after_fork_common(sigset_t *restore_sigset) } } -void ust_after_fork_parent(sigset_t *restore_sigset) +void lttng_ust_after_fork_parent(sigset_t *restore_sigset) { if (URCU_TLS(lttng_ust_nest_count)) return; @@ -2438,13 +2437,13 @@ void ust_after_fork_parent(sigset_t *restore_sigset) * This is meant for forks() that have tracing in the child between the * fork and following exec call (if there is any). */ -void ust_after_fork_child(sigset_t *restore_sigset) +void lttng_ust_after_fork_child(sigset_t *restore_sigset) { if (URCU_TLS(lttng_ust_nest_count)) return; lttng_context_vpid_reset(); lttng_context_vtid_reset(); - lttng_context_procname_reset(); + lttng_ust_context_procname_reset(); ust_context_ns_reset(); ust_context_vuids_reset(); ust_context_vgids_reset(); @@ -2457,56 +2456,56 @@ void ust_after_fork_child(sigset_t *restore_sigset) lttng_ust_init(); } -void ust_after_setns(void) +void lttng_ust_after_setns(void) { ust_context_ns_reset(); ust_context_vuids_reset(); ust_context_vgids_reset(); } -void ust_after_unshare(void) +void lttng_ust_after_unshare(void) { ust_context_ns_reset(); ust_context_vuids_reset(); ust_context_vgids_reset(); } -void ust_after_setuid(void) +void lttng_ust_after_setuid(void) { ust_context_vuids_reset(); } -void ust_after_seteuid(void) +void lttng_ust_after_seteuid(void) { ust_context_vuids_reset(); } -void ust_after_setreuid(void) +void lttng_ust_after_setreuid(void) { ust_context_vuids_reset(); } -void ust_after_setresuid(void) +void lttng_ust_after_setresuid(void) { ust_context_vuids_reset(); } -void ust_after_setgid(void) +void lttng_ust_after_setgid(void) { ust_context_vgids_reset(); } -void ust_after_setegid(void) +void lttng_ust_after_setegid(void) { ust_context_vgids_reset(); } -void ust_after_setregid(void) +void lttng_ust_after_setregid(void) { ust_context_vgids_reset(); } -void ust_after_setresgid(void) +void lttng_ust_after_setresgid(void) { ust_context_vgids_reset(); }