void *dlopen(const char *filename, int flag)
{
void *handle = _lttng_ust_dl_libc_dlopen(filename, flag);
- if (handle) {
+ if (__tracepoint_ptrs_registered && handle) {
struct link_map *p = NULL;
if (dlinfo(handle, RTLD_DI_LINKMAP, &p) != -1 && p != NULL
&& p->l_addr != 0)
int dlclose(void *handle)
{
- if (handle) {
+ if (__tracepoint_ptrs_registered && handle) {
struct link_map *p = NULL;
if (dlinfo(handle, RTLD_DI_LINKMAP, &p) != -1 && p != NULL
&& p->l_addr != 0)
dump_exec_baddr(&data);
return 0;
}
+
+void lttng_ust_baddr_statedump_init(void)
+{
+ __tracepoints__init();
+ __tracepoints__ptrs_init();
+}
+
+void lttng_ust_baddr_statedump_destroy(void)
+{
+ __tracepoints__ptrs_destroy();
+ __tracepoints__destroy();
+}
#include <lttng/ust-events.h>
+void lttng_ust_baddr_statedump_init(void);
+void lttng_ust_baddr_statedump_destroy(void);
+
int lttng_ust_baddr_statedump(void *owner);
#endif /* LTTNG_UST_BADDR_H */
*/
init_usterr();
init_tracepoint();
+ lttng_ust_baddr_statedump_init();
lttng_ring_buffer_metadata_client_init();
lttng_ring_buffer_client_overwrite_init();
lttng_ring_buffer_client_overwrite_rt_init();
lttng_ring_buffer_client_overwrite_rt_exit();
lttng_ring_buffer_client_overwrite_exit();
lttng_ring_buffer_metadata_client_exit();
+ lttng_ust_baddr_statedump_destroy();
exit_tracepoint();
if (!exiting) {
/* Reinitialize values for fork */