[lttng-dev] [LTTng UST PATCH 0/2] Bug fixes for callsite unregistering
Mathieu Desnoyers
mathieu.desnoyers at efficios.com
Mon Oct 7 09:43:06 EDT 2013
Both patches merged into master, stable-2.2, stable-2.3 (with slight changes). These become the following master commits:
commit 8a7ad54be134997ab5985968ac6ada9ea58cafb9
Author: Ikaheimonen, JP <jp_ikaheimonen at mentor.com>
Date: Mon Oct 7 09:33:02 2013 -0400
Add usage reference count for tracepoints
Keep track of how many libraries use a tracepoint, and disable the
tracepoint when the number of users drops to zero.
A new reference counter is added to tracepoint_entry. This keeps track
of how many callsites use that tracepoint.
When you have libraries and/or executables sharing tracepoints, you
cannot just disable your tracepoints when the library is unregistered.
You must check that the tracepoint is not used by any other libraries
before you disable it.
Function lib_disable_tracepoints becomes unnecessary, and is removed.
Signed-off-by: Ikaheimonen, JP <jp_ikaheimonen at mentor.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers at efficios.com>
commit 33f8ed8734a97e749206ec0e856ba2c28a56dcef
Author: Mathieu Desnoyers <mathieu.desnoyers at efficios.com>
Date: Mon Oct 7 09:30:52 2013 -0400
tracepoint.c: Move add_callsite/remove_callsite further down in file
In preparation for calling disable_tracepoint() from those functions.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers at efficios.com>
commit 60d8702955d702f95053b0355d156ae032ac2bc8
Author: Ikaheimonen, JP <jp_ikaheimonen at mentor.com>
Date: Thu Oct 3 06:46:27 2013 +0000
Store the callsites into the library callsite list
Fix the issue where the callsites are registered but never
properly unregistered.
[ Edit by Mathieu Desnoyers: minor coding style fix: remove parenthesis. ]
Signed-off-by: Ikaheimonen, JP <jp_ikaheimonen at mentor.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers at efficios.com>
Thanks a lot for those fixes!!
Mathieu
----- Original Message -----
> From: "JP Ikaheimonen" <jp_ikaheimonen at mentor.com>
> To: lttng-dev at lists.lttng.org
> Sent: Thursday, October 3, 2013 2:46:20 AM
> Subject: [lttng-dev] [LTTng UST PATCH 0/2] Bug fixes for callsite unregistering
>
> The following two patches fix one bug each in LTTng UST.
>
> The first patch makes sure that when a library registers callsites, those
> callsites are also properly unregistered.
> It is only a matter of actually updating the list of callsites during
> registration.
>
> The second patch deals with nested dynamic libraries. The current code
> disables tracepoints whenever a library destructor gets called.
> But if those tracepoints are also used by some other open library, then they
> stop working.
> The solution in the patch keeps track of how many callsites use a tracepoint,
> and disables the tracepoint only after the last library logs off.
> To work, the first patch must be applied first.
>
> JP Ikaheimonen | SW Development Engineer
> http://go.mentor.com/sourceryanalyzer
> Mentor Embedded(tm) | Nucleus(r) | Linux(r) | Android(tm) | Services | UI |
> Multi-OS
> Android is a trademark of Google Inc. Use of this trademark is subject to
> Google Permissions.
> Linux is the registered trademark of Linus Torvalds in the U.S. and other
> countries.
>
>
>
> _______________________________________________
> lttng-dev mailing list
> lttng-dev at lists.lttng.org
> http://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