Skip to content

Conversation

@bazsi
Copy link
Member

@bazsi bazsi commented Jan 6, 2026

This comes on top of #898 and allows us to not copy the content of string objects, only reference them by start/end offsets.

@bazsi bazsi force-pushed the filterx-borrow-string-slices branch from 560a297 to 730844b Compare January 7, 2026 08:49
@OverOrion OverOrion self-requested a review January 27, 2026 10:30
bazsi added 17 commits January 30, 2026 09:06
Also reduce polling frequency as checking if a process exited every 1msec
is heating up my CPU.

Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
…ed string

Simply using strncmp() does not work, as the length needs to be checked too.

Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
This is the same as g_str_hash() but with an explicit length argument.

Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
This compares two, potentially not NUL terminated strings.

Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
To match how callers intend to use the extracted fields, add a few more
variants of filterx_string_get_value_ref()

Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
…lterXString

Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
We will crash in the next line if the length pointer is NULL anyway.

Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
…ling functions

Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
Handle cases where FilterXString instances are not NUL terminated.

Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
By using the new accessor functions, using non-NUL terminated strings
became easier. This patch only contains the trivial changes.

Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
…rn length

Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
To work with strings that are not NUL terminated.

Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
This just calls filterx_object_extract_string_ref(), which we already use
in the code otherwise.

Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
@bazsi bazsi force-pushed the filterx-borrow-string-slices branch from 730844b to 47f233d Compare January 30, 2026 08:11
bazsi added 10 commits January 30, 2026 09:50
…bjectList

Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
…in DEBUG mode

This is to test if users of FilterXString properly handle the
`length` member or rely on the NUL terminator.

In production builds, this is not done, so in cases where we
do the NUL character, we don't need to use bounce buffers.

Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
…ng LM_VT_STRING

Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
@bazsi bazsi force-pushed the filterx-borrow-string-slices branch from 47f233d to 35c378b Compare January 30, 2026 08:51
bazsi added 2 commits February 8, 2026 10:56
…unction

So that it can be reused in the string slice path.

Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
…constructor

Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant