[lttng-dev] [RFC PATCH lttng-ust] Fix: don't generate 0-len array in tracepoint probes
Mathieu Desnoyers
mathieu.desnoyers at efficios.com
Tue May 31 09:36:30 UTC 2016
----- On May 30, 2016, at 8:08 PM, Sebastien Boisvert sboisvert at gydle.com wrote:
> Greetings,
>
> This is a response to the message
> https://lists.lttng.org/pipermail/lttng-dev/2016-May/026066.html
>
> The builds below were generated with:
>
> lttng-ust ba5b4491f94109eaca10b2c285f8d1f116a38e5c
> gcc 4.9.3-8ubuntu2~14.04
>
> First, I compiled lttng-ust with the "-pedantic" option of gcc to verify that
> this causes an array
> of compilation errors.
>
> sboisvert at Z1:~/lttng-ust$ ./bootstrap
> sboisvert at Z1:~/lttng-ust$ ./configure --prefix=$HOME/lttng-ust.build
> sboisvert at Z1:~/lttng-ust$ make CFLAGS="-pedantic" &> log
> sboisvert at Z1:~/lttng-ust$ grep error log
> //#error UST_COMPONENT is undefined
> ../include/lttng/ust-tracepoint-event.h:291:40: error: zero or negative size
> array '__event_fields___lttng_ust_statedump___start'
> ../include/lttng/ust-tracepoint-event.h:291:40: error: zero or negative size
> array '__event_fields___lttng_ust_statedump___end'
>
>
> I applied the patch that Mathieu provided, and built the project and ran the
> tests.
>
> sboisvert at Z1:~/lttng-ust$ patch -p1 < ~/lttng-ust-empty-array.patch
> patching file include/lttng/ust-tracepoint-event.h
>
> sboisvert at Z1:~/lttng-ust$ make CFLAGS="-pedantic" &> log
> sboisvert at Z1:~/lttng-ust$ cd tests
>
> ============================================================================
> Testsuite summary for lttng-ust 2.9.0-pre
> ============================================================================
> # TOTAL: 51
> # PASS: 51
> # SKIP: 0
> # XFAIL: 0
> # FAIL: 0
> # XPASS: 0
> # ERROR: 0
> ============================================================================
>
>
> So, this patch improves the user experience when one is using advanced linting
> flags as well as
> tracepoint event probes with no arguments, and it does not break the envelope of
> known behaviour.
>
>
> +1
Great! I have run the make check tests from lttng-tools also
with the patch applied, and they also all pass. So I am merging
this into master, 2.8, 2.7 of lttng-ust.
Thanks for helping us improve LTTng!
Mathieu
> _______________________________________________
> lttng-dev mailing list
> lttng-dev at lists.lttng.org
> https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
--
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com
More information about the lttng-dev
mailing list