tests: test_ust_constructor: Use a C-compiled static archive
authorKienan Stewart <kstewart@efficios.com>
Thu, 8 Feb 2024 13:46:46 +0000 (08:46 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 7 Mar 2024 17:11:31 +0000 (12:11 -0500)
Observed issue
==============

The test output describes the tracepoint as
`constructor_c_provider_static_archive`, which can be a bit misleading.

The tracepoints are indeed emitted inside C-style constructors. However,
as the tracepoints are being compiled inside a C++ translation unit,
they were never traceable when using a heap allocated implementation. If
the static archive is compiled as C and linked against the C++
application, the tracepoints are expected to always be visible.

Solution
========

In splitting the c-style constructors for the static archive into a
separate object the compilation can be made to use gcc instead of g++.

Drawback
========

This change doesn't keep a C-style constructor inside a C++ application
and asserts that it is indeed not traced when compiled using a heap
allocated implementation.

Signed-off-by: Kienan Stewart <kstewart@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: I3837fe318b2f8e1d9572ee0bfb6f6bbbd047c5f5


No differences found
This page took 0.026553 seconds and 4 git commands to generate.