<feed xmlns='http://www.w3.org/2005/Atom'>
<title>gcc.git/libgo/runtime/proc.c, branch master</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/gcc.git/'/>
<entry>
<title>runtime: remove direct assignments to memory locations</title>
<updated>2021-07-10T02:48:53+00:00</updated>
<author>
<name>Ian Lance Taylor</name>
<email>iant@golang.org</email>
</author>
<published>2021-07-09T02:25:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/gcc.git/commit/?id=1798cac7a8b3331a277da1f106752ce0a34f8937'/>
<id>1798cac7a8b3331a277da1f106752ce0a34f8937</id>
<content type='text'>
PR bootstrap/101374
They cause a warning with the updated GCC -Warray-bounds option.
Replace them with calls to abort, which for our purposes is fine.

Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/333409
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
PR bootstrap/101374
They cause a warning with the updated GCC -Warray-bounds option.
Replace them with calls to abort, which for our purposes is fine.

Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/333409
</pre>
</div>
</content>
</entry>
<entry>
<title>runtime: cast SIGSTKSZ to uintptr</title>
<updated>2021-03-09T00:23:31+00:00</updated>
<author>
<name>Ian Lance Taylor</name>
<email>iant@golang.org</email>
</author>
<published>2021-03-08T21:58:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/gcc.git/commit/?id=d5d3f15a0e04c30d5dbec09b56c14ad923a3e8da'/>
<id>d5d3f15a0e04c30d5dbec09b56c14ad923a3e8da</id>
<content type='text'>
In newer versions of glibc it is long, which causes a signed
comparison warning.

Fixes PR go/99458
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In newer versions of glibc it is long, which causes a signed
comparison warning.

Fixes PR go/99458
</pre>
</div>
</content>
</entry>
<entry>
<title>libgo: update to 1.15.6 release</title>
<updated>2020-12-08T22:01:04+00:00</updated>
<author>
<name>Ian Lance Taylor</name>
<email>iant@golang.org</email>
</author>
<published>2020-12-08T18:57:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/gcc.git/commit/?id=5ea350d1d7edf8afaae9e6723cda535c9eaa7562'/>
<id>5ea350d1d7edf8afaae9e6723cda535c9eaa7562</id>
<content type='text'>
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/276153
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/276153
</pre>
</div>
</content>
</entry>
<entry>
<title>compile, runtime: permit anonymous and empty fields in C header</title>
<updated>2019-08-30T21:49:49+00:00</updated>
<author>
<name>Ian Lance Taylor</name>
<email>ian@gcc.gnu.org</email>
</author>
<published>2019-08-30T21:49:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/gcc.git/commit/?id=4a140826453da37a134d792e0224f4e37343e68a'/>
<id>4a140826453da37a134d792e0224f4e37343e68a</id>
<content type='text'>
    
    Permit putting structs with anonymous and empty fields in the C header
    file runtime.inc that is used to build the C runtime code.  This is
    required for upcoming 1.13 support, as the m struct has picked up an
    anonymous field.
    
    Doing this lets the C header contain all the type descriptor structs,
    so start using those in the C code.  This cuts the number of copies of
    type descriptor definitions from 3 to 2.
    
    Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/192343

From-SVN: r275227
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
    
    Permit putting structs with anonymous and empty fields in the C header
    file runtime.inc that is used to build the C runtime code.  This is
    required for upcoming 1.13 support, as the m struct has picked up an
    anonymous field.
    
    Doing this lets the C header contain all the type descriptor structs,
    so start using those in the C code.  This cuts the number of copies of
    type descriptor definitions from 3 to 2.
    
    Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/192343

From-SVN: r275227
</pre>
</div>
</content>
</entry>
<entry>
<title>runtime: expose the g variable</title>
<updated>2019-07-15T21:17:16+00:00</updated>
<author>
<name>Ian Lance Taylor</name>
<email>ian@gcc.gnu.org</email>
</author>
<published>2019-07-15T21:17:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/gcc.git/commit/?id=4e62f891cdeabc14cf6195a69dc6528aab11e753'/>
<id>4e62f891cdeabc14cf6195a69dc6528aab11e753</id>
<content type='text'>
    
    Currently, getg is implemented in C, which loads the thread-local
    g variable. The g variable is declared static in C.
    
    This CL exposes the g variable, so it can be accessed from the Go
    side. This allows the Go compiler to inline getg calls to direct
    access of g.
    
    Currently, the actual inlining is only implemented in the gollvm
    compiler. The g variable is thread-local and the compiler backend
    may choose to cache the TLS address in a register or on stack. If
    a thread switch happens the cache may become invalid. I don't
    know how to disable the TLS address cache in gccgo, therefore
    the inlining of getg is not implemented. In the future gccgo may
    gain this if we know how to do it safely.
    
    Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/186238

From-SVN: r273499
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
    
    Currently, getg is implemented in C, which loads the thread-local
    g variable. The g variable is declared static in C.
    
    This CL exposes the g variable, so it can be accessed from the Go
    side. This allows the Go compiler to inline getg calls to direct
    access of g.
    
    Currently, the actual inlining is only implemented in the gollvm
    compiler. The g variable is thread-local and the compiler backend
    may choose to cache the TLS address in a register or on stack. If
    a thread switch happens the cache may become invalid. I don't
    know how to disable the TLS address cache in gccgo, therefore
    the inlining of getg is not implemented. In the future gccgo may
    gain this if we know how to do it safely.
    
    Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/186238

From-SVN: r273499
</pre>
</div>
</content>
</entry>
<entry>
<title>runtime: remove unnecessary functions calling between C and Go</title>
<updated>2019-06-03T23:02:43+00:00</updated>
<author>
<name>Ian Lance Taylor</name>
<email>ian@gcc.gnu.org</email>
</author>
<published>2019-06-03T23:02:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/gcc.git/commit/?id=a920eb0cb08da30f4d7d4345f42067fdf8ce7b9b'/>
<id>a920eb0cb08da30f4d7d4345f42067fdf8ce7b9b</id>
<content type='text'>
    
    These functions were needed during the transition of the runtime from
    C to Go, but are no longer necessary.
    
    Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/179879

From-SVN: r271890
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
    
    These functions were needed during the transition of the runtime from
    C to Go, but are no longer necessary.
    
    Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/179879

From-SVN: r271890
</pre>
</div>
</content>
</entry>
<entry>
<title>runtime: implement cheaper context switch on Linux/AMD64</title>
<updated>2019-05-31T17:56:36+00:00</updated>
<author>
<name>Ian Lance Taylor</name>
<email>ian@gcc.gnu.org</email>
</author>
<published>2019-05-31T17:56:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/gcc.git/commit/?id=4d12cf3cc3143843225ecdb0e5048fc7c37b1574'/>
<id>4d12cf3cc3143843225ecdb0e5048fc7c37b1574</id>
<content type='text'>
    
    Currently, goroutine switches are implemented with libc
    getcontext/setcontext functions, which saves/restores the machine
    register states and also the signal context. This does more than
    what we need, and performs an expensive syscall.
    
    This CL implements a simplified version of getcontext/setcontext,
    in assembly, that only saves/restores the necessary part, i.e.
    the callee-save registers, and the PC, SP. A simplified version
    of makecontext, written in C, is also added. Currently this is
    only implemented on Linux/AMD64.
    
    Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/178298

From-SVN: r271818
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
    
    Currently, goroutine switches are implemented with libc
    getcontext/setcontext functions, which saves/restores the machine
    register states and also the signal context. This does more than
    what we need, and performs an expensive syscall.
    
    This CL implements a simplified version of getcontext/setcontext,
    in assembly, that only saves/restores the necessary part, i.e.
    the callee-save registers, and the PC, SP. A simplified version
    of makecontext, written in C, is also added. Currently this is
    only implemented on Linux/AMD64.
    
    Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/178298

From-SVN: r271818
</pre>
</div>
</content>
</entry>
<entry>
<title>runtime: in doscanstackswitch, set gp-&gt;m before gogo</title>
<updated>2019-01-07T22:07:26+00:00</updated>
<author>
<name>Ian Lance Taylor</name>
<email>ian@gcc.gnu.org</email>
</author>
<published>2019-01-07T22:07:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/gcc.git/commit/?id=33a5d8ccb5482e446410ffbba30f0b560fc1c8fc'/>
<id>33a5d8ccb5482e446410ffbba30f0b560fc1c8fc</id>
<content type='text'>
    
    This is following CL 156038. doscanstackswitch uses the same
    mechanism of switching goroutines as getTraceback, and so has
    the same problem as described in issue golang/go#29448. This CL
    applies the same fix.
    
    Reviewed-on: https://go-review.googlesource.com/c/156697

From-SVN: r267661
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
    
    This is following CL 156038. doscanstackswitch uses the same
    mechanism of switching goroutines as getTraceback, and so has
    the same problem as described in issue golang/go#29448. This CL
    applies the same fix.
    
    Reviewed-on: https://go-review.googlesource.com/c/156697

From-SVN: r267661
</pre>
</div>
</content>
</entry>
<entry>
<title>runtime: in getTraceback, set gp-&gt;m before gogo</title>
<updated>2019-01-07T20:12:39+00:00</updated>
<author>
<name>Ian Lance Taylor</name>
<email>ian@gcc.gnu.org</email>
</author>
<published>2019-01-07T20:12:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/gcc.git/commit/?id=575eb8f58b06657c9cadfe6f7ddfd9e530fe5dea'/>
<id>575eb8f58b06657c9cadfe6f7ddfd9e530fe5dea</id>
<content type='text'>
    
    Currently, when collecting a traceback for another goroutine,
    getTraceback calls gogo(gp) switching to gp, which will resume in
    mcall, which will call gtraceback, which will set up gp-&gt;m. There
    is a gap between setting the current running g to gp and setting
    gp-&gt;m. If a profiling signal arrives in between, sigtramp will
    see a non-nil gp with a nil m, and will seg fault. Fix this by
    setting up gp-&gt;m first.
    
    Fixes golang/go#29448.
    
    Reviewed-on: https://go-review.googlesource.com/c/156038

From-SVN: r267658
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
    
    Currently, when collecting a traceback for another goroutine,
    getTraceback calls gogo(gp) switching to gp, which will resume in
    mcall, which will call gtraceback, which will set up gp-&gt;m. There
    is a gap between setting the current running g to gp and setting
    gp-&gt;m. If a profiling signal arrives in between, sigtramp will
    see a non-nil gp with a nil m, and will seg fault. Fix this by
    setting up gp-&gt;m first.
    
    Fixes golang/go#29448.
    
    Reviewed-on: https://go-review.googlesource.com/c/156038

From-SVN: r267658
</pre>
</div>
</content>
</entry>
<entry>
<title>runtime: add precise stack scan support</title>
<updated>2018-12-05T23:09:51+00:00</updated>
<author>
<name>Ian Lance Taylor</name>
<email>ian@gcc.gnu.org</email>
</author>
<published>2018-12-05T23:09:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/gcc.git/commit/?id=c43137e800bb9ca2ecda0a6b6189e0eb5c22f0d7'/>
<id>c43137e800bb9ca2ecda0a6b6189e0eb5c22f0d7</id>
<content type='text'>
    
    This CL adds support of precise stack scan using stack maps to
    the runtime. The stack maps are generated by the compiler (if
    supported). Each safepoint is associated with a (real or dummy)
    landing pad, and its "type info" in the exception table is a
    pointer to the stack map. When a stack is scanned, the stack map
    is found by the stack unwinding code by inspecting the exception
    table (LSDA).
    
    For precise stack scan we need to unwind the stack. There are
    three cases:
    
    - If a goroutine is scanning its own stack, it can unwind the
      stack and scan the frames.
    
    - If a goroutine is scanning another, stopped, goroutine, it
      cannot directly unwind the target stack. We handle this by
      switching (runtime.gogo) to the target g, letting it unwind
      and scan the stack, and switch back.
    
    - If we are scanning a goroutine that is blocked in a syscall,
      we send a signal to the target goroutine's thread, and let the
      signal handler unwind and scan the stack. Extra care is needed
      as this races with enter/exit syscall.
    
    Currently this is only implemented on linux.
    
    Reviewed-on: https://go-review.googlesource.com/c/140518

From-SVN: r266832
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
    
    This CL adds support of precise stack scan using stack maps to
    the runtime. The stack maps are generated by the compiler (if
    supported). Each safepoint is associated with a (real or dummy)
    landing pad, and its "type info" in the exception table is a
    pointer to the stack map. When a stack is scanned, the stack map
    is found by the stack unwinding code by inspecting the exception
    table (LSDA).
    
    For precise stack scan we need to unwind the stack. There are
    three cases:
    
    - If a goroutine is scanning its own stack, it can unwind the
      stack and scan the frames.
    
    - If a goroutine is scanning another, stopped, goroutine, it
      cannot directly unwind the target stack. We handle this by
      switching (runtime.gogo) to the target g, letting it unwind
      and scan the stack, and switch back.
    
    - If we are scanning a goroutine that is blocked in a syscall,
      we send a signal to the target goroutine's thread, and let the
      signal handler unwind and scan the stack. Extra care is needed
      as this races with enter/exit syscall.
    
    Currently this is only implemented on linux.
    
    Reviewed-on: https://go-review.googlesource.com/c/140518

From-SVN: r266832
</pre>
</div>
</content>
</entry>
</feed>
