Olivier Dion [Thu, 24 Oct 2024 16:14:12 +0000 (12:14 -0400)]
Add attributes to optional types
Change-Id: I3297006a806ec929a809dc09caca2cccbb99b96f
Signed-off-by: Olivier Dion <odion@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Olivier Dion [Thu, 24 Oct 2024 15:43:33 +0000 (11:43 -0400)]
Fix double referencing of SIDE_TYPE_OPTIONAL
An optional type was a pointer to a `struct side_type'. This results in
having OPTIONAL -> OPTIONAL -> TYPE when defining an optional.
Fix this by defining a `struct side_type_optional' that has a pointer to
a `struct side_type', just like other containers.
Change-Id: I4100fad7485d309e4f3ba798227eac0694fcc294
Signed-off-by: Olivier Dion <odion@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Olivier Dion [Thu, 24 Oct 2024 15:11:00 +0000 (11:11 -0400)]
Refactor side_visit_type
Seperate the visiting of types and comparison testing.
Change-Id: I85f43957ebc7bbc7bbb564d438141fccf4476510
Signed-off-by: Olivier Dion <odion@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Olivier Dion [Thu, 24 Oct 2024 15:09:25 +0000 (11:09 -0400)]
Don't abort on unknown type label
When a mismatch is detected by the visitor, type label are converted
to string to help debugging. On unknown label, instead of aborting
during the error dump, return `<UNKNOWN>'.
Also added missing `SIDE_TYPE_OPTIONAL' case.
Change-Id: Ia654c1a293c8a033a15aed3c9fe6473182cbc018
Signed-off-by: Olivier Dion <odion@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Olivier Dion [Tue, 3 Sep 2024 18:27:58 +0000 (14:27 -0400)]
Separate API definition from implementation
The new file `<side/api.h>' defines the DSL and expands to its
implementation in `<side/instrumentation-c-api.h>'.
Introduce the following DSL change: identifiers defined by
`side_{arg,}_define_{array,struct,vla,enum,variant,optional}'
must not be rereferenced with the `&' operator, but simply by their
name.
Change-Id: I883de215000e10abfbd27c93fddba3bae3abf5b2
Signed-off-by: Olivier Dion <odion@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Olivier Dion [Wed, 23 Oct 2024 13:16:50 +0000 (09:16 -0400)]
Make all container types pointers
Array and VLA were not pointers in `struct side_type' like other
container types such as struct and variant. Make those pointers to
ensure container types are all similar.
API change (user-visible): This prevents defining array and VLA fields
inline. That is, it is now necessary to define the array/VLA type
before referencing it in a field.
Change-Id: Ia3634a40514d827cb23ce242fb6bd05c7c583e34
Signed-off-by: Olivier Dion <odion@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Olivier Dion [Tue, 15 Oct 2024 16:27:50 +0000 (12:27 -0400)]
Add optional type
The `SIDE_TYPE_OPTIONAL' denotes a field that can be absent from the
trace. Such field has no attribute. Instead, the optional type is
simply a pointer to another type.
The determination of absence for an optional field is determined by the
`selector' member of the `side_arg_optional' structure, which must be
the constant value `SIDE_OPTIONAL_ENABLED' if the field is present,
otherwise `SIDE_OPTION_DISABLED'.
Change-Id: Ie23bcac27efef66938981d59b715a950465ede75
Signed-off-by: Olivier Dion <odion@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Wed, 23 Oct 2024 15:42:08 +0000 (11:42 -0400)]
Add test cxx to gitignore
Change-Id: I09ddf58825a2467bfac0f7bf715ffa3738818cc8
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Olivier Dion [Tue, 20 Aug 2024 22:31:31 +0000 (18:31 -0400)]
Add contextual description on failed runtime check
The following is an example of error output emitted before aborting:
================================================================================
ERROR!
Type mismatch between description and arguments
Expecting `SIDE_TYPE_U32' but got `SIDE_TYPE_U64' in:
myprovider:myevent
field: "abc"
================================================================================
Aborted
Change-Id: I695cafe59a92970f7c51ec894eb02fc0008c1c64
Signed-off-by: Olivier Dion <odion@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Olivier Dion [Mon, 19 Aug 2024 17:36:08 +0000 (13:36 -0400)]
Add C++ unit test
Change-Id: I79e850e40b4e7d97f859b7ada8f1f6708ca3395f
Signed-off-by: Olivier Dion <odion@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Olivier Dion [Mon, 7 Oct 2024 16:22:03 +0000 (12:22 -0400)]
Support Clang
Most of the warnings emitted where due to either gcc extension or C99
extension used in C++. Turn-off these warnings by using _Pragma.
Change-Id: I0421d888154df1a98543cc0c0fb7e4b448d25da1
Signed-off-by: Olivier Dion <odion@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Olivier Dion [Mon, 7 Oct 2024 16:11:42 +0000 (12:11 -0400)]
Introduce dynamic compound literal
In C++, compound literal are temporary objects which have a lifetime
bound to its expression. To extend the lifetime of such objects, the
`SIDE_DYNAMIC_COMPOUND_LITERAL' macro is introduced.
In C, this macro expands to `SIDE_COMPOUND_LITERAL'. In C++, it
allocates the necessary size to store the object onto the stack using
`alloca(3)'. The memory is then initialized by copying the expression
to it.
This is necessary for attributes of dynamic fields. However,
`SIDE_DYNAMIC_COMPOUND_LITERAL' only return a pointer to the object and
not its size. To overcome this, the API is changed and the
`side_dynamic_attr_list()' macro must be used on dynamic arguments of
dynamic fields. The macro itself is not defined by libside. Instead,
macro dispatching is done to get the pointer to the object and its size.
Change-Id: Ieddaa6b2209c03031cef916033efd57564229db5
Signed-off-by: Olivier Dion <odion@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
Mathieu Desnoyers [Fri, 10 May 2024 18:10:26 +0000 (14:10 -0400)]
Update rfc
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
Mathieu Desnoyers [Mon, 18 Dec 2023 14:49:55 +0000 (09:49 -0500)]
Add rculist
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
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>
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>
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>
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>
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>
Mathieu Desnoyers [Fri, 15 Dec 2023 16:29:06 +0000 (11:29 -0500)]
Update gitignore
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
This page took 0.042425 seconds and 4 git commands to generate.