lttng-ust.git
3 years agoport: update pthread get/set name compat
Michael Jeanson [Wed, 16 Dec 2020 17:39:46 +0000 (12:39 -0500)] 
port: update pthread get/set name compat

Sync the pthread set/get name compat with tools, to add support for
recent FreeBSD and MacOS API.

Change-Id: I9c16fc32e2a75e3f484198279e1660f3e2c5e142
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
3 years agoFix: bytecode linker: validate event and field array/sequence encoding
Mathieu Desnoyers [Mon, 22 Mar 2021 16:52:54 +0000 (12:52 -0400)] 
Fix: bytecode linker: validate event and field array/sequence encoding

The bytecode linker should only allow linking filter expressions loading
fields which are string-encoded arrays and sequence for comparison
against a string, and reject arrays and sequences without encoding, so
the filter interpreter does not attempt to load non-NULL terminated
arrays/sequences as if they were strings.

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

3 years agoValidate match of all session channel's UUID
Mathieu Desnoyers [Mon, 22 Mar 2021 14:01:55 +0000 (10:01 -0400)] 
Validate match of all session channel's UUID

Add a validation at channel creation to ensure that the uuid of all
channels created within a session match.

Note that we still need to keep a copy of the uuid field in the channel
private data at this stage, because the consumer daemon creates channels
with a NULL session pointer.

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

3 years agoCleanup: Remove whiteline
Mathieu Desnoyers [Mon, 22 Mar 2021 13:50:19 +0000 (09:50 -0400)] 
Cleanup: Remove whiteline

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

3 years agoCleanup: align private header comments
Mathieu Desnoyers [Mon, 22 Mar 2021 13:47:30 +0000 (09:47 -0400)] 
Cleanup: align private header comments

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

3 years agoCleanup: remove old comments
Mathieu Desnoyers [Mon, 22 Mar 2021 13:45:21 +0000 (09:45 -0400)] 
Cleanup: remove old comments

Those comments are not useful for internal structures.

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

3 years agoRefactoring and fix: bytecode ABI
Mathieu Desnoyers [Fri, 19 Mar 2021 04:03:17 +0000 (00:03 -0400)] 
Refactoring and fix: bytecode ABI

Introduce an "event filter" callback to be called by the instrumentation
probe, and move the bytecode list into private data structures.

This will allow much more freedom in choosing how bytecodes are combined
both in terms of logic (OR vs AND) and implementation (jits).

Currently, we keep callbacks internally as well for each bytecode
evaluation, but nothing prevents to change how this works in the future
to improve performance now that this is all private.

For filters, we add the following fields to struct lttng_ust_event_common:

       int eval_filter;                                /* Need to evaluate filters */
       int (*run_filter)(struct lttng_ust_event_common *event,
               const char *stack_data,
               void *filter_ctx);

"eval_filter" is a state indicating whether the filter should be
evaluated at all. It combines internal knowledge of whether the filter
bytecode list is empty, and whether there are enablers without filter
bytecode attached to the event.

For captures, a new struct lttng_ust_notification_ctx is introduced,
which is to be used as additional "context" to the notification_send()
callback. This allows passing the "eval_capture" state from the probe
to the notification callback, and fixes a bug where a sequence of:

- create notification enabler,
- enable notification enabler,
- add capture to enabler,

where a tracepoint runs concurrently with add capture happens to do a
first capture list_empty check which skips the stack preparation,
whereas the second capture list_empty check within the notification
callback finds a capture entry, and thus attempts to use an
uninitialized stack. The notification callback is also modified to use
an RCU-aware list traversal.

For captures, the following field is added to struct lttng_ust_event_notifier:

       int eval_capture;                               /* Need to evaluate capture */

which is to be read once by the probe and its state saved and used
thorough the entire probe execution.

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

3 years agoBytecode: update documentation
Mathieu Desnoyers [Fri, 19 Mar 2021 03:22:18 +0000 (23:22 -0400)] 
Bytecode: update documentation

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

3 years agoRefactoring: bytecode interpreter ABI
Mathieu Desnoyers [Thu, 18 Mar 2021 21:04:07 +0000 (17:04 -0400)] 
Refactoring: bytecode interpreter ABI

Refactor the ABI of the bytecode interpreter, which is used by the probe
provider callbacks:

- Return a "int" rather than uint64_t,
- The return values are now:
       LTTNG_UST_BYTECODE_INTERPRETER_ERROR = -1,
       LTTNG_UST_BYTECODE_INTERPRETER_OK = 0,
- Introduce a bytecode "context". This context is specific for each
  bytecode "class" (filter or capture). The filter class context
  has a "result" (accept/reject) output, whereas the capture class
  has an "output".
- The bytecode context is extensible with the struct_size scheme.
- Merge filter and capture interpreters into a single callback.
  That callback uses a new "bytecode type" field within the bytecode
  private data to figure out the specific bytecode class (filter or
  capture).

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

3 years agoFix: java agent: migrate to new channel structures
Mathieu Desnoyers [Thu, 18 Mar 2021 20:08:10 +0000 (16:08 -0400)] 
Fix: java agent: migrate to new channel structures

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

3 years agoMove event context to private structures
Mathieu Desnoyers [Thu, 18 Mar 2021 19:57:06 +0000 (15:57 -0400)] 
Move event context to private structures

The list of contexts active for an event can be moved to a private
structure by keeping the temporary pointer to the RCU dereferenced
context in the ring buffer client's internal context rather than within
the context shared between the probe and the ring buffer client.

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

3 years agoMove channel context to private structures
Mathieu Desnoyers [Thu, 18 Mar 2021 19:49:11 +0000 (15:49 -0400)] 
Move channel context to private structures

The list of contexts active for a channel can be moved to a private
structure by keeping the temporary pointer to the RCU dereferenced
context in the ring buffer client's internal context rather than within
the context shared between the probe and the ring buffer client.

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

3 years agoRefactoring: Channel structures
Mathieu Desnoyers [Thu, 18 Mar 2021 15:44:30 +0000 (11:44 -0400)] 
Refactoring: Channel structures

Now that struct lttng_channel is separate from the consumer daemon
channel config message ABI layout, we can perform a significant amount
of refactoring:

- Namespace theses structures with lttng_ust_ prefix,
- Use struct_size extensibility scheme.
- Split fields into public/private structures,
- Split public and private structures into a child (ring buffer)
  and parent (common). This will allow introducing other channel
  children types in the future (e.g. counters).

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

3 years agostruct lttng_channel: split protocol ABI from instrumentation ABI
Mathieu Desnoyers [Thu, 18 Mar 2021 13:34:55 +0000 (09:34 -0400)] 
struct lttng_channel: split protocol ABI from instrumentation ABI

Duplicate struct lttng_channel to introduce a new struct
lttng_ust_abi_channel_config meant to hold configuration data within the
memory area belonging to the ring buffer private data. Now the
application and consumer private pointer will be a separate pointer,
for which the memory will be owned by the caller.

This will allow us to modify the layout of struct lttng_channel without
breaking the UST communication protocol.

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

3 years agoRemove the LTTNG_PACKED macro
Michael Jeanson [Wed, 17 Mar 2021 20:31:53 +0000 (16:31 -0400)] 
Remove the LTTNG_PACKED macro

We already use __attribute__((packed)) directly in some public headers.
Remove the LTTNG_PACKED macro and replace it with the literal attribute.

The LTTNG_PACKED macro was meant to support Cygwin, but the Cygwin
LTTng-UST support was never completed.

Change-Id: I8bf5d3db94b979e16bf9b9b5c582b85b6b73f10b
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
3 years agoMove public tracepoint definition headers to 'lttng/tp'
Michael Jeanson [Wed, 17 Mar 2021 20:00:33 +0000 (16:00 -0400)] 
Move public tracepoint definition headers to 'lttng/tp'

Separate the tracepoint definition headers for tracef and tracelog from
the rest of the public API headers.

Change-Id: I8e38e2c8c0a3c2d6f7ab172c3fdbc2d6e5ad8d9d
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
3 years agoNamespace lttng/align.h as lttng/ust-align.h
Michael Jeanson [Wed, 17 Mar 2021 19:27:10 +0000 (15:27 -0400)] 
Namespace lttng/align.h as lttng/ust-align.h

Since the 'lttng/' header directory is shared between ust and tools,
namespace this common name header with 'ust-' to match the same pattern
as the other files.

Change-Id: Iad25ad76b75e87e040b4d7dd9f461ce6522ac361
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
3 years agoNamespace lttng/bug.h as lttng/ust-bug.h
Michael Jeanson [Wed, 17 Mar 2021 19:19:37 +0000 (15:19 -0400)] 
Namespace lttng/bug.h as lttng/ust-bug.h

Since the 'lttng/' header directory is shared between ust and tools,
namespace this common name header with 'ust-' to match the same pattern
as the other files.

Change-Id: I08e853d9edcce218a9bd57717316a557f49200d7
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
3 years agoNamespace enum lttng_ust_bytecode_interpreter_ret flags with lttng_ust_ prefix
Mathieu Desnoyers [Wed, 17 Mar 2021 20:23:25 +0000 (16:23 -0400)] 
Namespace enum lttng_ust_bytecode_interpreter_ret flags with lttng_ust_ prefix

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

3 years agoNamespace _float_mant_dig with lttng_ust_ prefix
Mathieu Desnoyers [Wed, 17 Mar 2021 20:16:48 +0000 (16:16 -0400)] 
Namespace _float_mant_dig with lttng_ust_ prefix

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

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>
This page took 0.044524 seconds and 4 git commands to generate.