libside.git
13 days agoMake it compatible with C++
Olivier Dion [Mon, 19 Aug 2024 17:35:41 +0000 (13:35 -0400)] 
Make it compatible with C++

The main change are for initialization order of compound literal.  Other
changes include:

  - Initialization of zero size member (char end [0]),

  - Declaration of events in anonymous namespace for circular dependency
    of static variables.

Change-Id: Icb99c22a7df313ecb0e31a8d96ea6e9ec00cffed
Signed-off-by: Olivier Dion <odion@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 days agoAdd C native types macro helpers
Olivier Dion [Tue, 6 Aug 2024 21:09:48 +0000 (17:09 -0400)] 
Add C native types macro helpers

The SIDE ABI specifies fixed sizes integers and floating points.
However, as a convenience for C/C++, the SIDE C API supports C native
types (e.g. char) which are translated to their equivalent.

Note that the translation of C native types is toolchain dependent and
therefore could produce different results.

The main use case is for auto-generating SIDE events for public API of
shared libraries.

Change-Id: I845f0dd42ba2dc2de1f540f751e9cd65aa4a8c98
Signed-off-by: Olivier Dion <odion@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
3 weeks agoReplace side_event_cond by side_event_enabled
Mathieu Desnoyers [Wed, 9 Oct 2024 17:20:22 +0000 (13:20 -0400)] 
Replace side_event_cond by side_event_enabled

This will allow users to test for side_event_enabled in scenario where
they wish to early return rather than conditionally do something.

Change-Id: I054f8087afaf40447949a1fbab37bef2c343da19
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
4 weeks agoAdd missing public header files for installation
Olivier Dion [Wed, 7 Aug 2024 14:23:06 +0000 (10:23 -0400)] 
Add missing public header files for installation

Change-Id: Idc490bb09826d999f49d2cfdb9111df67b3c2d3a
Signed-off-by: Olivier Dion <odion@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
3 months agoRemove specification draft
Mathieu Desnoyers [Mon, 5 Aug 2024 13:52:22 +0000 (09:52 -0400)] 
Remove specification draft

The SIDE specification is moved to https://git.efficios.com/side-spec.git

Change-Id: I65b14b0b3a87bcd246d91f701aa63a25ea324ce5
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
3 months agoRename RFC document to SIDE-SPECRC-1.0.md
Mathieu Desnoyers [Tue, 30 Jul 2024 15:42:13 +0000 (11:42 -0400)] 
Rename RFC document to SIDE-SPECRC-1.0.md

Change-Id: Ie0b78aa30d62ffa442eabd313f4d0087403f1a74
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
3 months agoUpdate side spec
Mathieu Desnoyers [Tue, 30 Jul 2024 15:40:49 +0000 (11:40 -0400)] 
Update side spec

Change-Id: Iecf9193956440888b7f71f508ba4ade6113fe8a8
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
3 months agoAdd missing license and copyright headers
Michael Jeanson [Tue, 23 Jul 2024 15:25:02 +0000 (11:25 -0400)] 
Add missing license and copyright headers

Also convert rfc-side-abi.txt to markdown, it was already almost valid
and allows licensing comments.

Change-Id: Ide55ddda455c20509c4b02258f93eef7daf434e9
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
3 months agoUpdate autotools archive macros
Michael Jeanson [Mon, 3 Jul 2023 18:20:14 +0000 (14:20 -0400)] 
Update autotools archive macros

Change-Id: Id845d45a0bd13e504a250db3720e6259ac513d68
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
3 months agoAdd git-review config
Michael Jeanson [Tue, 23 Jul 2024 20:21:50 +0000 (16:21 -0400)] 
Add git-review config

Add .gitreview for contributors wishing to use gerrit for patch
reviews.

Change-Id: I1eb09fe09c54100100c99f893f775c7d26229686
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
5 months agoAdd key characteristics to rfc
Mathieu Desnoyers [Tue, 28 May 2024 19:46:19 +0000 (15:46 -0400)] 
Add key characteristics to rfc

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
5 months agoClarify TODO for user events integration
Mathieu Desnoyers [Thu, 23 May 2024 19:12:25 +0000 (15:12 -0400)] 
Clarify TODO for user events integration

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
5 months agoRemove enum before/after for description visitor
Mathieu Desnoyers [Wed, 22 May 2024 19:55:16 +0000 (15:55 -0400)] 
Remove enum before/after for description visitor

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
5 months agoRemove enum before/after for arg vec visitor
Mathieu Desnoyers [Wed, 22 May 2024 19:26:01 +0000 (15:26 -0400)] 
Remove enum before/after for arg vec visitor

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
5 months agoIntroduce event/type description visitor
Mathieu Desnoyers [Wed, 22 May 2024 18:40:16 +0000 (14:40 -0400)] 
Introduce event/type description visitor

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
5 months agopretty print tracer: Use argument vector visitor
Mathieu Desnoyers [Thu, 16 May 2024 19:26:56 +0000 (15:26 -0400)] 
pretty print tracer: Use argument vector visitor

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
5 months agoIntroduce argument vector visitor
Mathieu Desnoyers [Thu, 16 May 2024 19:26:47 +0000 (15:26 -0400)] 
Introduce argument vector visitor

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
5 months agopretty print: do not print 2 levels of brackets for variant
Mathieu Desnoyers [Thu, 16 May 2024 19:18:43 +0000 (15:18 -0400)] 
pretty print: do not print 2 levels of brackets for variant

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
5 months agopretty print tracer: use { } for structures and fields
Mathieu Desnoyers [Thu, 16 May 2024 18:39:52 +0000 (14:39 -0400)] 
pretty print tracer: use { } for structures and fields

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
5 months agopretty print tracer: add missing comma in caller printout
Mathieu Desnoyers [Thu, 16 May 2024 18:35:03 +0000 (14:35 -0400)] 
pretty print tracer: add missing comma in caller printout

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
5 months agopretty-print tracer: cleanup dynamic {} and remove caller addr
Mathieu Desnoyers [Thu, 16 May 2024 18:31:28 +0000 (14:31 -0400)] 
pretty-print tracer: cleanup dynamic {} and remove caller addr

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
5 months agoFix: tracer: utf16/32 gather types handling
Mathieu Desnoyers [Wed, 15 May 2024 14:34:46 +0000 (10:34 -0400)] 
Fix: tracer: utf16/32 gather types handling

tracer_convert_string_to_utf8 should return the size of the input
(including null terminator) rather than the size of the utf8 output.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
5 months agoUpdate rfc
Mathieu Desnoyers [Fri, 10 May 2024 18:10:26 +0000 (14:10 -0400)] 
Update rfc

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
5 months agoRename rfc-libside.txt to rfc-side-abi.txt
Mathieu Desnoyers [Fri, 10 May 2024 15:22:51 +0000 (11:22 -0400)] 
Rename rfc-libside.txt to rfc-side-abi.txt

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
5 months agoUpdate libside RFC
Mathieu Desnoyers [Fri, 10 May 2024 15:21:33 +0000 (11:21 -0400)] 
Update libside RFC

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
5 months agoUpdate libside rfc
Mathieu Desnoyers [Wed, 8 May 2024 20:11:25 +0000 (16:11 -0400)] 
Update libside rfc

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
5 months agoAdd libside RFC
Mathieu Desnoyers [Wed, 8 May 2024 20:09:14 +0000 (16:09 -0400)] 
Add libside RFC

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
6 months agofix: handle EINTR correctly in get_cpu_mask_from_sysfs
Mathieu Desnoyers [Thu, 2 May 2024 14:44:36 +0000 (10:44 -0400)] 
fix: handle EINTR correctly in get_cpu_mask_from_sysfs

If the read() in get_cpu_mask_from_sysfs() fails with EINTR, the code is
supposed to retry, but the while loop condition has (bytes_read > 0),
which is false when read() fails with EINTR. The result is that the code
exits the loop, having only read part of the string.

Use (bytes_read != 0) in the while loop condition instead, since the
(bytes_read < 0) case is already handled in the loop.

Original fix in liburcu from Benjamin Marzinski <bmarzins@redhat.com>:

  commit 9922f33e2986 ("fix: handle EINTR correctly in get_cpu_mask_from_sysfs")

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
6 months agoside: Introduce caller address
Mathieu Desnoyers [Tue, 23 Apr 2024 19:36:03 +0000 (15:36 -0400)] 
side: Introduce caller address

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
6 months agoside: explicit statedump request key
Mathieu Desnoyers [Tue, 23 Apr 2024 15:46:54 +0000 (11:46 -0400)] 
side: explicit statedump request key

Make the statedump request key explicit rather than hiding it as a
Thread-Local Storage variable within libside. It's type is still opaque
to the application (void *), but this allows schemes where the statedump
callbacks are not required to emit statedump events from the same
thread: it can pass the statedump_request_key to another thread
responsible for emitting those events.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
6 months agorcu: Update following librseq public API updates
Mathieu Desnoyers [Tue, 23 Apr 2024 15:48:56 +0000 (11:48 -0400)] 
rcu: Update following librseq public API updates

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
6 months agoCleanup function argument alignment
Mathieu Desnoyers [Tue, 23 Apr 2024 15:45:28 +0000 (11:45 -0400)] 
Cleanup function argument alignment

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 months agoImplement side_cpu_relax for x86
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 months 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 months 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
13 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>
13 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>
13 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>
13 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>
13 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>
13 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>
13 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>
13 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>
13 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>
13 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>
13 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>
13 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>
13 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>
13 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>
13 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>
13 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>
This page took 0.039367 seconds and 4 git commands to generate.