Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: the tip of my filterx performance efforts #434

Open
wants to merge 72 commits into
base: main
Choose a base branch
from

Conversation

bazsi
Copy link
Member

@bazsi bazsi commented Dec 30, 2024

Please ignore this PR as it is not intended to be merged. It contains work-in-progress local patches I am yet to extract into separate pull requests.

It is rebased on top of my local merge of all related PRs, so I can maintain those branches separately as they get merged.

@bazsi bazsi force-pushed the filterx-perf-project branch 4 times, most recently from 6e3ce03 to 0b045c1 Compare January 5, 2025 16:32
@bazsi bazsi force-pushed the filterx-perf-project branch 3 times, most recently from fbff61c to 5cab36c Compare January 6, 2025 19:10
@bazsi bazsi force-pushed the filterx-perf-project branch 6 times, most recently from d940c50 to 89e67ad Compare January 11, 2025 16:44
@bazsi bazsi force-pushed the filterx-perf-project branch 3 times, most recently from 1cad834 to 5be65da Compare January 19, 2025 16:04
Signed-off-by: László Várady <laszlo.varady@anno.io>
Signed-off-by: László Várady <laszlo.varady@anno.io>
Signed-off-by: László Várady <laszlo.varady@anno.io>
Signed-off-by: László Várady <laszlo.varady@anno.io>
Signed-off-by: László Várady <laszlo.varady@anno.io>
Signed-off-by: László Várady <laszlo.varady@anno.io>
Signed-off-by: László Várady <laszlo.varady@anno.io>
Signed-off-by: László Várady <laszlo.varady@anno.io>
@bazsi bazsi force-pushed the filterx-perf-project branch from 5be65da to 706b176 Compare January 22, 2025 10:43
bazsi added 3 commits January 23, 2025 19:13
Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
Previously a coupling was established between logmsg and FilterXScope,
namely whenever the LogMessage was cloned, the logmsg layer called
filterx_scope_set_log_msg_has_changes(), which was then subsequently
used for invalidating message tied variables in the scope.

This was broken for cases where the message was writable, so it changed
without being cloned. In those cases the stale variables survived anyway.

Another issue was that this produced excessive calls to the expensive
filterx_scope_invalidate_log_msg_cache(), as it may be filterx_scope_sync()
that causes the LogMessage to be cloned. In those cases we executed both
filterx_scope_sync() and an entirely unnecessary
filterx_scope_invalidate_log_msg_cache() both iterating on all
FilterXVariable instances in the scope.

This mechanism is being replaced by the generation counter mechanism, but
to make the patches easier to review, this patch just removes the entire
log_msg_has_changes() mechanism.

Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
bazsi added 29 commits January 24, 2025 15:34
…ings

Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
# Conflicts:
#	lib/Makefile.am
It uses a better algorithm (both glibc and musl).

Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
Sometimes location tracking is buggy, make sure we don't address outside
of the source text.

Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
This reverts commit 350c1cab2e643d12c280c7df0e402e96694f72e2.
This is probably the next most accessed field in that struct.

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>
May even be extracted into its own module. Right now, it's just a quick
and dirty export.

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

Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
This should bail out from the current compound expression, but not
out of the entire filterx block, like "done" or "drop".

Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
Due to the way our for() loop was organized, the processing
for eval_control_modified was not performed for the last element. Make sure
it is.

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

Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
This reverts commit aef14c0542c7e42c21883960c2f57a57e480e27f.
@bazsi bazsi force-pushed the filterx-perf-project branch from 885b9e0 to 0920f59 Compare January 24, 2025 15:35
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.

2 participants