From: Ian Lance Taylor <iant@golang.org>
To: gcc-patches <gcc-patches@gcc.gnu.org>,
gofrontend-dev <gofrontend-dev@googlegroups.com>
Subject: libgo patch committed: Mark syscall functions noescape
Date: Wed, 16 Jan 2019 22:38:00 -0000 [thread overview]
Message-ID: <CAOyqgcUbAHCia92tHjcfgsho8+GKAnCCU-va4o21RWHx3SWZ7w@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 258 bytes --]
This patch by Cherry Zhang marks the syscall functions that call into
C code as noescape, so that calling syscall functions that take
pointers do not require allocation. Bootstrapped and ran Go testsuite
on x86_64-pc-linux-gnu. Committed to mainline.
Ian
[-- Attachment #2: patch.txt --]
[-- Type: text/plain, Size: 1447 bytes --]
Index: gcc/go/gofrontend/MERGE
===================================================================
--- gcc/go/gofrontend/MERGE (revision 267956)
+++ gcc/go/gofrontend/MERGE (working copy)
@@ -1,4 +1,4 @@
-9a79c333e896ea49f6a708d459148074d29a2af6
+ee94431c133a90ca5c3c5ebbebcb019c60258dac
The first line of this file holds the git revision number of the last
merge done from the gofrontend repository.
Index: libgo/go/syscall/exec_linux.go
===================================================================
--- libgo/go/syscall/exec_linux.go (revision 267941)
+++ libgo/go/syscall/exec_linux.go (working copy)
@@ -62,6 +62,7 @@ func runtime_AfterFork()
func runtime_AfterForkInChild()
// Implemented in clone_linux.c
+//go:noescape
func rawClone(flags _C_ulong, child_stack *byte, ptid *Pid_t, ctid *Pid_t, regs unsafe.Pointer) _C_long
// Fork, dup fd onto 0..len(fd), and exec(argv0, argvv, envv) in child.
Index: libgo/go/syscall/mksyscall.awk
===================================================================
--- libgo/go/syscall/mksyscall.awk (revision 267941)
+++ libgo/go/syscall/mksyscall.awk (working copy)
@@ -98,6 +98,7 @@ BEGIN {
printf("// Automatically generated wrapper for %s/%s\n", gofnname, cfnname)
if (!(cfnname in cfns)) {
cfns[cfnname] = 1
+ printf("//go:noescape\n")
printf("//extern %s\n", cfnname)
printf("func c_%s(%s) %s\n", cfnname, cfnparams, cfnresult)
}
reply other threads:[~2019-01-16 22:38 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAOyqgcUbAHCia92tHjcfgsho8+GKAnCCU-va4o21RWHx3SWZ7w@mail.gmail.com \
--to=iant@golang.org \
--cc=gcc-patches@gcc.gnu.org \
--cc=gofrontend-dev@googlegroups.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).