[lttng-dev] lttng-ust quick start?

Thibault, Daniel Daniel.Thibault at drdc-rddc.gc.ca
Fri Jan 11 17:12:49 EST 2013


   I have this Ubuntu 12.04 machine with the lttng-tools suite installed, and I now want to quickstart userspace tracing.  Starting at http://lttng.org/quickstart, we're told succinctly that we need to instrument the target application (details in the lttng-ust(3) manpage) and then do the actual tracing (Userspace Tracing section of the lttng-tools wiki page).  Fair enough.  But the lttng-ust(3) manpage is off to a rocky start.

   The first thing we're told is " to use the lttng-gen-tp(1) tool. See the lttng-gen-tp(1) manpage for explanation."  The catch here is that lttng-gen-tp is NOT part of the basic lttng-tools installation.  The manpage should explain (briefly) that lttng-gen-tp is obtained by installing liblttng-ust-dev.  Might as well install liblttng-ctl-dev at the same time, so we have a complete LTTng installation.

   The next step in the lttng-ust(3) manpage is to create a tracepoint provider: "To create a tracepoint provider, within a build tree similar to examples/easy-ust installed with lttng-ust documentation, a sample_component_provider.h for the general layout."  The sentence makes no sense (is it missing parts?), but even if one glosses over this, the main problem is that there is no easy-ust anywhere to be found within the LTTng installation.  Turning to the Internet, I find https://github.com/giraldeau/lttng-ust/tree/master/doc/examples/easy-ust and grab the handful of files found there.  I then open a console within that directory and invoke make:

gcc -I. -c -o sample.o sample.c
gcc -I. -c -o tp.o tp.c
In file included from /usr/local/include/lttng/ust-tracepoint-event.h:496:0,
                 from /usr/local/include/lttng/tracepoint-event.h:40,
                 from sample_component_provider.h:135,
                 from tp.c:25:
././sample_component_provider.h:128:1: erreur: '__tp_loglevel_entry__sample_component___TRACE_WARNING' undeclared here (not in a function)
make: *** [tp.o] Erreur 1

   I think it's telling me it does not recognise the TRACE_WARNING tracepoint loglevel being defined in sample_component_provider.h (the "TRACEPOINT_LOGLEVEL(sample_component, message, TRACE_WARNING)" call), but the name seems legitimate and ust-tracepoint-event.h looks like it should handle the TRACEPOINT_LOGLEVEL* definitions.

   How do I fix this?

Daniel U. Thibault
R & D pour la défense Canada - Valcartier (RDDC Valcartier) / Defence R&D Canada - Valcartier (DRDC Valcartier)
Cyber sécurité pour les missions essentielles (CME) / Mission Critical Cyber Security (MCCS)
Protection des systèmes et contremesures (PSC) / Systems Protection & Countermeasures (SPC)
2459 route de la Bravoure
Québec, QC  G3J 1X5
CANADA
Vox : (418) 844-4000 x4245
Fax : (418) 844-4538
Gouvernement du Canada / Government of Canada
<http://www.valcartier.drdc-rddc.gc.ca/>



More information about the lttng-dev mailing list