X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=include%2Flttng%2Ftracepoint.h;h=bcab5e2d7b0fa3c2ac0efb71b2c4f2ed3a68f2fe;hb=4c41b460614826ada066a7e0c26a8b116336bab2;hp=41ac5a2816a9ecd0967bb872476c6e1224ed5d68;hpb=10544ee8af31afb239e3dfa71cb2fe09d3de3771;p=lttng-ust.git diff --git a/include/lttng/tracepoint.h b/include/lttng/tracepoint.h index 41ac5a28..bcab5e2d 100644 --- a/include/lttng/tracepoint.h +++ b/include/lttng/tracepoint.h @@ -1,28 +1,12 @@ -#ifndef _LTTNG_TRACEPOINT_H -#define _LTTNG_TRACEPOINT_H - /* - * Copyright 2011-2012 - Mathieu Desnoyers - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. + * SPDX-License-Identifier: MIT + * + * Copyright (C) 2011-2012 Mathieu Desnoyers */ +#ifndef _LTTNG_TRACEPOINT_H +#define _LTTNG_TRACEPOINT_H + #include #include #include @@ -271,7 +255,6 @@ struct lttng_ust_tracepoint_dlopen *tracepoint_dlopen_ptr * control and check if the destructors should be executed. */ struct lttng_ust_tracepoint_destructors_syms { - int *old_tracepoint_disable_destructors; void (*tracepoint_disable_destructors)(void); int (*tracepoint_get_destructors_state)(void); }; @@ -293,7 +276,6 @@ static inline void tracepoint_disable_destructors(void) if (tracepoint_dlopen_ptr->liblttngust_handle && tracepoint_destructors_syms_ptr->tracepoint_disable_destructors) tracepoint_destructors_syms_ptr->tracepoint_disable_destructors(); - *tracepoint_destructors_syms_ptr->old_tracepoint_disable_destructors = 1; } #ifndef _LGPL_SOURCE @@ -349,7 +331,7 @@ __tracepoints__init(void) tracepoint_dlopen_ptr = &tracepoint_dlopen; if (!tracepoint_dlopen_ptr->liblttngust_handle) tracepoint_dlopen_ptr->liblttngust_handle = - dlopen("liblttng-ust-tracepoint.so.0", RTLD_NOW | RTLD_GLOBAL); + dlopen("liblttng-ust-tracepoint.so.1", RTLD_NOW | RTLD_GLOBAL); if (!tracepoint_dlopen_ptr->liblttngust_handle) return; __tracepoint__init_urcu_sym(); @@ -384,19 +366,6 @@ __tracepoints__destroy(void) */ return; } - /* - * Lookup if destructors must be executed using the old method. - */ - if (tracepoint_destructors_syms_ptr->old_tracepoint_disable_destructors - && *tracepoint_destructors_syms_ptr->old_tracepoint_disable_destructors) { - /* - * The old_tracepoint_disable_destructors symbol was found with - * dlsym but its value is 1 meaning that destructors must not - * be executed. - */ - return; - } - ret = dlclose(tracepoint_dlopen_ptr->liblttngust_handle); if (ret) { fprintf(stderr, "Error (%d) in dlclose\n", ret); @@ -471,7 +440,7 @@ __tracepoints__ptrs_init(void) tracepoint_dlopen_ptr = &tracepoint_dlopen; if (!tracepoint_dlopen_ptr->liblttngust_handle) tracepoint_dlopen_ptr->liblttngust_handle = - dlopen("liblttng-ust-tracepoint.so.0", RTLD_NOW | RTLD_GLOBAL); + dlopen("liblttng-ust-tracepoint.so.1", RTLD_NOW | RTLD_GLOBAL); if (!tracepoint_dlopen_ptr->liblttngust_handle) return; if (!tracepoint_destructors_syms_ptr) @@ -479,15 +448,11 @@ __tracepoints__ptrs_init(void) tracepoint_dlopen_ptr->tracepoint_register_lib = URCU_FORCE_CAST(int (*)(struct lttng_ust_tracepoint * const *, int), dlsym(tracepoint_dlopen_ptr->liblttngust_handle, - "tracepoint_register_lib2")); + "tracepoint_register_lib")); tracepoint_dlopen_ptr->tracepoint_unregister_lib = URCU_FORCE_CAST(int (*)(struct lttng_ust_tracepoint * const *), dlsym(tracepoint_dlopen_ptr->liblttngust_handle, - "tracepoint_unregister_lib2")); - tracepoint_destructors_syms_ptr->old_tracepoint_disable_destructors = - URCU_FORCE_CAST(int *, - dlsym(tracepoint_dlopen_ptr->liblttngust_handle, - "__tracepoints__disable_destructors")); + "tracepoint_unregister_lib")); tracepoint_destructors_syms_ptr->tracepoint_disable_destructors = URCU_FORCE_CAST(void (*)(void), dlsym(tracepoint_dlopen_ptr->liblttngust_handle,