mirror of
https://github.com/golang/go
synced 2024-11-19 17:04:41 -07:00
runtime: move gosched to Go, to add stack frame information
LGTM=khr R=khr CC=golang-codereviews https://golang.org/cl/134520044
This commit is contained in:
parent
724fa12f91
commit
15a5c35cec
@ -477,7 +477,7 @@ func gogc(force int32) {
|
||||
// now that gc is done, kick off finalizer thread if needed
|
||||
if !concurrentSweep {
|
||||
// give the queued finalizers, if any, a chance to run
|
||||
gosched()
|
||||
Gosched()
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -89,7 +89,7 @@ func bgsweep() {
|
||||
for {
|
||||
for gosweepone() != ^uintptr(0) {
|
||||
sweep.nbgsweep++
|
||||
gosched()
|
||||
Gosched()
|
||||
}
|
||||
lock(&gclock)
|
||||
if !gosweepdone() {
|
||||
|
@ -1677,18 +1677,7 @@ runtime·park_m(G *gp)
|
||||
schedule();
|
||||
}
|
||||
|
||||
// Scheduler yield.
|
||||
#pragma textflag NOSPLIT
|
||||
void
|
||||
runtime·gosched(void)
|
||||
{
|
||||
void (*fn)(G*);
|
||||
|
||||
fn = runtime·gosched_m;
|
||||
runtime·mcall(&fn);
|
||||
}
|
||||
|
||||
// runtime·gosched continuation on g0.
|
||||
// Gosched continuation on g0.
|
||||
void
|
||||
runtime·gosched_m(G *gp)
|
||||
{
|
||||
|
@ -852,7 +852,6 @@ void runtime·setg(G*);
|
||||
void runtime·newextram(void);
|
||||
void runtime·exit(int32);
|
||||
void runtime·breakpoint(void);
|
||||
void runtime·gosched(void);
|
||||
void runtime·gosched_m(G*);
|
||||
void runtime·schedtrace(bool);
|
||||
void runtime·park(bool(*)(G*, void*), void*, String);
|
||||
|
@ -130,7 +130,6 @@ func memclr(ptr unsafe.Pointer, n uintptr)
|
||||
//go:noescape
|
||||
func memmove(to unsafe.Pointer, from unsafe.Pointer, n uintptr)
|
||||
|
||||
func gosched()
|
||||
func starttheworld()
|
||||
func stoptheworld()
|
||||
func newextram()
|
||||
|
Loading…
Reference in New Issue
Block a user