[lttng-dev] TRACELOG_LOGLEVEL not observed when using g++

Staffan Tjernstrom staffan at eternaltraveller.com
Tue Oct 11 16:24:11 UTC 2016


The TRACELOG_LOGLEVEL doesn't work when compiling for C++ using the
gcc toolchain. The events all end up as TRACE_DEBUG_LINE.

For instance, using the easy-ust example from lttng-ust to demonstrate.

The initial run is built as shipped, the second run is built on g++
(using the AM_CC override in the make file).

This initial report is done using

{master} staffan at towel:~/src/test/lttng-easy> gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib64/gcc/x86_64-suse-linux/4.8/lto-wrapper
Target: x86_64-suse-linux
Configured with: ../configure --prefix=/usr --infodir=/usr/share/info
--mandir=/usr/share/man --libdir=/usr/lib64 --libexecdir=/usr/lib64
--enable-languages=c,c++,objc,fortran,obj-c++,java,ada
--enable-checking=release --with-gxx-include-dir=/usr/include/c++/4.8
--enable-ssp --disable-libssp --disable-plugin
--with-bugurl=http://bugs.opensuse.org/ --with-pkgversion='SUSE Linux'
--disable-libgcj --disable-libmudflap --with-slibdir=/lib64
--with-system-zlib --enable-__cxa_atexit
--enable-libstdcxx-allocator=new --disable-libstdcxx-pch
--enable-version-specific-runtime-libs --enable-linker-build-id
--enable-linux-futex --program-suffix=-4.8 --without-system-libunwind
--with-arch-32=i586 --with-tune=generic --build=x86_64-suse-linux
--host=x86_64-suse-linux
Thread model: posix
gcc version 4.8.5 (SUSE Linux)
{master} staffan at towel:~/src/test/lttng-easy> g++ -v
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/lib64/gcc/x86_64-suse-linux/4.8/lto-wrapper
Target: x86_64-suse-linux
Configured with: ../configure --prefix=/usr --infodir=/usr/share/info
--mandir=/usr/share/man --libdir=/usr/lib64 --libexecdir=/usr/lib64
--enable-languages=c,c++,objc,fortran,obj-c++,java,ada
--enable-checking=release --with-gxx-include-dir=/usr/include/c++/4.8
--enable-ssp --disable-libssp --disable-plugin
--with-bugurl=http://bugs.opensuse.org/ --with-pkgversion='SUSE Linux'
--disable-libgcj --disable-libmudflap --with-slibdir=/lib64
--with-system-zlib --enable-__cxa_atexit
--enable-libstdcxx-allocator=new --disable-libstdcxx-pch
--enable-version-specific-runtime-libs --enable-linker-build-id
--enable-linux-futex --program-suffix=-4.8 --without-system-libunwind
--with-arch-32=i586 --with-tune=generic --build=x86_64-suse-linux
--host=x86_64-suse-linux
Thread model: posix
gcc version 4.8.5 (SUSE Linux)

but I've seen the same using gcc 4.9 under Fedora21

{master} staffan at towel:~/src/test/lttng-easy> lttng create
Session auto-20161011-111412 created.
Traces will be written in /home/staffan/lttng-traces/auto-20161011-111412
{master} staffan at towel:~/src/test/lttng-easy> lttng enable-event -u -a
All UST events are enabled in channel channel0
{master} staffan at towel:~/src/test/lttng-easy> lttng start
Tracing started for session auto-20161011-111412
{master} staffan at towel:~/src/test/lttng-easy> sample
{master} staffan at towel:~/src/test/lttng-easy> lttng stop
Waiting for data availability.
Tracing stopped for session auto-20161011-111412
{master} staffan at towel:~/src/test/lttng-easy> lttng view -e
"babeltrace -n none --clock-date --clock-gmt --no-delta -f loglevel" |
head -n 30
[2016-10-11 16:16:22.116799023] TRACE_DEBUG_LINE (13)
lttng_ust_statedump:start: { 6 }, { }
[2016-10-11 16:16:22.117644633] TRACE_DEBUG_LINE (13)
lttng_ust_statedump:soinfo: { 6 }, { 0x400000,
"/home/staffan/src/test/lttng-easy/sample", 23952, 1476202315 }
[2016-10-11 16:16:22.117662102] TRACE_DEBUG_LINE (13)
lttng_ust_statedump:soinfo: { 6 }, { 0x7FFCC6F8C000,
"[linux-vdso.so.1]", 0, -1 }
[2016-10-11 16:16:22.117726342] TRACE_DEBUG_LINE (13)
lttng_ust_statedump:soinfo: { 6 }, { 0x7FE82ADE3000,
"/lib64/libdl-2.19.so", 18904, 1467656154 }
[2016-10-11 16:16:22.117741383] TRACE_WARNING (4)
sample_component:message: { 2 }, { "Hello World" }
[2016-10-11 16:16:22.117742035] TRACE_DEBUG_LINE (13)
lttng_ust_statedump:soinfo: { 6 }, { 0x7FE82AB87000,
"/usr/lib64/liblttng-ust.so.0.0.0", 376144, 1445780443 }
[2016-10-11 16:16:22.117752146] TRACE_DEBUG_LINE (13)
lttng_ust_statedump:soinfo: { 6 }, { 0x7FE82A7DF000,
"/lib64/libc-2.19.so", 1979344, 1467656154 }
[2016-10-11 16:16:22.117762095] TRACE_DEBUG_LINE (13)
lttng_ust_statedump:soinfo: { 6 }, { 0x7FE82AFE7000,
"/lib64/ld-2.19.so", 158192, 1467656153 }
[2016-10-11 16:16:22.117774096] TRACE_DEBUG_LINE (13)
lttng_ust_statedump:soinfo: { 6 }, { 0x7FE82A5C4000,
"/usr/lib64/liblttng-ust-tracepoint.so.0.0.0", 43416, 1445780443 }
[2016-10-11 16:16:22.117784383] TRACE_DEBUG_LINE (13)
lttng_ust_statedump:soinfo: { 6 }, { 0x7FE82A3BC000,
"/lib64/librt-2.19.so", 42672, 1467656155 }
[2016-10-11 16:16:22.117795908] TRACE_DEBUG_LINE (13)
lttng_ust_statedump:soinfo: { 6 }, { 0x7FE82A1B4000,
"/usr/lib64/liburcu-bp.so.2.0.0", 31520, 1443872930 }
[2016-10-11 16:16:22.117806805] TRACE_DEBUG_LINE (13)
lttng_ust_statedump:soinfo: { 6 }, { 0x7FE829FAC000,
"/usr/lib64/liburcu-cds.so.2.0.0", 30984, 1443872930 }
[2016-10-11 16:16:22.117815982] TRACE_WARNING (4)
sample_component:message: { 2 }, { "Hello World" }
[2016-10-11 16:16:22.117816280] TRACE_DEBUG_LINE (13)
lttng_ust_statedump:soinfo: { 6 }, { 0x7FE829D8F000,
"/lib64/libpthread-2.19.so", 137440, 1467656155 }
[2016-10-11 16:16:22.117819460] TRACE_DEBUG_LINE (13)
lttng_ust_statedump:end: { 6 }, { }
[2016-10-11 16:16:22.117875170] TRACE_WARNING (4)
sample_component:message: { 2 }, { "Hello World" }
[2016-10-11 16:16:22.117933513] TRACE_WARNING (4)
sample_component:message: { 2 }, { "Hello World" }
[2016-10-11 16:16:22.117991242] TRACE_WARNING (4)
sample_component:message: { 2 }, { "Hello World" }
[2016-10-11 16:16:22.118049045] TRACE_WARNING (4)
sample_component:message: { 2 }, { "Hello World" }
[2016-10-11 16:16:22.118106607] TRACE_WARNING (4)
sample_component:message: { 2 }, { "Hello World" }
[2016-10-11 16:16:22.118164172] TRACE_WARNING (4)
sample_component:message: { 2 }, { "Hello World" }
[2016-10-11 16:16:22.118221726] TRACE_WARNING (4)
sample_component:message: { 2 }, { "Hello World" }
[2016-10-11 16:16:22.118279306] TRACE_WARNING (4)
sample_component:message: { 2 }, { "Hello World" }
[2016-10-11 16:16:22.118336868] TRACE_WARNING (4)
sample_component:message: { 2 }, { "Hello World" }
[2016-10-11 16:16:22.118394422] TRACE_WARNING (4)
sample_component:message: { 2 }, { "Hello World" }
[2016-10-11 16:16:22.118452073] TRACE_WARNING (4)
sample_component:message: { 2 }, { "Hello World" }
[2016-10-11 16:16:22.118509608] TRACE_WARNING (4)
sample_component:message: { 2 }, { "Hello World" }
[2016-10-11 16:16:22.118567130] TRACE_WARNING (4)
sample_component:message: { 2 }, { "Hello World" }
[2016-10-11 16:16:22.118624840] TRACE_WARNING (4)
sample_component:message: { 2 }, { "Hello World" }
[2016-10-11 16:16:22.118682477] TRACE_WARNING (4)
sample_component:message: { 2 }, { "Hello World" }
{master} staffan at towel:~/src/test/lttng-easy> lttng destroy
Session auto-20161011-111412 destroyed
{master} staffan at towel:~/src/test/lttng-easy> emacs Makefile
{master} staffan at towel:~/src/test/lttng-easy> AM_CC=g++ make
make: Nothing to be done for 'all'.
{master} staffan at towel:~/src/test/lttng-easy> make lcean
make: *** No rule to make target 'lcean'.  Stop.
{master} staffan at towel:~/src/test/lttng-easy> make clean
rm -f *.html
rm -f *.o sample
{master} staffan at towel:~/src/test/lttng-easy> AM_CC=g++ make
g++  -I.   \
         -c -o sample.o sample.c
g++  -I.   \
         -c -o tp.o tp.c
g++ -o sample     \
        sample.o tp.o -ldl -llttng-ust
{master} staffan at towel:~/src/test/lttng-easy> lttng create
Session auto-20161011-111753 created.
Traces will be written in /home/staffan/lttng-traces/auto-20161011-111753
{master} staffan at towel:~/src/test/lttng-easy> lttng enable-event -u -a
All UST events are enabled in channel channel0
{master} staffan at towel:~/src/test/lttng-easy> lttng start
Tracing started for session auto-20161011-111753
{master} staffan at towel:~/src/test/lttng-easy> sample
{master} staffan at towel:~/src/test/lttng-easy> lttng stop
Waiting for data availability.
Tracing stopped for session auto-20161011-111753
{master} staffan at towel:~/src/test/lttng-easy> lttng view -e
"babeltrace -n none --clock-date --clock-gmt --no-delta -f loglevel" |
head -n 30
[2016-10-11 16:18:02.535281184] TRACE_DEBUG_LINE (13)
lttng_ust_statedump:start: { 6 }, { }
[2016-10-11 16:18:02.536099671] TRACE_DEBUG_LINE (13)
lttng_ust_statedump:soinfo: { 6 }, { 0x400000,
"/home/staffan/src/test/lttng-easy/sample", 24232, 1476202668 }
[2016-10-11 16:18:02.536185078] TRACE_DEBUG_LINE (13)
lttng_ust_statedump:soinfo: { 6 }, { 0x7FFCB49E0000,
"[linux-vdso.so.1]", 0, -1 }
[2016-10-11 16:18:02.536197222] TRACE_DEBUG_LINE (13)
sample_component:message: { 1 }, { "Hello World" }
[2016-10-11 16:18:02.536210187] TRACE_DEBUG_LINE (13)
lttng_ust_statedump:soinfo: { 6 }, { 0x7FBDD14C8000,
"/lib64/libdl-2.19.so", 18904, 1467656154 }
[2016-10-11 16:18:02.536223321] TRACE_DEBUG_LINE (13)
lttng_ust_statedump:soinfo: { 6 }, { 0x7FBDD126C000,
"/usr/lib64/liblttng-ust.so.0.0.0", 376144, 1445780443 }
[2016-10-11 16:18:02.536248525] TRACE_DEBUG_LINE (13)
lttng_ust_statedump:soinfo: { 6 }, { 0x7FBDD0EE8000,
"/usr/lib64/libstdc++.so.6.0.21", 1574408, 1459961643 }
[2016-10-11 16:18:02.536254455] TRACE_DEBUG_LINE (13)
sample_component:message: { 1 }, { "Hello World" }
[2016-10-11 16:18:02.536258569] TRACE_DEBUG_LINE (13)
lttng_ust_statedump:soinfo: { 6 }, { 0x7FBDD0BE7000,
"/lib64/libm-2.19.so", 1118640, 1467656154 }
[2016-10-11 16:18:02.536264711] TRACE_DEBUG_LINE (13)
lttng_ust_statedump:soinfo: { 6 }, { 0x7FBDD09D0000,
"/lib64/libgcc_s.so.1", 92568, 1459961618 }
[2016-10-11 16:18:02.536273618] TRACE_DEBUG_LINE (13)
lttng_ust_statedump:soinfo: { 6 }, { 0x7FBDD0628000,
"/lib64/libc-2.19.so", 1979344, 1467656154 }
[2016-10-11 16:18:02.536282489] TRACE_DEBUG_LINE (13)
lttng_ust_statedump:soinfo: { 6 }, { 0x7FBDD16CC000,
"/lib64/ld-2.19.so", 158192, 1467656153 }
[2016-10-11 16:18:02.536293368] TRACE_DEBUG_LINE (13)
lttng_ust_statedump:soinfo: { 6 }, { 0x7FBDD040D000,
"/usr/lib64/liblttng-ust-tracepoint.so.0.0.0", 43416, 1445780443 }
[2016-10-11 16:18:02.536302751] TRACE_DEBUG_LINE (13)
lttng_ust_statedump:soinfo: { 6 }, { 0x7FBDD0205000,
"/lib64/librt-2.19.so", 42672, 1467656155 }
[2016-10-11 16:18:02.536313099] TRACE_DEBUG_LINE (13)
sample_component:message: { 1 }, { "Hello World" }
[2016-10-11 16:18:02.536313336] TRACE_DEBUG_LINE (13)
lttng_ust_statedump:soinfo: { 6 }, { 0x7FBDCFFFD000,
"/usr/lib64/liburcu-bp.so.2.0.0", 31520, 1443872930 }
[2016-10-11 16:18:02.536323885] TRACE_DEBUG_LINE (13)
lttng_ust_statedump:soinfo: { 6 }, { 0x7FBDCFDF5000,
"/usr/lib64/liburcu-cds.so.2.0.0", 30984, 1443872930 }
[2016-10-11 16:18:02.536332582] TRACE_DEBUG_LINE (13)
lttng_ust_statedump:soinfo: { 6 }, { 0x7FBDCFBD8000,
"/lib64/libpthread-2.19.so", 137440, 1467656155 }
[2016-10-11 16:18:02.536335641] TRACE_DEBUG_LINE (13)
lttng_ust_statedump:end: { 6 }, { }
[2016-10-11 16:18:02.536370396] TRACE_DEBUG_LINE (13)
sample_component:message: { 1 }, { "Hello World" }
[2016-10-11 16:18:02.536427433] TRACE_DEBUG_LINE (13)
sample_component:message: { 1 }, { "Hello World" }
[2016-10-11 16:18:02.536484251] TRACE_DEBUG_LINE (13)
sample_component:message: { 1 }, { "Hello World" }
[2016-10-11 16:18:02.536541001] TRACE_DEBUG_LINE (13)
sample_component:message: { 1 }, { "Hello World" }
[2016-10-11 16:18:02.536597774] TRACE_DEBUG_LINE (13)
sample_component:message: { 1 }, { "Hello World" }
[2016-10-11 16:18:02.536654713] TRACE_DEBUG_LINE (13)
sample_component:message: { 1 }, { "Hello World" }
[2016-10-11 16:18:02.536711455] TRACE_DEBUG_LINE (13)
sample_component:message: { 1 }, { "Hello World" }
[2016-10-11 16:18:02.536768188] TRACE_DEBUG_LINE (13)
sample_component:message: { 1 }, { "Hello World" }
[2016-10-11 16:18:02.536825035] TRACE_DEBUG_LINE (13)
sample_component:message: { 1 }, { "Hello World" }
[2016-10-11 16:18:02.536881893] TRACE_DEBUG_LINE (13)
sample_component:message: { 1 }, { "Hello World" }
[2016-10-11 16:18:02.536938558] TRACE_DEBUG_LINE (13)
sample_component:message: { 1 }, { "Hello World" }




More information about the lttng-dev mailing list