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

btf: clean up some small things #1139

Merged
merged 5 commits into from
Sep 28, 2023
Merged

btf: clean up some small things #1139

merged 5 commits into from
Sep 28, 2023

Conversation

lmb
Copy link
Collaborator

@lmb lmb commented Sep 26, 2023

These commits have languished in a branch of mine for a while. I think they're good to go in on their own.

btf: remove newSpec

Signed-off-by: Lorenz Bauer <lmb@isovalent.com>

btf: Spec.strings can't be nil anymore

Spec always has a string table now that NewSpec is not a thing anymore.

Signed-off-by: Lorenz Bauer <lmb@isovalent.com>

btf: move btfHeader to btf_types.go

Move btfHeader so that all btf* types live in the same file. This reduces
the size of btf.go as well.

No other changes intended.

Signed-off-by: Lorenz Bauer <lmb@isovalent.com>

btf: don't skip per-CPU datasec in tests anymore

There is an upstream fix and we have a workaround for the Datasec issue. 
Don't skip it in tests anymore.

Signed-off-by: Lorenz Bauer <lmb@isovalent.com>

btf: use slices.BinarySearch when reading a string table

Reading a string table uses a custom function to search a []uint32 since
that made a measurable difference back in time. Instead of copying the
implementation we can now use the generic slices.BinarySearch.

Signed-off-by: Lorenz Bauer <lmb@isovalent.com>

Signed-off-by: Lorenz Bauer <lmb@isovalent.com>
Spec always has a string table now that NewSpec is not a thing anymore.

Signed-off-by: Lorenz Bauer <lmb@isovalent.com>
Move btfHeader so that all btf* types live in the same file. This
reduces the size of btf.go as well.

No other changes intended.

Signed-off-by: Lorenz Bauer <lmb@isovalent.com>
There is an upstream fix and we have a workaround for the Datasec issue.
Don't skip it in tests anymore.

Signed-off-by: Lorenz Bauer <lmb@isovalent.com>
Reading a string table uses a custom function to search a []uint32
since that made a measurable difference back in time. Instead of
copying the implementation we can now use the generic slices.BinarySearch.

Signed-off-by: Lorenz Bauer <lmb@isovalent.com>
@lmb lmb marked this pull request as ready for review September 26, 2023 16:19
@lmb lmb requested a review from rgo3 September 26, 2023 16:19
@lmb lmb merged commit 0eafd16 into cilium:main Sep 28, 2023
11 checks passed
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.

None yet

2 participants