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

golang extension: optimization: added noescape and nocallback directives for C functions. #29396

Merged
merged 2 commits into from
Sep 7, 2023

Conversation

doujiang24
Copy link
Member

they could prevent the Go compiler from allocating function parameters on the heap.

noescape and nocallback are new go1.22 cgo directives that help the Go compiler make better decisions. See golang/go#56378 for more context.

…ves for C functions.

they could prevent the Go compiler from allocating function parameters on the heap.

Signed-off-by: doujiang24 <doujiang24@gmail.com>
Signed-off-by: doujiang24 <doujiang24@gmail.com>
@doujiang24
Copy link
Member Author

/retest

@doujiang24
Copy link
Member Author

seems the tests failed due to a bad network?

ERROR: An error occurred during the fetch of repository 'boringssl':
   Traceback (most recent call last):
	File "/home/runner/.cache/bazel/_bazel_runner/02539c6c583a07d8a5de0e5505565d64/external/bazel_tools/tools/build_defs/repo/http.bzl", line 132, column 45, in _http_archive_impl
		download_info = ctx.download_and_extract(
Error in download_and_extract: java.io.IOException: Error downloading [https://github.com/google/boringssl/archive/88d7a40bd06a34da6ee0d985545755199d047258.tar.gz] to /home/runner/.cache/bazel/_bazel_runner/02539c6c583a07d8a5de0e5505565d64/external/boringssl/temp95[28](https://github.com/envoyproxy/envoy/actions/runs/6072484811/job/16474468365?pr=29396#step:4:29)405596523223581/88d7a40bd06a34da6ee0d985545755199d047258.tar.gz: java.net.SocketTimeoutException: Read timed out

https://github.com/envoyproxy/envoy/actions/runs/6072484811/job/16474468365?pr=29396

@doujiang24
Copy link
Member Author

/retest

1 similar comment
@doujiang24
Copy link
Member Author

/retest

@doujiang24
Copy link
Member Author

/retest

@doujiang24
Copy link
Member Author

ci is happy now, it's good to merge. cc @wbpcode

Copy link
Member

@wbpcode wbpcode left a comment

Choose a reason for hiding this comment

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

LGTM, thanks

@wbpcode wbpcode merged commit d1b6788 into envoyproxy:main Sep 7, 2023
116 checks passed
spacewander pushed a commit to spacewander/envoy that referenced this pull request Sep 19, 2023
…ves for C functions. (envoyproxy#29396)

* golang extension: optimization: added noescape and nocallback directives for C functions.

they could prevent the Go compiler from allocating function parameters on the heap.

Signed-off-by: doujiang24 <doujiang24@gmail.com>

* add comment for the magic number.

Signed-off-by: doujiang24 <doujiang24@gmail.com>

---------

Signed-off-by: doujiang24 <doujiang24@gmail.com>
@doujiang24 doujiang24 deleted the go-noescape branch October 12, 2023 14:56
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

3 participants