Skip to content

Conversation

@gnurizen
Copy link
Collaborator

@gnurizen gnurizen commented Feb 19, 2025

No description provided.

@gnurizen gnurizen changed the title go24 Go 1.24 support for custom labels Feb 19, 2025
@gnurizen gnurizen force-pushed the go24 branch 3 times, most recently from 8fe4961 to 91a57a8 Compare February 19, 2025 19:50
@gnurizen gnurizen marked this pull request as ready for review February 19, 2025 19:59
@gnurizen gnurizen requested a review from umanwizard February 19, 2025 19:59
Comment on lines +96 to +105
switch (label_count) {
case 10: process_slice_pair(record, &labels_slice, 9);
case 9: process_slice_pair(record, &labels_slice, 8);
case 8: process_slice_pair(record, &labels_slice, 7);
case 7: process_slice_pair(record, &labels_slice, 6);
case 6: process_slice_pair(record, &labels_slice, 5);
case 5: process_slice_pair(record, &labels_slice, 4);
case 4: process_slice_pair(record, &labels_slice, 3);
case 3: process_slice_pair(record, &labels_slice, 2);
case 2: process_slice_pair(record, &labels_slice, 1);
case 1: process_slice_pair(record, &labels_slice, 0);
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why can't we use a for loop, does clang/llvm fail to unroll it?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Auto unrolling chewed up more instructions and I was able to get a couple more labels with this approach. Also auto unrolling requires a static limit where this approach works with a dynamic upper bound.

@gnurizen gnurizen force-pushed the go24 branch 4 times, most recently from 1d1afe8 to db65419 Compare February 22, 2025 20:47
Put go label collection in a separate unwinder routine and tail call it.

Native unwinder and other custom labels code stays in unwind_stop.

Hand unroll loops and great simplify the hash function.

Reduce number of custom labels from 16 to 14.

Remove opaquify.h, fix verifier errors by moving code around.

Add a simple integration test for custom labels that runs against all
kernels.

Refactor test code to put shared code in a helper package.
@gnurizen gnurizen merged commit 8188571 into main Feb 24, 2025
18 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.

3 participants