X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=include%2Flttng%2Ftracepoint.h;h=bcab5e2d7b0fa3c2ac0efb71b2c4f2ed3a68f2fe;hb=105cf2ebe3f18f1cb4fc719ee38c05cfbc975248;hp=51eafdeb5a4cce36e957ede0d5af31557fb5d803;hpb=05e8ff1f80c9a6dcd7db559c7a39b4c46e85e2a7;p=lttng-ust.git diff --git a/include/lttng/tracepoint.h b/include/lttng/tracepoint.h index 51eafdeb..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 @@ -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); @@ -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,