"count": 0,
},
{
- "name": "tp_a:constructor_cplusplus_provider_static_archive",
+ "name": "tp_a_c:constructor_cplusplus_provider_static_archive",
"msg": "global - static archive define and provider",
"count": 0,
"may_fail": compound_literal_on_heap,
"may_fail": compound_literal_on_heap,
},
{
- "name": "tp_a:destructor_c_provider_static_archive",
+ "name": "tp_a_c:destructor_c_provider_static_archive",
"msg": None,
"count": 0,
"may_fail": compound_literal_on_heap,
endif
noinst_LTLIBRARIES = libtp-so-provider.la libtp-so-define.la \
- libtp-a-provider.la libtp-a-define.la
+ libtp-a-provider.la libtp-a-define.la \
+ libtp-a_c-provider.la libtp-a_c-define.la
# dynamic libraries
libtp_so_provider_la_SOURCES = \
tp-a-define.cpp \
tp-a.h
+libtp_a_c_provider_la_SOURCES = \
+ tp-a_c-provider.c \
+ tp-a_c.h
+
+libtp_a_c_define_la_SOURCES = \
+ tp-a_c-define.c \
+ tp-a_c.h
+
+
noinst_PROGRAMS = gen-ust-events-constructor \
uses_heap
gen_ust_events_constructor_SOURCES = main.cpp \
$(builddir)/libtp-so-provider.la \
$(builddir)/libtp-a-define.la \
$(builddir)/libtp-a-provider.la \
+ $(builddir)/libtp-a_c-define.la \
+ $(builddir)/libtp-a_c-provider.la \
$(top_builddir)/tests/utils/libtestutils.la \
$(DL_LIBS)
#include "obj.h"
#include "tp-a.h"
+#include "tp-a_c.h"
#include "tp-so.h"
#include "tp.h"
void test_constructor_a(void) __attribute__((constructor));
void test_constructor_a(void)
{
- tracepoint(tp_a, constructor_c_provider_static_archive);
+ tracepoint(tp_a_c, constructor_c_provider_static_archive);
}
void test_destructor_a(void) __attribute__((destructor));
void test_destructor_a(void)
{
- tracepoint(tp_a, destructor_c_provider_static_archive);
+ tracepoint(tp_a_c, destructor_c_provider_static_archive);
}
Obja g_obja_static_archive("global - static archive define and provider");
#include <stdint.h>
-TRACEPOINT_EVENT(tp_a, constructor_c_provider_static_archive, TP_ARGS(), TP_FIELDS())
-
-TRACEPOINT_EVENT(tp_a, destructor_c_provider_static_archive, TP_ARGS(), TP_FIELDS())
-
TRACEPOINT_EVENT(tp_a,
constructor_cplusplus_provider_static_archive,
TP_ARGS(const char *, msg),
--- /dev/null
+/*
+ * Copyright (C) 2024 Kienan Stewart <kstewart@efficios.com>
+ *
+ * SPDX-License-Identifier: LGPL-2.1-only
+ */
+
+#define TRACEPOINT_DEFINE
+#include "tp-a_c.h"
--- /dev/null
+/*
+ * Copyright (C) 2024 Kienan Stewart <kstewart@efficios.com>
+ *
+ * SPDX-License-Identifier: LGPL-2.1-only
+ */
+
+#define TRACEPOINT_CREATE_PROBES
+#include "tp-a_c.h"
--- /dev/null
+/*
+ * Copyright (C) 2024 Kienan Stewart <kstewart@efficios.com>
+ *
+ * SPDX-License-Identifier: LGPL-2.1-only
+ */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#undef TRACEPOINT_PROVIDER
+#define TRACEPOINT_PROVIDER tp_a_c
+
+#if !defined(_TRACEPOINT_TP_A_C_H) || defined(TRACEPOINT_HEADER_MULTI_READ)
+#define _TRACEPOINT_TP_A_C_H
+
+#include <lttng/tracepoint.h>
+
+TRACEPOINT_EVENT(tp_a_c, constructor_c_provider_static_archive, TP_ARGS(), TP_FIELDS())
+
+TRACEPOINT_EVENT(tp_a_c, destructor_c_provider_static_archive, TP_ARGS(), TP_FIELDS())
+
+#endif /* _TRACEPOINT_TP_A_H */
+
+#undef TRACEPOINT_INCLUDE
+#define TRACEPOINT_INCLUDE "./tp-a_c.h"
+
+/* This part must be outside ifdef protection */
+#include <lttng/tracepoint-event.h>
+
+#ifdef __cplusplus
+}
+#endif