Title: feat: improve struct_ops codegen lifecycle and test coverage by SiyuanSun0736 · Pull Request #17 · multikernel/kernelscript · GitHub
Open Graph Title: feat: improve struct_ops codegen lifecycle and test coverage by SiyuanSun0736 · Pull Request #17 · multikernel/kernelscript
X Title: feat: improve struct_ops codegen lifecycle and test coverage by SiyuanSun0736 · Pull Request #17 · multikernel/kernelscript
Description: Summary This PR improves struct_ops code generation and strengthens regression coverage across both eBPF and userspace paths. Key changes: keep internal struct_ops function calls as direct calls instead of lowering them into implicit tail calls synthesize a stable default name for struct_ops instances when the kernel struct expects a name field but the impl block omits it improve userspace struct_ops lifecycle generation around main so registration results, attach helpers, wait flow, and detach/cleanup behavior are emitted more reliably expand struct_ops tests to cover runtime helpers, cleanup hooks, attach/detach helpers, EPERM diagnostics, and direct-call behavior Details In IR generation: tracked the current program type during lowering so struct_ops methods are not treated like normal attributed programs for implicit tail-call lowering added logic to preserve direct calls for internal struct_ops method-to-method invocations generated a default struct_ops name automatically when the target kernel struct has a name field and no explicit static field is provided In userspace code generation: improved detection of the main registration flow for struct_ops programs preserved the registration result through generated attach/wait/detach lifecycle code strengthened lifecycle generation so cleanup helpers, unregister waiting, and detach handling are validated by tests In examples and tests: updated the struct_ops example to include an internal helper-style call path through undo_cwnd -> ssthresh added regression coverage ensuring struct_ops internal calls remain direct calls expanded userspace struct_ops codegen tests to verify runtime helper emission, cleanup registration, attach/detach helpers, and struct_ops-specific load diagnostics Testing extended struct_ops code generation unit tests added regression coverage for direct internal calls in struct_ops impl blocks added userspace codegen assertions for runtime helpers and cleanup flow
Open Graph Description: Summary This PR improves struct_ops code generation and strengthens regression coverage across both eBPF and userspace paths. Key changes: keep internal struct_ops function calls as direct calls i...
X Description: Summary This PR improves struct_ops code generation and strengthens regression coverage across both eBPF and userspace paths. Key changes: keep internal struct_ops function calls as direct calls i...
Opengraph URL: https://github.com/multikernel/kernelscript/pull/17
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:cc769691-9407-0d03-5f6a-1543a09524d1 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | ECC4:166A68:7A0A2:AD7B9:6A61F7F3 |
| html-safe-nonce | 267190c5ea24f372a070ffd53778a948dfb06c6211fd680ba067ef36d750549e |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFQ0M0OjE2NkE2ODo3QTBBMjpBRDdCOTo2QTYxRjdGMyIsInZpc2l0b3JfaWQiOiI3ODM1OTU0MTkzMDczNTY3NzMxIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | a1502a1a74ce04752c9bd557e4ad4e6531b59f3af5e094f98fb329a9a3f9ac0a |
| hovercard-subject-tag | pull_request:3514333541 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/multikernel/kernelscript/pull/17/files |
| twitter:image | https://avatars.githubusercontent.com/u/100674758?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/100674758?s=400&v=4 |
| og:image:alt | Summary This PR improves struct_ops code generation and strengthens regression coverage across both eBPF and userspace paths. Key changes: keep internal struct_ops function calls as direct calls i... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 9e41a6fd863e96b9c7e9185dc317bf107dbbf8cb10efd6dea957211963f33775 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/multikernel/kernelscript git https://github.com/multikernel/kernelscript.git |
| octolytics-dimension-user_id | 202362072 |
| octolytics-dimension-user_login | multikernel |
| octolytics-dimension-repository_id | 1019261571 |
| octolytics-dimension-repository_nwo | multikernel/kernelscript |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1019261571 |
| octolytics-dimension-repository_network_root_nwo | multikernel/kernelscript |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 2ed5e9c44acb35dcc1d752e449d2a6f7a6164b7b |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width