lttng-ust.git
3 years agoNamespace enumeration structures/enum with lttng_ust_ prefix
Mathieu Desnoyers [Wed, 17 Mar 2021 20:13:54 +0000 (16:13 -0400)] 
Namespace enumeration structures/enum with lttng_ust_ prefix

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: Icefbecc56d6425d2e6a3adebc592babf70ff60f9

3 years agoust-elf.h should be private, with public symbols
Mathieu Desnoyers [Wed, 17 Mar 2021 20:07:10 +0000 (16:07 -0400)] 
ust-elf.h should be private, with public symbols

The symbols belonging to ust-elf.h need to be public, because
liblttng-ust-dl uses them, but the header per se should be internal.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: I04495249c0c8b80b251dbf2a7f5488d093a6d999

3 years agocounter-config.h should be private
Mathieu Desnoyers [Wed, 17 Mar 2021 20:01:53 +0000 (16:01 -0400)] 
counter-config.h should be private

Move it to libcounter/.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: I28891c708d105c933bbe2c3cf656c7b7b6e6e550

3 years agoFix: perf counters context: error handling on type allocation
Mathieu Desnoyers [Wed, 17 Mar 2021 19:24:59 +0000 (15:24 -0400)] 
Fix: perf counters context: error handling on type allocation

Found by Coverity:
** CID 1450865:  Resource leaks  (RESOURCE_LEAK)
/liblttng-ust/lttng-context-perf-counters.c: 606 in lttng_add_perf_counter_to_ct)

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: I9b0cf29ceb4f8c95f0905455cda4c157c7a37165

3 years agoFix: lttng_ust_destroy_type: add missing free() for compound types
Mathieu Desnoyers [Wed, 17 Mar 2021 19:23:26 +0000 (15:23 -0400)] 
Fix: lttng_ust_destroy_type: add missing free() for compound types

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: Iea05b0cad779adef251ec000e4c126493e17aff8

3 years agoFix: missing field name refactoring in java agent
Mathieu Desnoyers [Wed, 17 Mar 2021 18:56:46 +0000 (14:56 -0400)] 
Fix: missing field name refactoring in java agent

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: I28fcf080545cad5bc44270419059bcaaa627572e

3 years agoFix: replace ringbuffer-config.h by ringbuffer-context.h include
Mathieu Desnoyers [Wed, 17 Mar 2021 18:39:10 +0000 (14:39 -0400)] 
Fix: replace ringbuffer-config.h by ringbuffer-context.h include

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: I5d1f3333c8906afaf632b82742d101683a13cd5c

3 years agoAdd missing ringbuffer-context.h
Mathieu Desnoyers [Wed, 17 Mar 2021 18:18:28 +0000 (14:18 -0400)] 
Add missing ringbuffer-context.h

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: I3dcf5b2c12c88570b9089b187d7e560af26e96af

3 years agoRefactoring: Privatize ring buffer config header
Mathieu Desnoyers [Wed, 17 Mar 2021 18:10:38 +0000 (14:10 -0400)] 
Refactoring: Privatize ring buffer config header

The public header ringbuffer-config.h contains two distinct sets of APIs
and structure declarations:

- Ring buffer configuration, which should become private (moved to
  libringbuffer/ringbuffer-config.h),
- Ring buffer context for use when writing an event record into the
  ring buffer. This part is moved to a new "ringbuffer-context.h" public
  header.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: I07dae33ab5e3925dea0158058d484c49292a0bb0

3 years agoRefactoring: Introduce extensibility scheme for tracepoint structures
Mathieu Desnoyers [Wed, 17 Mar 2021 16:44:51 +0000 (12:44 -0400)] 
Refactoring: Introduce extensibility scheme for tracepoint structures

- Introduce struct_size extensibility scheme for all tracepoint public
  structures, except for struct lttng_ust_tracepoint_probe which is
  embedded in a public array of structures, thus making it tricky for
  instrumentation sites to efficiently skip over the array elements
  without reading their size.
- Remove padding from those structures.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: I2387a62c03f6f729c59ddc3fafa3a9b5546fb287

3 years agoClean-up: ustctl: adapt comment to use new ABI name
Jérémie Galarneau [Wed, 17 Mar 2021 16:20:05 +0000 (12:20 -0400)] 
Clean-up: ustctl: adapt comment to use new ABI name

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: Ie099ab21cccd82212ad7339ae3c55dee685b54a0

3 years agoFix: ustctl: leak of event notifier data on communication error
Jérémie Galarneau [Wed, 17 Mar 2021 16:16:18 +0000 (12:16 -0400)] 
Fix: ustctl: leak of event notifier data on communication error

The `len != sizeof(*event_notifier)` error path does not free
the `event_notifier_data` even though it is not provided to the caller.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: Ie3b4ebf77e8ca7205d802c6db67c23c347aa29df

3 years agoRefactoring: UST types public interfaces
Mathieu Desnoyers [Wed, 17 Mar 2021 02:41:20 +0000 (22:41 -0400)] 
Refactoring: UST types public interfaces

- Properly namespace public type interfaces with lttng_ust_ prefix,
- Move from union to parent embedding into children for inheritance.
- Introduce struct lttng_ust_type_common, which is fixed-size, to
  contain the type selector. Used as parent for each sub-type.
- Use compound literals on tracepoint probe definition rather than
  nesting into event field structure to allow each type to be extended
  with a struct_size scheme.
- The parent field is required to be the first field of each sub-type,
  allowing cast between parent and children types.
- Remove const-ness from various probe provider visible types to
  facilitate re-use of the code for eventual dynamically allocated
  structures.
- Remove "field_name" field from lttng_ust_ctx_field. Instead,
  dynamically allocate field names for each context.
- Introduce get_type_max_align() in lttng-context.c now used by
  lttng_context_update(). It performs a recursive traversal of the
  nested types rather than erroring out on recursive cases.
- Move "encoding" from integer type to array and sequences types.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: If99a2689f042b7e642b373e4646e9f85c009a47d

3 years agoRefactoring: remove struct_size from struct lttng_ust_ctx_value
Mathieu Desnoyers [Wed, 17 Mar 2021 02:12:13 +0000 (22:12 -0400)] 
Refactoring: remove struct_size from struct lttng_ust_ctx_value

The struct_size scheme is not appropriate to extend struct
lttng_ust_ctx_value because its type selector and union already
act as a mean to extend it. When new entries are added to the union,
the size of that union may increase, thus shifting the offset of
fields following that union. It is therefore not possible to extend
it by adding fields after the union, thus making the struct_size
scheme irrelevant.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: I9e80e0ea87c3df3fe76863ed5343de733210045e

3 years agoRefactoring: struct lttng_ust_channel_ops
Mathieu Desnoyers [Tue, 16 Mar 2021 20:31:30 +0000 (16:31 -0400)] 
Refactoring: struct lttng_ust_channel_ops

- Move internal fields to struct lttng_ust_channel_ops_private.
- Add private/public relationships between the two structures.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: Id8018d8e11df6db569e20fffb6f2ed08e47c452e

3 years agoHide forward declaration of struct lttng_event_notifier_group
Mathieu Desnoyers [Tue, 16 Mar 2021 20:21:00 +0000 (16:21 -0400)] 
Hide forward declaration of struct lttng_event_notifier_group

Only used internally.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: I71e26758404df22923371b76761eff9d1a4a8237

3 years agoNamepace struct lttng_session with lttng_ust_ prefix
Mathieu Desnoyers [Tue, 16 Mar 2021 20:19:34 +0000 (16:19 -0400)] 
Namepace struct lttng_session with lttng_ust_ prefix

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: I6f35753cda29c51f62cc90ccf7328a7255f77af7

3 years agoCleanup: public type macros coding style
Mathieu Desnoyers [Tue, 16 Mar 2021 20:17:26 +0000 (16:17 -0400)] 
Cleanup: public type macros coding style

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: I6732b20d1e2975f2a00678e00dc84c4ac6f7be67

3 years agoCleanup: Add whitelines after struct_size fields
Mathieu Desnoyers [Tue, 16 Mar 2021 20:11:37 +0000 (16:11 -0400)] 
Cleanup: Add whitelines after struct_size fields

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: I78e521c17437a17b1a65fd4387ad422d2e79aa36

3 years agoRefactoring: context structures
Mathieu Desnoyers [Tue, 16 Mar 2021 18:51:18 +0000 (14:51 -0400)] 
Refactoring: context structures

The context structures are now hidden in headers which are not
installed, but those are still part of the UST ABI. Therefore, we need
to update them to make sure those are extensible.

- Namespace theses structures with lttng_ust_ prefix,
- Use struct_size extensibility scheme. There was no prior padding, so
  extensibility was an issue in the past.
- Remove padding.
- This requires that none of those structures can be nested. It also
  requires that all arrays of structures must be replaced by arrays of
  pointers to structures.
- Replace struct lttng_perf_counter_field pointer by a private data
  pointer.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: I4ecb8f73652770f15c693c1b5b2acce3e871a64b

3 years agocleanup: add comments to lttng/ust-endian.h
Michael Jeanson [Mon, 15 Mar 2021 17:50:50 +0000 (13:50 -0400)] 
cleanup: add comments to lttng/ust-endian.h

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: I60967d2791434dc513d36dbb8d7b671f13c0be7e

3 years agoNamespace 'struct channel' under 'lttng_ust_lib_ring_buffer_'
Michael Jeanson [Fri, 12 Mar 2021 20:27:26 +0000 (15:27 -0500)] 
Namespace 'struct channel' under 'lttng_ust_lib_ring_buffer_'

The major SONAME bump to '1' gives us the opportunity to properly
namespace some older parts of the API.

Change-Id: Iab40cde0c9ccc36d9fb537d665eb11d8d96da847
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
3 years agoMove context types to private header
Michael Jeanson [Fri, 12 Mar 2021 19:04:44 +0000 (14:04 -0500)] 
Move context types to private header

This is an API change but the major SONAME bump to '1' gives us the
opportunity to hide symbols that should have been private from the
start.

Change-Id: Iad136e690b420e497b6b8d39155608278f537f7b
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
3 years agoMove lttng_ust_dl_update to private ABI
Michael Jeanson [Fri, 12 Mar 2021 15:50:00 +0000 (10:50 -0500)] 
Move lttng_ust_dl_update to private ABI

This symbol is part of the ABI between liblttng-ust-dl and liblltng-ust
and is not part of the public API.

Change-Id: Ic2a12568b8e0d78ec3493e644c797df1cf87c63b
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
3 years agoNamespace private ABI lttng_transport_find symbol
Michael Jeanson [Thu, 11 Mar 2021 21:48:47 +0000 (16:48 -0500)] 
Namespace private ABI lttng_transport_find symbol

The major SONAME bump to '1' gives us the opportunity to properly
namespace public symbols. This symbol is part of the ABI between
liblttng-ust-ctl and liblltng-ust and is not part of the public API.

Change-Id: Ibdb33aff98f7b974fac3c28889718851286ce2f9
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
3 years agoHide private lttng_session_active symbol
Michael Jeanson [Thu, 11 Mar 2021 21:40:02 +0000 (16:40 -0500)] 
Hide private lttng_session_active symbol

The major SONAME bump to '1' gives us the opportunity to hide private
symbols that should never have been visible.

Change-Id: I2700903465892d58d430bec0b76cde12018fede2
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
3 years agoNamespace lttng_context_procname_reset public symbol
Michael Jeanson [Thu, 11 Mar 2021 21:24:46 +0000 (16:24 -0500)] 
Namespace lttng_context_procname_reset public symbol

The major SONAME bump to '1' gives us the opportunity to properly
namespace public symbols. Note that this is also an API break.

Change-Id: I9f966ce7f4c112542f602e78a5e4f5c8f0d0f642
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
3 years agoRemove LTTNG_HIDDEN macro
Michael Jeanson [Wed, 10 Mar 2021 19:09:52 +0000 (14:09 -0500)] 
Remove LTTNG_HIDDEN macro

We already use __attribute__((visibility("hidden"))) directly in the
public API and in some parts of the code. Remove the LTTNG_HIDDEN macro
and replace it with the literal attribute.

Change-Id: I9aa0698ba08c742c2a25aec24560b7789e303eaa
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
3 years agoHide or namespace the remaining tracepoint internal symbols
Michael Jeanson [Tue, 9 Mar 2021 19:56:44 +0000 (14:56 -0500)] 
Hide or namespace the remaining tracepoint internal symbols

The major SONAME bump to '1' gives us the opportunity to hide private
symbols that should never have been visible.

Namespace the symbols that are part of the liblttng-ust-tracepoint ABI
but are not part of the public API.

Change-Id: I46125715e88f88891fe0c02a95adbbf6792a33e2
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
3 years agoRefactoring: struct lttng_stack_ctx
Mathieu Desnoyers [Tue, 16 Mar 2021 03:13:54 +0000 (23:13 -0400)] 
Refactoring: struct lttng_stack_ctx

- Namespace this structure with lttng_ust_ prefix,
- Use struct_size extensibility scheme.
- Remove padding.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: Ieb0679f78a18553c6d60a70d78e0f7f99181d646

3 years agoRefactoring: struct lttng_bytecode_runtime
Mathieu Desnoyers [Tue, 16 Mar 2021 03:06:59 +0000 (23:06 -0400)] 
Refactoring: struct lttng_bytecode_runtime

- Namespace this structure with lttng_ust_ prefix,
- Use struct_size extensibility scheme. There was no prior padding, so
  extensibility was an issue in the past.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: I27f28092894332ec1ba6f9f9d0a5fae3f04df6fd

3 years agoMove hash tables to internal header
Mathieu Desnoyers [Tue, 16 Mar 2021 02:59:35 +0000 (22:59 -0400)] 
Move hash tables to internal header

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: I314bd74c593c2b48dbc9af31ff25dab7a3738382

3 years agoCleanup: add whiteline after struct_size field
Mathieu Desnoyers [Tue, 16 Mar 2021 02:57:58 +0000 (22:57 -0400)] 
Cleanup: add whiteline after struct_size field

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: I5a5ba8ee5e0f5b3fb539cb5c548f6086916f198b

3 years agoMove struct lttng_counter_ops to internal header
Mathieu Desnoyers [Tue, 16 Mar 2021 02:56:45 +0000 (22:56 -0400)] 
Move struct lttng_counter_ops to internal header

As of LTTng-UST 2.13, this structure does not yet need to be public.
Keep it internal for now.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: I3346a61ff1a98dcbebbcfe4ac68eb823f5645f7b

3 years agoMove struct lttng_enum to internal header
Mathieu Desnoyers [Tue, 16 Mar 2021 02:53:36 +0000 (22:53 -0400)] 
Move struct lttng_enum to internal header

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: I7bc601ea23fe57c23cca2ce45dc3931824b17a8e

3 years agoRefactoring: struct lttng_channel_ops
Mathieu Desnoyers [Tue, 16 Mar 2021 02:50:28 +0000 (22:50 -0400)] 
Refactoring: struct lttng_channel_ops

- Namespace this structure with lttng_ust_ prefix,
- Use struct_size extensibility scheme. There was no prior padding, so
  extensibility was an issue in the past.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: Ie8334f5f651f100aaea60ee83d3c8e2b6b300a5a

3 years agoRefactoring: struct lttng_enum_desc and lttng_enum_entry
Mathieu Desnoyers [Tue, 16 Mar 2021 02:35:29 +0000 (22:35 -0400)] 
Refactoring: struct lttng_enum_desc and lttng_enum_entry

- Namespace these structures with lttng_ust_ prefix,
- Use struct_size extensibility scheme,
- Remove padding,
- Use an array of pointers to structure rather than array of enumeration
  entries to allow easier handling of extensibility. This is achieved by
  using __LTTNG_COMPOUND_LITERAL().

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: I2bf6e24e22c9646fc321f6c7c9ffcbd32ed22da0

3 years agoRefactoring: struct lttng_event_field
Mathieu Desnoyers [Mon, 15 Mar 2021 21:23:57 +0000 (17:23 -0400)] 
Refactoring: struct lttng_event_field

- Namespace this structure with lttng_ust_ prefix,
- Use struct_size extensibility scheme,
- Remove padding,
- Use an array of pointers to structure rather than array of event
  fields to allow easier handling of extensibility. This is achieved by
  using __LTTNG_COMPOUND_LITERAL().
- Move nofilter field into structure.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: Iaa0056ff2d67042d0b6fca156c8f8072ae1820ea

3 years agoRefactoring: struct lttng_event_desc and lttng_probe_desc
Mathieu Desnoyers [Mon, 15 Mar 2021 20:48:58 +0000 (16:48 -0400)] 
Refactoring: struct lttng_event_desc and lttng_probe_desc

- Properly namespace probe registration functions,
- Namespace those structures with lttng_ust_ prefix,
- Use struct_size extensibility scheme,
- Remove padding.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: I316a4120d568b663381f4b9eae3e1405a83a1db5

3 years agoDocument public event and session structures
Mathieu Desnoyers [Mon, 15 Mar 2021 20:33:31 +0000 (16:33 -0400)] 
Document public event and session structures

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: I50cd2a5d122eed9fe5b333919bbba351dd0867d3

3 years agoDocument public event structures
Mathieu Desnoyers [Mon, 15 Mar 2021 20:30:48 +0000 (16:30 -0400)] 
Document public event structures

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: Ibf2db56513a3b8dc010ee41951d287b410c9144b

3 years agoRefactoring: combine event recorder and notifier callback functions
Mathieu Desnoyers [Mon, 15 Mar 2021 18:57:44 +0000 (14:57 -0400)] 
Refactoring: combine event recorder and notifier callback functions

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: I6e2c8021220072da9a8455a31e48db9d740edfe7

3 years agoIntroduce event type field in common structure
Mathieu Desnoyers [Mon, 15 Mar 2021 15:20:48 +0000 (11:20 -0400)] 
Introduce event type field in common structure

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: Iee7f9700d60fab87e928bba11309fd8f4fad09a8

3 years agoRefactor struct lttng_ust_lib_ring_buffer_ctx
Mathieu Desnoyers [Mon, 15 Mar 2021 14:37:44 +0000 (10:37 -0400)] 
Refactor struct lttng_ust_lib_ring_buffer_ctx

- Remove padding entirely. Will be replaced by checks against
  @struct_size.
- Rename @ctx_len to @struct_size, to align with the rest of the other
  structures.
- Remove priv vs priv2 private data fields. "priv" held a pointer only
  useful for legacy ABI. Set priv2 to the lttng_ctx used in the current
  ABI instead.
- Remove checks for @ctx_len only useful to support old ABI.
- Remove fallback code for old ABI.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: I1273be9615846304266206769700e799bde4e51f

3 years agoCombine common recorder/notifier functions to lttng_free_event_filter_runtime
Mathieu Desnoyers [Mon, 15 Mar 2021 14:06:39 +0000 (10:06 -0400)] 
Combine common recorder/notifier functions to lttng_free_event_filter_runtime

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: If62cd44dd4036a907d28398ee9057d624b54fe89

3 years agoRename struct lttng_event_notifier to struct lttng_ust_event_notifier
Mathieu Desnoyers [Fri, 12 Mar 2021 22:01:36 +0000 (17:01 -0500)] 
Rename struct lttng_event_notifier to struct lttng_ust_event_notifier

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: Iadedb3dec4a8746f7a67f43f3e15c9f2e19c5063

3 years agoRefactoring: namespace ust-abi.h content under regular prefix
Mathieu Desnoyers [Fri, 12 Mar 2021 20:11:02 +0000 (15:11 -0500)] 
Refactoring: namespace ust-abi.h content under regular prefix

Eliminates namespace clashes within lttng-ust. Use the LTTNG_UST_ABI_
and lttng_ust_abi_ prefixes for all symbols and defines in
lttng/ust-abi.h.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: Ic31956416ec384a23023d9c69b140a3694edc839

3 years agoRefactor event notifier structure
Mathieu Desnoyers [Fri, 12 Mar 2021 19:36:22 +0000 (14:36 -0500)] 
Refactor event notifier structure

Move common public fields to struct lttng_ust_event_common, and move
private fields to struct lttng_ust_event_notifier_private.

The user_token is moved to struct lttng_ust_event_common_private,
because it will be used by trace hit counters in the future.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: I056a632b02e4e7cf7adae87ad03a3bdd871e56a5

3 years agoRename struct lttng_event_common to struct lttng_ust_event_common
Mathieu Desnoyers [Fri, 12 Mar 2021 19:05:54 +0000 (14:05 -0500)] 
Rename struct lttng_event_common to struct lttng_ust_event_common

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: Ie0c7898c8ff65f8d121ca2efb803275c08eadf99

3 years agoRename struct lttng_event to struct lttng_ust_event_recorder
Mathieu Desnoyers [Fri, 12 Mar 2021 19:01:55 +0000 (14:01 -0500)] 
Rename struct lttng_event to struct lttng_ust_event_recorder

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: I8b71cdf178602b2fe12292454960e498248da887

3 years agoIntroduce common event structure
Mathieu Desnoyers [Fri, 12 Mar 2021 18:35:47 +0000 (13:35 -0500)] 
Introduce common event structure

Will allow combining common fields of event and event notifier structures.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: Iae4ac899d31b1bc3e3130f6f8e17451920bc5fbb

3 years agoFix: bytecode linker: iteration on wrong list head
Mathieu Desnoyers [Fri, 12 Mar 2021 13:42:23 +0000 (08:42 -0500)] 
Fix: bytecode linker: iteration on wrong list head

lttng_enabler_link_bytecode() calls link_bytecode() passing an insertion
location (insert_loc) within the list. This insert location is meant to
be used as cursor position where to add the new element.

However, bytecode_is_linked() uses it as iteration list head, and this
is where things fall apart: it will thus consider the real list head as
being a list node, and will erroneously think that it is contained
within a struct lttng_bytecode_runtime, and thus try to perform possibly
out-of-bound read or read garbage data for the comparison.

It worked fine most of the time because in usual scenarios the insert
location is the list head. It falls apart when many bytecodes are linked
to a given event.

Fixes: 53b9d7db85d ("Decouple `struct lttng_event` from filter code")
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: Ie47171e981986a30b45b92f82811ff15aae38ad2

3 years agoFix: re-introduce basic type serialization functions
Mathieu Desnoyers [Thu, 11 Mar 2021 21:33:45 +0000 (16:33 -0500)] 
Fix: re-introduce basic type serialization functions

The basic type serialization functions were removed by mistake in the
recent type cleanup. Add them back, but targeting the new (non-legacy)
field members rather than the legacy field members which are now
removed.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: I36ab9f8354982c9208eb0acd8a7d62ba4fbb85a1

3 years agoRemove array, sequence, enum, struct legacy types
Mathieu Desnoyers [Thu, 11 Mar 2021 21:20:12 +0000 (16:20 -0500)] 
Remove array, sequence, enum, struct legacy types

Those are replaced by array_nestable, sequence_nestable, enum_nestable
and struct_nestable. The ABI bump allows removing the old types.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: Ida75c05db82fa51408b54bb005a300a40b601f88

3 years agoAdd structure size field to struct lttng_session
Mathieu Desnoyers [Thu, 11 Mar 2021 21:02:00 +0000 (16:02 -0500)] 
Add structure size field to struct lttng_session

Made possible by ABI bump. This scheme can be used for extensibility.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: I8d264969b866e7f06a835731753911718dd09727

3 years agoAdd structure size field to struct lttng_event
Mathieu Desnoyers [Thu, 11 Mar 2021 21:00:19 +0000 (16:00 -0500)] 
Add structure size field to struct lttng_event

Made possible by ABI bump. This scheme can be used for extensibility.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: I38b15636605339f3f8702983aeaffafa1ab56719

3 years agoRefactoring: introduce session private structure
Mathieu Desnoyers [Thu, 11 Mar 2021 20:48:52 +0000 (15:48 -0500)] 
Refactoring: introduce session private structure

Move private session fields to private structure. Made possible by major
ABI bump.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: I7fa738363c79bfb9636f2c0e57d5f40fe95da7ca

3 years agoRefactoring: introduce bytecode runtime private structure
Mathieu Desnoyers [Thu, 11 Mar 2021 20:26:03 +0000 (15:26 -0500)] 
Refactoring: introduce bytecode runtime private structure

Move private bytecode runtime fields to private structure. Made possible
by major ABI bump.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: I142d0edafb2fe1231454d145822b60a8a8a91c6e

3 years agoRefactoring: introduce event private structure
Mathieu Desnoyers [Thu, 11 Mar 2021 20:07:20 +0000 (15:07 -0500)] 
Refactoring: introduce event private structure

Move private event fields to private structure. Made possible by major
ABI bump.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: I241a2a574fb2b58d1b0e466058931af45e1d69e0

3 years agoNamespace tracepoint_init and tracepoint_exit
Michael Jeanson [Wed, 10 Mar 2021 22:07:57 +0000 (17:07 -0500)] 
Namespace tracepoint_init and tracepoint_exit

These are ABI symbols of liblttng-ust-tracepoint, namespace them under
'lttng_ust_tp_'.

Change-Id: Ic9fe173cd475179444a2a680e2e3eaba6622cbef
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
3 years agoRemove lttng_ust_synchronize_trace public symbol
Michael Jeanson [Wed, 10 Mar 2021 22:15:28 +0000 (17:15 -0500)] 
Remove lttng_ust_synchronize_trace public symbol

Remove 'lttng_ust_synchronize_trace', an ABI symbol of the
liblttng-ust-tracepoint library that only wraps
'lttng_ust_urcu_synchronize_rcu', a common extern symbol across
all libraries.

Replace it with direct calls to 'lttng_ust_urcu_synchronize_rcu'.

Change-Id: Ieed2e4a195bb1cfab5a97d746024a6a1c5854362
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
3 years agoHide remaining tracer core private symbols
Michael Jeanson [Wed, 10 Mar 2021 15:38:46 +0000 (10:38 -0500)] 
Hide remaining tracer core private symbols

The major SONAME bump to '1' gives us the opportunity to hide private
symbols that should never have been visible.

Change-Id: Id95785fcfbb79355bec1422e06f608ea3dd53134
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
3 years agoExpose liblttng-libc-wrapper malloc ctor in public header
Michael Jeanson [Wed, 10 Mar 2021 15:57:30 +0000 (10:57 -0500)] 
Expose liblttng-libc-wrapper malloc ctor in public header

Document the reason why the liblttng-libc-wrapper malloc constructor is
ABI in a public header. Also namespace it under
'lttng_ust_libc_wrapper_' in case we add other public symbols to this
library.

Change-Id: I2db6f685ba5368a1ce1929e6baa64cd6322c83e7
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
3 years agoHide private context utils symbols
Michael Jeanson [Wed, 10 Mar 2021 15:39:39 +0000 (10:39 -0500)] 
Hide private context utils symbols

The major SONAME bump to '1' gives us the opportunity to hide private
symbols that should never have been visible.

Change-Id: I458dbe5f3abc712543a035dad241c40df60dae55
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
3 years agoAdd missing doc/man/vtracelog.3 to gitignore
Michael Jeanson [Wed, 10 Mar 2021 15:36:59 +0000 (10:36 -0500)] 
Add missing doc/man/vtracelog.3 to gitignore

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: Iffa3d5082ba2df645cdbc068373aa6eda051f596

3 years agotracef-tracelog-limitations.txt: take variadic variant into account
Philippe Proulx [Wed, 10 Mar 2021 03:41:34 +0000 (22:41 -0500)] 
tracef-tracelog-limitations.txt: take variadic variant into account

This patch changes `tracef-tracelog-limitations.txt` so as to always
mention the variadic variant where the non-variadic variant is mentioned
for consistency.

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: I13250fdae647ea58c042238c88b674c56d4f3fc0

3 years agotracef.3.txt/tracelog.3.txt: always take variadic variants into account
Philippe Proulx [Wed, 10 Mar 2021 03:38:35 +0000 (22:38 -0500)] 
tracef.3.txt/tracelog.3.txt: always take variadic variants into account

This patch makes the `tracef.3.txt` and `tracelog.3.txt` manual page
sources always mention the variadic variant where the non-variadic
variant is mentioned for consistency.

This patch also changes the `va_list` type from the "SYNOPSIS" sections
as vtracef() and vtracelog() are macros. The type of the `ap` parameter
(`va_list`) is given in the "DESCRIPTION" sections.

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: I84a795d16a39a483c43f1963189cd7e1faa5c329

3 years agodoc/man/Makefile.am: handle vtracef(3) and vtracelog(3) correctly
Philippe Proulx [Wed, 10 Mar 2021 03:35:48 +0000 (22:35 -0500)] 
doc/man/Makefile.am: handle vtracef(3) and vtracelog(3) correctly

This patch adds explicit grouped target rules to `doc/man/Makefile.am`
to handle the vtracef(3) and vtracelog(3) manual page generation
correctly.

This patch also adds `vtracef.3` and `vtracelog.3` to the list of files
to clean.

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: Ia91db414693f1d336933a347ada13cfd430a9e53

3 years agotracelog.3.txt: add `vtracelog` to the "NAME" section
Philippe Proulx [Wed, 10 Mar 2021 03:03:34 +0000 (22:03 -0500)] 
tracelog.3.txt: add `vtracelog` to the "NAME" section

This makes the build process also generate `vtracelog.3` which only
includes the contents of `tracelog.3`.

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: I328242aeec9653f98e3888c07903fdd74d4c73ed

3 years agolttng-ust(3): reorganize the "Context information" section
Philippe Proulx [Tue, 9 Mar 2021 20:48:06 +0000 (15:48 -0500)] 
lttng-ust(3): reorganize the "Context information" section

This patch reorganizes the "Context information" of the
lttng-ust(3) manual page so as to categorize the context fields
into:

* General context fields
* Process context fields
* perf context fields
* Namespace context fields
* Credential context fields

This patch also changes parts of said section to replace some external
manual page references with English nouns for consistency, moving the
references to parentheses.

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: Ib93111ab9d252f891fab0a21c106dcf7d33975a3

3 years agoHide tls fixup private symbols
Michael Jeanson [Tue, 9 Mar 2021 21:44:22 +0000 (16:44 -0500)] 
Hide tls fixup private symbols

The major SONAME bump to '1' gives us the opportunity to hide private
symbols that should never have been visible.

Change-Id: I83f6f9c65689cbc686560f87295f23b6d0e49ad6
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
3 years agoHide ust_lock private symbols
Michael Jeanson [Tue, 9 Mar 2021 21:35:20 +0000 (16:35 -0500)] 
Hide ust_lock private symbols

The major SONAME bump to '1' gives us the opportunity to hide private
symbols that should never have been visible.

Change-Id: I1dbe60bba35dffd8c36db7f9145a80a9ab56ab3e
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
3 years agoHide strutils private symbols
Michael Jeanson [Tue, 9 Mar 2021 19:53:26 +0000 (14:53 -0500)] 
Hide strutils private symbols

The major SONAME bump to '1' gives us the opportunity to hide private
symbols that should never have been visible.

Change-Id: I5be6ac61b27b31c0a1901b14aa0e864f331e4346
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
3 years agoHide lttng_ust_statedump private symbols
Michael Jeanson [Tue, 9 Mar 2021 19:51:36 +0000 (14:51 -0500)] 
Hide lttng_ust_statedump private symbols

The major SONAME bump to '1' gives us the opportunity to hide private
symbols that should never have been visible.

Change-Id: Iba28039a659231d45b67813eb1f4f8913a612bbd
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
3 years agoHide print_op private symbol
Michael Jeanson [Tue, 9 Mar 2021 19:49:03 +0000 (14:49 -0500)] 
Hide print_op private symbol

The major SONAME bump to '1' gives us the opportunity to hide private
symbols that should never have been visible.

Also namespace print_op to lttng_bytecode_print_op.

Change-Id: I937b37605d88503102227e82e58600e66f89b5c6
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
3 years agoHide lttng_ust_getenv private symbols
Michael Jeanson [Tue, 9 Mar 2021 19:41:26 +0000 (14:41 -0500)] 
Hide lttng_ust_getenv private symbols

The major SONAME bump to '1' gives us the opportunity to hide private
symbols that should never have been visible.

Also namespace lttng_getenv to lttng_ust_getenv to match the init
function.

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: I03f9c4f431d521a3b2419bde23a51d495155730c

3 years agocounter: shrink down number of dimensions to 4
Mathieu Desnoyers [Wed, 10 Mar 2021 14:22:25 +0000 (09:22 -0500)] 
counter: shrink down number of dimensions to 4

This is in line with upcoming development using counters.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: I13cae3176b71966ff5c731d903d4e677870a346b

3 years agocounters: add coalesce_hits to control API and protocol
Mathieu Desnoyers [Wed, 10 Mar 2021 14:20:36 +0000 (09:20 -0500)] 
counters: add coalesce_hits to control API and protocol

This will be required by an upcoming feature in a subsequent release, so
plan ahead with a coalesce_hits field. It is currently unused by
liblttng-ust.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: Id15f573f523cd3873a7190135ff7009fbcfbb042

3 years agoliblttng-ust-fd doesn't use the internal logging system
Michael Jeanson [Tue, 9 Mar 2021 17:14:12 +0000 (12:14 -0500)] 
liblttng-ust-fd doesn't use the internal logging system

liblttng-ust-fd is a standalone library that only uses liblttng-ust
public symbols and doesn't currently use the internal logging system. We
don't need to link against the private convenience library and
initialize the logging system, clean this up.

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: Ifd111722e4034de70f68adc3c84b466e3d490370

3 years agoMake 'lttng/ust-error.h' official API
Michael Jeanson [Thu, 4 Mar 2021 15:47:44 +0000 (10:47 -0500)] 
Make 'lttng/ust-error.h' official API

Change-Id: I94a96a08438b915980d47042202869253811e410
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
3 years agoDrop unused typedef t_statedump_func_ptr from API
Michael Jeanson [Mon, 8 Mar 2021 16:49:58 +0000 (11:49 -0500)] 
Drop unused typedef t_statedump_func_ptr from API

Change-Id: I075eafea76ce07fff9a2a3b83f965a73c0aad41c
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
3 years agoREADME: lttng-ust does not depend on liburcu at runtime anymore
Mathieu Desnoyers [Tue, 9 Mar 2021 19:01:05 +0000 (14:01 -0500)] 
README: lttng-ust does not depend on liburcu at runtime anymore

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: I2c5660168341b6c3a76bf7843f398c45f9e58100

3 years agoMove ust-events.h private structs to internal
Michael Jeanson [Fri, 5 Mar 2021 17:09:58 +0000 (12:09 -0500)] 
Move ust-events.h private structs to internal

This is an API change but the major SONAME bump to '1' gives us the
opportunity to hide symbols that should have been private from the
start.

Change-Id: Icb7dd50ec33917799d0e26dbe792f32d00b5393e
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
3 years agoMove ust-events.h private functions to internal
Michael Jeanson [Fri, 5 Mar 2021 17:10:59 +0000 (12:10 -0500)] 
Move ust-events.h private functions to internal

This is an API change but the major SONAME bump to '1' gives us the
opportunity to hide symbols that should have been private from the
start.

Change-Id: Ic797f0b17f9edac5d5b2115428afbd241b1c778b
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
3 years agoRemove forward decl for unused 'struct lttng_ust_context_app'
Michael Jeanson [Fri, 5 Mar 2021 19:22:38 +0000 (14:22 -0500)] 
Remove forward decl for unused 'struct lttng_ust_context_app'

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: I29aae53fe8f134d6579f828196693d5578922b7f

3 years agoMove 'struct lttng_enabler' to private headers
Michael Jeanson [Fri, 5 Mar 2021 16:47:33 +0000 (11:47 -0500)] 
Move 'struct lttng_enabler' to private headers

This is an API change but the major SONAME bump to '1' gives us the
opportunity to hide symbols that should have been private from the
start.

Change-Id: I2f6df1d8e5844aeb2e3311e7fb3608e9d55ebec5
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
3 years agoMove 'enum lttng_client_types' to private headers
Michael Jeanson [Fri, 5 Mar 2021 16:39:35 +0000 (11:39 -0500)] 
Move 'enum lttng_client_types' to private headers

This is an API change but the major SONAME bump to '1' gives us the
opportunity to hide symbols that should have been private from the
start.

Change-Id: I1be3b2b93fa31e86f27085de75b492ab88157c83
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
3 years agoMove context symbols to private header
Michael Jeanson [Tue, 23 Feb 2021 22:16:35 +0000 (17:16 -0500)] 
Move context symbols to private header

This is an API change but the major SONAME bump to '1' gives us the
opportunity to hide symbols that should have been private from the
start.

Change-Id: I5719866bf6041f683dc62b612c671051cc397d79
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
3 years agoRemove leftover symbols from liburcu-bp compat
Michael Jeanson [Thu, 4 Mar 2021 22:51:24 +0000 (17:51 -0500)] 
Remove leftover symbols from liburcu-bp compat

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: I2c8a2ca1330b38862eafb41243b52dae91b57862

3 years agoRemove unused ring buffer client callbacks symbols
Mathieu Desnoyers [Mon, 8 Mar 2021 17:51:06 +0000 (12:51 -0500)] 
Remove unused ring buffer client callbacks symbols

This is an API change but the major SONAME bump to '1' gives us the
opportunity to remove symbols which are unused.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: Ifa147982cc520a3ef3c5fd6f09857ece27e769a3

3 years agoRemove ring buffer client callbacks from public headers
Michael Jeanson [Mon, 8 Mar 2021 16:59:40 +0000 (11:59 -0500)] 
Remove ring buffer client callbacks from public headers

This is an API change but the major SONAME bump to '1' gives us the
opportunity to hide symbols that should have been private from the
start.

Change-Id: I41292fc7e18764abf8ba53860ecab568a4c7a88a
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
3 years agoMove lttng_ust_fixup_fd_tracker_tls to private header
Michael Jeanson [Wed, 3 Mar 2021 22:47:36 +0000 (17:47 -0500)] 
Move lttng_ust_fixup_fd_tracker_tls to private header

This is an API change but the major SONAME bump to '1' gives us the
opportunity to hide symbols that should have been private from the
start.

Change-Id: Ic259b140f849e71ccbd0cafbc25d79144bb3f4a2
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
3 years agoMove perf counter symbols to private header
Michael Jeanson [Wed, 3 Mar 2021 22:32:55 +0000 (17:32 -0500)] 
Move perf counter symbols to private header

This is an API change but the major SONAME bump to '1' gives us the
opportunity to hide symbols that should have been private from the
start.

This also allows to stop exposing LTTNG_UST_HAVE_PERF_EVENT in the
public headers.

Change-Id: I43893b7bad6d447e86af33ad99def6c76689123f
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
3 years agoBump liblttng-ust-ctl soname major to 5
Michael Jeanson [Wed, 3 Mar 2021 16:59:07 +0000 (11:59 -0500)] 
Bump liblttng-ust-ctl soname major to 5

The cleanups to liblttng-ust ABI also results in private symbols that
were exposed to disappear from ust-ctl ABI.

Change-Id: I0b1792ab1d822dbe44ae8fd5460ea175ee2524fb
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
3 years agofix: trailing backslash in include/Makefile.am
Michael Jeanson [Tue, 2 Mar 2021 20:59:57 +0000 (15:59 -0500)] 
fix: trailing backslash in include/Makefile.am

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: I1fa19ea426b8014e12ff64f4810a1c7330466350

3 years agoDocument why the fd tracker is ABI without a public header
Michael Jeanson [Tue, 2 Mar 2021 19:58:23 +0000 (14:58 -0500)] 
Document why the fd tracker is ABI without a public header

The fd tracker feature is part of the ABI and used by liblttng-ust-fd.
However, some test code and documentation needs to be written before it
is exposed to users with a public header.

Change-Id: I601e11328426904c121ff6cd9668abbd83006f68
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
3 years agoDelete unused private header ust-ctl-private.h
Michael Jeanson [Tue, 2 Mar 2021 17:16:41 +0000 (12:16 -0500)] 
Delete unused private header ust-ctl-private.h

No declarations in this header are implemented.

Change-Id: I9819f8a6b8cf95ce1265db9632443d9b7908f404
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
3 years agoHide private usterr-signal-safe.h symbols
Michael Jeanson [Thu, 25 Feb 2021 16:14:47 +0000 (11:14 -0500)] 
Hide private usterr-signal-safe.h symbols

The major SONAME bump to '1' gives us the opportunity to hide private
symbols that should never have been visible.

Changing 'ust_loglevel' from a public weak symbol to a private one,
means that each library that uses ust_err will now have it's own private
copy of the loglevel and will have to call 'ust_err_init' in it's
constructor.

While we're at it, namespace the symbols that were previously part of
the ABI.

Change-Id: I031d4ebfaa43fa4fb3c9f60dc6b557b1d30eca18
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
3 years agoMove internal elf macros to a private header
Michael Jeanson [Fri, 26 Feb 2021 20:41:26 +0000 (15:41 -0500)] 
Move internal elf macros to a private header

The public 'lttng/ust-elf.h' header exposed a dependency on the libelf
headers even though elfutils is only an optional dependency. None of the
macros and static inline functions using the libelf API need to be
publicly available, move them to a private header.

Also move non-namespaced convenience macros to a private header.

Change-Id: I3b75a3a984ffc2a2827664a76c45c7a8fd7b1fdf
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
3 years agoMove compat macros in 'lttng/align.h' to a private header
Michael Jeanson [Thu, 25 Feb 2021 20:46:02 +0000 (15:46 -0500)] 
Move compat macros in 'lttng/align.h' to a private header

No need to expose those compat macros in a public header, only keep the
actual align macros public.

Change-Id: Iee0ac69cfb98400afd9ee83a8a8e218af48971bf
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
This page took 0.042889 seconds and 4 git commands to generate.