Message ID | 1518213412-16593-1-git-send-email-francis.deslauriers@efficios.com |
---|---|
Headers |
From: francis.deslauriers at efficios.com (Francis Deslauriers) Date: Fri, 9 Feb 2018 16:56:47 -0500 Subject: [lttng-dev] [PATCH lttng-tools v2 0/5] Support probes with the same name but different event payload In-Reply-To: <1518032219-28072-1-git-send-email-francis.deslauriers@efficios.com> References: <1518032219-28072-1-git-send-email-francis.deslauriers@efficios.com> Message-ID: <1518213412-16593-1-git-send-email-francis.deslauriers@efficios.com> |
Series |
Support probes with the same name but different event payload
|
|
Message
Francis Deslauriers
Feb. 9, 2018, 9:56 p.m. UTC
This patch set allows for multiple probes with the same name to be hooked on the same callsite. Right now, the Session Daemon only considers the name and signature of the events to determine if two events are identical. This could lead to trace corruptions when two probes would have the same name and signature but really different binary trace layouts. We now compare probes by doing a deep compare of every field. If two events are _exactly_ the same and have the same metadata then the same event ID will be used, if they are different a new event ID is created. When used with its corresponding UST patch set[1], it allows for dynamic library upgrade scenarios during tracing. The user can now dlopen a new version of a provider library and dlclose an old version without restarting the process. This patch set also includes regression tests for both the deep comparaison and the newly added dlclose capability. [1]: https://github.com/frdeso/lttng-ust/tree/dlclose-support Francis Deslauriers (5): Fix: probes should be compared strictly by events metadata Fix: calling ht_{hash, match}_enum with wrong argument Tests: allow the use of regular expressions to match events Tests: add function to validate the number of an event name in metadata Tests: add duplicated providers tests configure.ac | 1 + src/bin/lttng-sessiond/Makefile.am | 3 +- src/bin/lttng-sessiond/ust-field-utils.c | 289 ++++++++++++++++++++++++ src/bin/lttng-sessiond/ust-field-utils.h | 29 +++ src/bin/lttng-sessiond/ust-registry.c | 46 +++- tests/fast_regression | 1 + tests/regression/ust/multi-lib/Makefile.am | 114 ++++++++++ tests/regression/ust/multi-lib/README | 21 ++ tests/regression/ust/multi-lib/callsites.c | 34 +++ tests/regression/ust/multi-lib/callsites.h | 21 ++ tests/regression/ust/multi-lib/multi-lib-test.c | 251 ++++++++++++++++++++ tests/regression/ust/multi-lib/probes.c | 18 ++ tests/regression/ust/multi-lib/probes.h | 195 ++++++++++++++++ tests/regression/ust/multi-lib/test_multi_lib | 262 +++++++++++++++++++++ tests/unit/Makefile.am | 1 + tests/utils/utils.sh | 27 ++- 16 files changed, 1299 insertions(+), 14 deletions(-) create mode 100644 src/bin/lttng-sessiond/ust-field-utils.c create mode 100644 src/bin/lttng-sessiond/ust-field-utils.h create mode 100644 tests/regression/ust/multi-lib/Makefile.am create mode 100644 tests/regression/ust/multi-lib/README create mode 100644 tests/regression/ust/multi-lib/callsites.c create mode 100644 tests/regression/ust/multi-lib/callsites.h create mode 100644 tests/regression/ust/multi-lib/multi-lib-test.c create mode 100644 tests/regression/ust/multi-lib/probes.c create mode 100644 tests/regression/ust/multi-lib/probes.h create mode 100755 tests/regression/ust/multi-lib/test_multi_lib
Comments
Merged with a number of fixes to the test patch. Thanks! The CFLAGS have to be propagated to the probes target, and I added a target to ensure the EXTRA_DIST files are copied to the build directory. Also, the "comparison" test did not work on 32-bit x86 since "long" and "int" have the same size on that architecture. The test expected the events to be different, but they will be merged (as both are 32-bit integers). Jérémie On 9 February 2018 at 16:56, Francis Deslauriers < francis.deslauriers at efficios.com> wrote: > This patch set allows for multiple probes with the same name to be > hooked on the same callsite. Right now, the Session Daemon only > considers the name and signature of the events to determine if two > events are identical. This could lead to trace corruptions when two > probes would have the same name and signature but really different > binary trace layouts. > > We now compare probes by doing a deep compare of every field. If two > events are _exactly_ the same and have the same metadata then the same > event ID will be used, if they are different a new event ID is created. > > When used with its corresponding UST patch set[1], it allows for dynamic > library upgrade scenarios during tracing. The user can now dlopen a new > version of a provider library and dlclose an old version without > restarting the process. > > This patch set also includes regression tests for both the deep > comparaison and the newly added dlclose capability. > > [1]: https://github.com/frdeso/lttng-ust/tree/dlclose-support > > Francis Deslauriers (5): > Fix: probes should be compared strictly by events metadata > Fix: calling ht_{hash, match}_enum with wrong argument > Tests: allow the use of regular expressions to match events > Tests: add function to validate the number of an event name in > metadata > Tests: add duplicated providers tests > > configure.ac | 1 + > src/bin/lttng-sessiond/Makefile.am | 3 +- > src/bin/lttng-sessiond/ust-field-utils.c | 289 > ++++++++++++++++++++++++ > src/bin/lttng-sessiond/ust-field-utils.h | 29 +++ > src/bin/lttng-sessiond/ust-registry.c | 46 +++- > tests/fast_regression | 1 + > tests/regression/ust/multi-lib/Makefile.am | 114 ++++++++++ > tests/regression/ust/multi-lib/README | 21 ++ > tests/regression/ust/multi-lib/callsites.c | 34 +++ > tests/regression/ust/multi-lib/callsites.h | 21 ++ > tests/regression/ust/multi-lib/multi-lib-test.c | 251 > ++++++++++++++++++++ > tests/regression/ust/multi-lib/probes.c | 18 ++ > tests/regression/ust/multi-lib/probes.h | 195 ++++++++++++++++ > tests/regression/ust/multi-lib/test_multi_lib | 262 > +++++++++++++++++++++ > tests/unit/Makefile.am | 1 + > tests/utils/utils.sh | 27 ++- > 16 files changed, 1299 insertions(+), 14 deletions(-) > create mode 100644 src/bin/lttng-sessiond/ust-field-utils.c > create mode 100644 src/bin/lttng-sessiond/ust-field-utils.h > create mode 100644 tests/regression/ust/multi-lib/Makefile.am > create mode 100644 tests/regression/ust/multi-lib/README > create mode 100644 tests/regression/ust/multi-lib/callsites.c > create mode 100644 tests/regression/ust/multi-lib/callsites.h > create mode 100644 tests/regression/ust/multi-lib/multi-lib-test.c > create mode 100644 tests/regression/ust/multi-lib/probes.c > create mode 100644 tests/regression/ust/multi-lib/probes.h > create mode 100755 tests/regression/ust/multi-lib/test_multi_lib > > -- > 2.7.4 > >