[ltt-dev] UST __trace_mark_tp_counter

David Goulet david.goulet at polymtl.ca
Tue Oct 12 10:38:49 EDT 2010


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

The register and unregister function a created with DECLARE_TRACE macro.

For the test case, event_msg is a "dummy" tracepoint NOT declared to test this
particular case where no trace declaration is done (hence the check_type
function utility).

David

On 10-10-12 10:27 AM, Nils Carlson wrote:
> I was doing some minor fixes in UST today when I came across a small
> phenomenon. Since including Davids testcase for trae_mark_tp I cannot
> compile with -Wall. The compiler throws out a
> 
> tracepoint_test.o: In function `__check_tp_type':
> /home/nils/devel/ust/tests/tracepoint/tracepoint_test.c:64: undefined
> reference to `register_trace_ust_event_msg'
> collect2: ld returned 1 exit status
> 
> 
> Looking at the macros in include/ust/marker.h I find the function
> 
> void __check_tp_type(void)                \
>         {                            \
>             register_trace_##tp_name(tp_cb, call_private); \
>         }                            \
> 
> defined inside the __trace_mark_tp_counter function.
> 
> In the case of _DEFINE_MARKER_TP we don't create the register and
> unregister functions as far as I can tell. And the error only occurs
> when compiling with -Wall which I'm guessing is because __check_tp_type
> is never called and is optimised out completely normally? If I create a
> void pointer and assign the function address to it I get the error when
> compiling without -Wall as well.
> 
> Mathieu: What do you think of this, does it seem reasonable? How do you
> think we should fix it? Simplest would be to remove the check, I don't
> know if the register and unregister functions will be used for anything?
> 
> /Nils

- -- 
David Goulet
LTTng project, DORSAL Lab.

1024D/16BD8563
BE3C 672B 9331 9796 291A  14C6 4AF7 C14B 16BD 8563
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iEYEARECAAYFAky0cvkACgkQSvfBSxa9hWMDeACfWaFK7cF8d8OnMbAJoIhTRNxl
U5sAoLSEwTX2v+rvBaEGRZ9ax38K21DL
=Hbtj
-----END PGP SIGNATURE-----




More information about the lttng-dev mailing list