Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Unfortunately BTF has two ways to encode bitfields. You can create a Member and set Offset / BitfieldSize or create an Int that has the offset and bitfield size baked in. The background for this can be found in [1]. Remove Int.Bits and Int.Offset in favour of Member.BitfieldSize and Member.Offset. Also get rid of a bunch of incorrect checks for bitfields, which we didn't catch due to the weird encoding. This cleans up the API, but may make our lives worse if we end up having to support writing out legacy bitfields. Let's hope it doesn't come to that. The performance of parsing vmlinux hasn't changed dramatically: name old time/op new time/op delta ParseVmlinux-4 62.1ms ± 1% 61.8ms ± 2% ~ (p=0.686 n=4+4) name old alloc/op new alloc/op delta ParseVmlinux-4 44.2MB ± 0% 44.7MB ± 0% +1.14% (p=0.029 n=4+4) name old allocs/op new allocs/op delta ParseVmlinux-4 718k ± 0% 718k ± 0% +0.00% (p=0.029 n=4+4) 1: torvalds/linux@9d5f9f7
- Loading branch information
Showing
5 changed files
with
95 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters