libside.git
8 weeks agoImplement side_cpu_relax for x86 master
Mathieu Desnoyers [Mon, 19 Feb 2024 18:58:55 +0000 (13:58 -0500)] 
Implement side_cpu_relax for x86

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 weeks agoDocument application fork/clone vs statedump locking limitations
Mathieu Desnoyers [Mon, 19 Feb 2024 18:28:53 +0000 (13:28 -0500)] 
Document application fork/clone vs statedump locking limitations

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 weeks agoHandle statedump agent thread state across fork
Mathieu Desnoyers [Mon, 19 Feb 2024 18:19:43 +0000 (13:19 -0500)] 
Handle statedump agent thread state across fork

Implement pthread_atfork handlers to deal with statedump agent thread
state across fork.

For glibc, this requires glibc 2.24 or more recent.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
3 months agoImplement agent thread wakeup scheme with pthread cond var
Mathieu Desnoyers [Fri, 22 Dec 2023 20:03:07 +0000 (15:03 -0500)] 
Implement agent thread wakeup scheme with pthread cond var

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
3 months agoImplement agent thread
Mathieu Desnoyers [Fri, 22 Dec 2023 18:29:16 +0000 (13:29 -0500)] 
Implement agent thread

Currently uses 1 second polling for state. To be replaced by a proper
wait/wakeup.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
3 months agolist: fix safe list iteration
Mathieu Desnoyers [Fri, 22 Dec 2023 18:28:07 +0000 (13:28 -0500)] 
list: fix safe list iteration

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
3 months agoStatedump improvements
Mathieu Desnoyers [Fri, 22 Dec 2023 17:00:55 +0000 (12:00 -0500)] 
Statedump improvements

- Introduce polling vs agent thread statedump callbacks,
- Use uint64_t for tracer key.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
4 months agoExtend statedump API
Mathieu Desnoyers [Mon, 18 Dec 2023 21:37:08 +0000 (16:37 -0500)] 
Extend statedump API

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
4 months agoIntroduce side ptrace hook
Mathieu Desnoyers [Mon, 18 Dec 2023 18:29:19 +0000 (13:29 -0500)] 
Introduce side ptrace hook

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
4 months agoUse RCU for statedump
Mathieu Desnoyers [Mon, 18 Dec 2023 15:16:39 +0000 (10:16 -0500)] 
Use RCU for statedump

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
4 months agoAdd rculist
Mathieu Desnoyers [Mon, 18 Dec 2023 14:49:55 +0000 (09:49 -0500)] 
Add rculist

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
4 months agoIntroduce list_types.h
Mathieu Desnoyers [Mon, 18 Dec 2023 14:28:00 +0000 (09:28 -0500)] 
Introduce list_types.h

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
4 months agoImplement statedump unit test
Mathieu Desnoyers [Fri, 15 Dec 2023 21:44:47 +0000 (16:44 -0500)] 
Implement statedump unit test

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
4 months agoImplement statedump request notifications
Mathieu Desnoyers [Fri, 15 Dec 2023 20:53:02 +0000 (15:53 -0500)] 
Implement statedump request notifications

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
4 months agoUse TLS variable for key state
Mathieu Desnoyers [Fri, 15 Dec 2023 20:17:25 +0000 (15:17 -0500)] 
Use TLS variable for key state

Keep this hidden from the application.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
4 months agoAdd "key" to callback registration
Mathieu Desnoyers [Fri, 15 Dec 2023 19:17:00 +0000 (14:17 -0500)] 
Add "key" to callback registration

This is in preparation to support the state-dump feature.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
4 months agoUpdate gitignore
Mathieu Desnoyers [Fri, 15 Dec 2023 16:29:06 +0000 (11:29 -0500)] 
Update gitignore

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
4 months agoRemove backup file
Mathieu Desnoyers [Fri, 15 Dec 2023 16:26:33 +0000 (11:26 -0500)] 
Remove backup file

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
4 months agoAdd indirection for visitor arguments
Mathieu Desnoyers [Mon, 11 Dec 2023 16:23:10 +0000 (11:23 -0500)] 
Add indirection for visitor arguments

In order to keep the argument vector const, add an indirection for
visitor arguments to a non-const area of memory, which is clearly
documented as modified by libside.

Add a "cached_arg" placeholder pointer to the visitor structures.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
4 months agoImplement 128-bit integer support
Mathieu Desnoyers [Wed, 6 Dec 2023 15:57:17 +0000 (10:57 -0500)] 
Implement 128-bit integer support

TODO in tracer example: Implement 128-bit integer with len_bits != 128
or nonzero offset_bit.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
4 months agoAPI: Add 128-bit integer support
Mathieu Desnoyers [Mon, 4 Dec 2023 16:47:53 +0000 (11:47 -0500)] 
API: Add 128-bit integer support

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
4 months agoAdd __int128 support
Mathieu Desnoyers [Mon, 4 Dec 2023 16:47:34 +0000 (11:47 -0500)] 
Add __int128 support

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
4 months agoInteger 128 split byte order helpers
Mathieu Desnoyers [Mon, 4 Dec 2023 14:51:43 +0000 (09:51 -0500)] 
Integer 128 split byte order helpers

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
4 months agoRevert "Remove const on all side_arg"
Mathieu Desnoyers [Fri, 1 Dec 2023 21:58:53 +0000 (16:58 -0500)] 
Revert "Remove const on all side_arg"

This reverts commit 511ee756cf8aa9259489b4386feb2911bb58c20a.

Re-introduce constness of side_arg to ensure that side_calls are pure.

This will facilitate integration with various runtimes and eliminate
corner-cases.

We plan on copying side argument vectors within libside when translating
from visitor types to flattened types.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
4 months agoUse zero-sized array as last field of event description
Mathieu Desnoyers [Fri, 1 Dec 2023 21:55:45 +0000 (16:55 -0500)] 
Use zero-sized array as last field of event description

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
4 months agoAdd u128/s128 integer to ABI
Mathieu Desnoyers [Fri, 1 Dec 2023 21:46:45 +0000 (16:46 -0500)] 
Add u128/s128 integer to ABI

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
4 months agoAPI: Intitialize arg flags to 0
Mathieu Desnoyers [Fri, 1 Dec 2023 15:13:52 +0000 (10:13 -0500)] 
API: Intitialize arg flags to 0

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
4 months agoABI: Introduce incomplete type flag
Mathieu Desnoyers [Fri, 1 Dec 2023 15:13:35 +0000 (10:13 -0500)] 
ABI: Introduce incomplete type flag

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
4 months agoRemove const on all side_arg
Mathieu Desnoyers [Thu, 30 Nov 2023 21:24:19 +0000 (16:24 -0500)] 
Remove const on all side_arg

Remove const from side_arg and types containing a side_arg so they can
be altered by libside for visitor caching.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
4 months agoRemove packed from visitor ABI
Mathieu Desnoyers [Fri, 24 Nov 2023 22:40:32 +0000 (17:40 -0500)] 
Remove packed from visitor ABI

The visitor ABI is a contract between instrumented applications and
userspace tracers only, and follows C calling convention, so packing
those data structures serve no purpose.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
4 months agoMove side_callback to libside internals
Mathieu Desnoyers [Fri, 24 Nov 2023 22:29:26 +0000 (17:29 -0500)] 
Move side_callback to libside internals

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
4 months agoRemove packed from struct side_callback
Mathieu Desnoyers [Fri, 24 Nov 2023 21:55:03 +0000 (16:55 -0500)] 
Remove packed from struct side_callback

This is internal to libside.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
4 months agoRename side state "p" field to "parent"
Mathieu Desnoyers [Fri, 24 Nov 2023 21:07:40 +0000 (16:07 -0500)] 
Rename side state "p" field to "parent"

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
4 months agoMove nr_callbacks to event state
Mathieu Desnoyers [Fri, 24 Nov 2023 20:56:47 +0000 (15:56 -0500)] 
Move nr_callbacks to event state

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
4 months agoUse uintptr_t for enabled state to eliminate partial register stalls
Mathieu Desnoyers [Fri, 24 Nov 2023 20:51:40 +0000 (15:51 -0500)] 
Use uintptr_t for enabled state to eliminate partial register stalls

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
4 months agoside event state does not need side_ptr_t
Mathieu Desnoyers [Fri, 24 Nov 2023 20:43:08 +0000 (15:43 -0500)] 
side event state does not need side_ptr_t

This is not relevant for tracers: only between instrumented application
and libside.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
4 months agoRemove event state abi version validation from tracer
Mathieu Desnoyers [Fri, 24 Nov 2023 20:17:39 +0000 (15:17 -0500)] 
Remove event state abi version validation from tracer

This is internal to libside.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
4 months agoDocument ABI extensibility schemes
Mathieu Desnoyers [Fri, 24 Nov 2023 20:14:06 +0000 (15:14 -0500)] 
Document ABI extensibility schemes

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
4 months agoMove ABI headers under side/abi/
Mathieu Desnoyers [Fri, 24 Nov 2023 19:14:44 +0000 (14:14 -0500)] 
Move ABI headers under side/abi/

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
4 months agoRemove unneeded fwd declaration
Mathieu Desnoyers [Fri, 24 Nov 2023 17:10:27 +0000 (12:10 -0500)] 
Remove unneeded fwd declaration

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
4 months agoSplit trace.h into API/ABI sub-headers
Mathieu Desnoyers [Fri, 24 Nov 2023 17:07:57 +0000 (12:07 -0500)] 
Split trace.h into API/ABI sub-headers

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
4 months agoIntroduce event state ABI version
Mathieu Desnoyers [Thu, 23 Nov 2023 22:36:09 +0000 (17:36 -0500)] 
Introduce event state ABI version

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
4 months agoExtensible struct side_event_state
Mathieu Desnoyers [Thu, 23 Nov 2023 22:06:06 +0000 (17:06 -0500)] 
Extensible struct side_event_state

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
4 months agoDocument side_ptr_get can be used as r or lvalue
Mathieu Desnoyers [Thu, 23 Nov 2023 22:04:13 +0000 (17:04 -0500)] 
Document side_ptr_get can be used as r or lvalue

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
4 months agoUpdate side_ptr_t macros
Mathieu Desnoyers [Thu, 23 Nov 2023 21:55:45 +0000 (16:55 -0500)] 
Update side_ptr_t macros

Allow fetching a single 32-bit pointer on 32-bit architectures.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
4 months agoUse structure size and version for event description extensibility
Mathieu Desnoyers [Thu, 23 Nov 2023 21:22:54 +0000 (16:22 -0500)] 
Use structure size and version for event description extensibility

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
4 months agoUpdate gitignore to ignore editor .swp files
Mathieu Desnoyers [Thu, 23 Nov 2023 20:38:48 +0000 (15:38 -0500)] 
Update gitignore to ignore editor .swp files

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
4 months agoRemove bogus swap file
Mathieu Desnoyers [Thu, 23 Nov 2023 20:37:14 +0000 (15:37 -0500)] 
Remove bogus swap file

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
4 months agotracer: Validate number of known event types
Mathieu Desnoyers [Thu, 23 Nov 2023 20:36:53 +0000 (15:36 -0500)] 
tracer: Validate number of known event types

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
4 months agoAdd nr_side_type_label and nr_side_attr_type event description fields
Mathieu Desnoyers [Thu, 23 Nov 2023 20:28:11 +0000 (15:28 -0500)] 
Add nr_side_type_label and nr_side_attr_type event description fields

Allow tracers to discover whether they know about all field types
present when the event instrumentation was compiled.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
4 months agoenum side_error is actually used
Mathieu Desnoyers [Thu, 23 Nov 2023 19:34:58 +0000 (14:34 -0500)] 
enum side_error is actually used

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
4 months agoEnforce ABI size checks
Mathieu Desnoyers [Thu, 23 Nov 2023 19:32:02 +0000 (14:32 -0500)] 
Enforce ABI size checks

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
6 months agoside.c: Use assert to validate flags
Mathieu Desnoyers [Thu, 21 Sep 2023 11:56:37 +0000 (12:56 +0100)] 
side.c: Use assert to validate flags

Flag validation is redundant with the logic already verified on
registration. Therefore, use an assertion, which can be compiled-out
when performance matters.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
6 months agotrace.h: Cleanup: Add missing () around macro parameter
Mathieu Desnoyers [Thu, 21 Sep 2023 11:53:58 +0000 (12:53 +0100)] 
trace.h: Cleanup: Add missing () around macro parameter

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
6 months agoUse event state as argument to call fast path
Mathieu Desnoyers [Thu, 21 Sep 2023 11:49:27 +0000 (12:49 +0100)] 
Use event state as argument to call fast path

Eliminate the need to load the event description cache lines (to load a
pointer to the event state) on the fast path by passing a pointer to the
event state as argument to the call.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
6 months agotrace.h: Move back nr_callbacks to event description
Mathieu Desnoyers [Thu, 21 Sep 2023 10:54:18 +0000 (11:54 +0100)] 
trace.h: Move back nr_callbacks to event description

nr_callbacks is not used on the fast path, therefore move it back to the
event description to optimize cache density of the event state enabled
flags.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
6 months agotrace.h: Use side_enum_t for enum side_type_label_byte_order
Mathieu Desnoyers [Thu, 21 Sep 2023 10:36:02 +0000 (11:36 +0100)] 
trace.h: Use side_enum_t for enum side_type_label_byte_order

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
6 months agoComment that side_error enum is unused
Mathieu Desnoyers [Thu, 21 Sep 2023 10:30:32 +0000 (11:30 +0100)] 
Comment that side_error enum is unused

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
6 months agotrace.h: Use side_enum_t for side_loglevel enum
Mathieu Desnoyers [Thu, 21 Sep 2023 10:29:32 +0000 (11:29 +0100)] 
trace.h: Use side_enum_t for side_loglevel enum

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
6 months agotrace.h: Use side_enum_t for side_attr_type enum
Mathieu Desnoyers [Thu, 21 Sep 2023 10:28:14 +0000 (11:28 +0100)] 
trace.h: Use side_enum_t for side_attr_type enum

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
6 months agotrace.h: Use side_enum_t for enum side_type_label
Mathieu Desnoyers [Thu, 21 Sep 2023 10:26:00 +0000 (11:26 +0100)] 
trace.h: Use side_enum_t for enum side_type_label

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
6 months agomacros.h: Implement side_enum_t
Mathieu Desnoyers [Thu, 21 Sep 2023 10:25:25 +0000 (11:25 +0100)] 
macros.h: Implement side_enum_t

side_enum_t allows defining fixed-sized enumerations while preserving
typing information.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
6 months agotrace.h: Use side_ptr_t for event description
Mathieu Desnoyers [Thu, 21 Sep 2023 10:06:03 +0000 (11:06 +0100)] 
trace.h: Use side_ptr_t for event description

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
6 months agoUse side_ptr_t for dynamic arguments
Mathieu Desnoyers [Thu, 21 Sep 2023 09:54:09 +0000 (10:54 +0100)] 
Use side_ptr_t for dynamic arguments

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
6 months agotrace.h: Use side_ptr_t for gather args
Mathieu Desnoyers [Thu, 21 Sep 2023 09:41:15 +0000 (10:41 +0100)] 
trace.h: Use side_ptr_t for gather args

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
6 months agotrace.h: Use side_ptr_t for string_value pointer
Mathieu Desnoyers [Thu, 21 Sep 2023 09:35:15 +0000 (10:35 +0100)] 
trace.h: Use side_ptr_t for string_value pointer

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
6 months agotrace.h: Use side_ptr_t for stack-copy compound type args
Mathieu Desnoyers [Thu, 21 Sep 2023 09:29:28 +0000 (10:29 +0100)] 
trace.h: Use side_ptr_t for stack-copy compound type args

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
6 months agotrace.h: Use side_ptr_t for additional fields
Mathieu Desnoyers [Thu, 21 Sep 2023 09:20:41 +0000 (10:20 +0100)] 
trace.h: Use side_ptr_t for additional fields

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
6 months agoUse side_ptr_t for enum mappings pointers
Mathieu Desnoyers [Thu, 21 Sep 2023 06:39:56 +0000 (07:39 +0100)] 
Use side_ptr_t for enum mappings pointers

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
6 months agoUse side_ptr_t for other attribute pointers
Mathieu Desnoyers [Thu, 21 Sep 2023 06:35:19 +0000 (07:35 +0100)] 
Use side_ptr_t for other attribute pointers

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
6 months agoFix: accept variable list of arguments from SIDE_PTR_INIT
Mathieu Desnoyers [Thu, 21 Sep 2023 06:34:36 +0000 (07:34 +0100)] 
Fix: accept variable list of arguments from SIDE_PTR_INIT

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
6 months agoUse side_ptr_t in side_type_bool
Mathieu Desnoyers [Thu, 21 Sep 2023 06:22:19 +0000 (07:22 +0100)] 
Use side_ptr_t in side_type_bool

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
6 months agoUse SIDE_PTR_INIT in side_type_raw_string
Mathieu Desnoyers [Thu, 21 Sep 2023 06:19:45 +0000 (07:19 +0100)] 
Use SIDE_PTR_INIT in side_type_raw_string

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
6 months agoUse side_ptr_t for side_type_null attr pointer
Mathieu Desnoyers [Thu, 21 Sep 2023 06:16:49 +0000 (07:16 +0100)] 
Use side_ptr_t for side_type_null attr pointer

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
6 months agomacros.h: Introduce SIDE_PTR_INIT helper
Mathieu Desnoyers [Thu, 21 Sep 2023 06:16:31 +0000 (07:16 +0100)] 
macros.h: Introduce SIDE_PTR_INIT helper

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
6 months agoConvert side_type_raw_string pointer to side_ptr
Mathieu Desnoyers [Thu, 21 Sep 2023 05:56:03 +0000 (06:56 +0100)] 
Convert side_type_raw_string pointer to side_ptr

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
6 months agomacros.h: Introduce side_ptr macros
Mathieu Desnoyers [Thu, 21 Sep 2023 05:43:57 +0000 (06:43 +0100)] 
macros.h: Introduce side_ptr macros

The side_ptr macros allow defining a pointer type which is suitable
for use by 32-bit and 64-bit kernels without compatibility code,
while preserving information about the pointer type.

Those pointers are stored as 64-bit integers, and the type of the
actual pointer is kept alongside with the 64-bit pointer value in a
0-len array within a union.

uintptr_t will fit within a uint64_t except on architectures with
128-bit pointers. This provides fixed-size pointers on architectures
with pointer size of 64-bit or less. Architectures with larger
pointer size will have to handle the ABI offset specifics explicitly.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
6 months agoCleanup macros.h
Mathieu Desnoyers [Thu, 21 Sep 2023 05:37:15 +0000 (06:37 +0100)] 
Cleanup macros.h

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
6 months agoExtract callbacks and enabled state to non-packed structure
Mathieu Desnoyers [Thu, 21 Sep 2023 05:29:15 +0000 (06:29 +0100)] 
Extract callbacks and enabled state to non-packed structure

Atomic load/store should be performed on non-packed structure.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
6 months agoFix clang warning
Mathieu Desnoyers [Thu, 21 Sep 2023 05:11:28 +0000 (06:11 +0100)] 
Fix clang warning

Clang issues a warning about what we are really intending to do. Use an
explicit type as argument to sizeof().

tracer.c:1152:28: warning: 'memcpy' call operates on objects of type 'const char' while the size is based on a different type 'const char *' [-Wsizeof-pointer-memaccess]
                memcpy(&ptr, ptr, sizeof(ptr));
                             ~~~         ^~~
tracer.c:1152:28: note: did you mean to provide an explicit length?
                memcpy(&ptr, ptr, sizeof(ptr));
                                         ^~~
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
6 months agounit tests: Use default empty attributes
Mathieu Desnoyers [Thu, 21 Sep 2023 05:05:19 +0000 (06:05 +0100)] 
unit tests: Use default empty attributes

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
6 months agodemo unit test: Use default attribute list
Mathieu Desnoyers [Thu, 21 Sep 2023 04:43:45 +0000 (05:43 +0100)] 
demo unit test: Use default attribute list

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
6 months agotrace.h: Implement optional attribute lists
Mathieu Desnoyers [Thu, 21 Sep 2023 04:31:37 +0000 (05:31 +0100)] 
trace.h: Implement optional attribute lists

Attribute lists are typically empty. Implement support for optional last
macro arguments generating empty attribute lists.

Suggested-by: Olivier Dion <odion@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
6 months agomacros.h: Implement SIDE_PARAM_SELECT_ARG1
Mathieu Desnoyers [Thu, 21 Sep 2023 04:30:40 +0000 (05:30 +0100)] 
macros.h: Implement SIDE_PARAM_SELECT_ARG1

Implement the SIDE_PARAM_SELECT_ARG1 macro which allows side macros to
support optional last argument. This is useful for attribute lists,
which are typically empty.

Suggested-by: Olivier Dion <odion@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
7 months agoAdd demo unit test
Mathieu Desnoyers [Sat, 16 Sep 2023 11:26:57 +0000 (13:26 +0200)] 
Add demo unit test

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
7 months agoAdd missing stdbool.h include
Mathieu Desnoyers [Sat, 16 Sep 2023 11:26:01 +0000 (13:26 +0200)] 
Add missing stdbool.h include

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
7 months agoside_arg_{static,dynamic} should be unions
Mathieu Desnoyers [Sat, 16 Sep 2023 10:55:23 +0000 (12:55 +0200)] 
side_arg_{static,dynamic} should be unions

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 months agoFix typos
Mathieu Desnoyers [Mon, 1 May 2023 18:40:05 +0000 (14:40 -0400)] 
Fix typos

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 months agorcu.h: remove duplicated fence
Mathieu Desnoyers [Mon, 1 May 2023 14:06:38 +0000 (10:06 -0400)] 
rcu.h: remove duplicated fence

Already implied by SEQ_CST.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 months agoUpdate following librseq API update
Mathieu Desnoyers [Mon, 1 May 2023 13:20:32 +0000 (09:20 -0400)] 
Update following librseq API update

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
16 months agoImplement variant type
Mathieu Desnoyers [Tue, 6 Dec 2022 19:52:32 +0000 (14:52 -0500)] 
Implement variant type

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
16 months agoFix: memory leak in side_tracer_event_notification_unregister
Mathieu Desnoyers [Fri, 2 Dec 2022 17:00:57 +0000 (12:00 -0500)] 
Fix: memory leak in side_tracer_event_notification_unregister

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
16 months agoREADME.md: use proper markdown
Michael Jeanson [Mon, 28 Nov 2022 20:26:45 +0000 (15:26 -0500)] 
README.md: use proper markdown

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
16 months agoUpdate gitignore
Mathieu Desnoyers [Mon, 28 Nov 2022 20:03:25 +0000 (15:03 -0500)] 
Update gitignore

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
16 months agoRename "Side" to "Software"
Mathieu Desnoyers [Mon, 28 Nov 2022 20:02:47 +0000 (15:02 -0500)] 
Rename "Side" to "Software"

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
16 months agoRevert "Rename "libside" to "libtgif""
Mathieu Desnoyers [Mon, 28 Nov 2022 20:02:10 +0000 (15:02 -0500)] 
Revert "Rename "libside" to "libtgif""

This reverts commit d04d49036a407d68a89879b790c3cba6e081bea5.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
16 months agoRevert "Update gitignore"
Mathieu Desnoyers [Mon, 28 Nov 2022 20:02:02 +0000 (15:02 -0500)] 
Revert "Update gitignore"

This reverts commit 7fb90e4156d693f2c702e22a8b8fdcda5d35f950.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
16 months agoRevert "Update readme"
Mathieu Desnoyers [Mon, 28 Nov 2022 20:01:47 +0000 (15:01 -0500)] 
Revert "Update readme"

This reverts commit baa8edf0a4dfc547307d2d9eec087034f698d118.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
16 months agoUpdate readme
Mathieu Desnoyers [Mon, 28 Nov 2022 19:18:27 +0000 (14:18 -0500)] 
Update readme

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
16 months agoUpdate gitignore
Mathieu Desnoyers [Mon, 28 Nov 2022 19:11:18 +0000 (14:11 -0500)] 
Update gitignore

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
This page took 0.039318 seconds and 4 git commands to generate.