Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 323 for barriers (0.17 sec)

  1. src/runtime/mbarrier.go

    	"unsafe"
    )
    
    // Go uses a hybrid barrier that combines a Yuasa-style deletion
    // barrier—which shades the object whose reference is being
    // overwritten—with Dijkstra insertion barrier—which shades the object
    // whose reference is being written. The insertion part of the barrier
    // is necessary while the calling goroutine's stack is grey. In
    // pseudocode, the barrier is:
    //
    //     writePointer(slot, ptr):
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 17:58:53 UTC 2024
    - 15.7K bytes
    - Viewed (0)
  2. src/runtime/mwbbuf.go

    // This implements the write barrier buffer. The write barrier itself
    // is gcWriteBarrier and is implemented in assembly.
    //
    // See mbarrier.go for algorithmic details on the write barrier. This
    // file deals only with the buffer.
    //
    // The write barrier has a fast path and a slow path. The fast path
    // simply enqueues to a per-P write barrier buffer. It's written in
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 25 19:53:03 UTC 2024
    - 8.1K bytes
    - Viewed (0)
  3. test/writebarrier.go

    	z := *y // no barrier
    	*x = z  // ERROR "write barrier"
    }
    
    func f2(x *interface{}, y interface{}) {
    	*x = y // no barrier (dead store)
    
    	z := y // no barrier
    	*x = z // ERROR "write barrier"
    }
    
    func f2a(x *interface{}, y *interface{}) {
    	*x = *y // no barrier (dead store)
    
    	z := y // no barrier
    	*x = z // ERROR "write barrier"
    }
    
    func f3(x *string, y string) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Aug 23 19:46:36 UTC 2021
    - 5.9K bytes
    - Viewed (0)
  4. test/fixedbugs/issue11256.go

    			runtime.Goexit()
    		}()
    
    		// Generate some garbage.
    		x[i] = make([]byte, 1024*1024)
    
    		// Give GC some time to install stack barriers in the G.
    		time.Sleep(50 * time.Microsecond)
    		atomic.StoreInt32(&done, 1)
    		for atomic.LoadInt32(&done) == 1 {
    			runtime.Gosched()
    		}
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jun 29 15:02:30 UTC 2015
    - 1.1K bytes
    - Viewed (0)
  5. src/cmd/compile/internal/test/fixedbugs_test.go

    		// value of makeT() is not copied out of the args area of
    		// stack frame in a timely fashion. So when write barriers
    		// are enabled, the marshaling of the args for the write
    		// barrier call clobbers the result of makeT() before it is
    		// read by the write barrier code.
    		g = makeT()
    		sink = make([]byte, 1000) // force write barriers to eventually happen
    	}
    }
    func TestIssue15854b(t *testing.T) {
    	const N = 10000
    	a := make([]T, N)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Feb 06 18:07:35 UTC 2023
    - 2.1K bytes
    - Viewed (0)
  6. src/runtime/export_debug_test.go

    	sigCtxt sigContext
    }
    
    func (h *debugCallHandler) inject(info *siginfo, ctxt *sigctxt, gp2 *g) bool {
    	// TODO(49370): This code is riddled with write barriers, but called from
    	// a signal handler. Add the go:nowritebarrierrec annotation and restructure
    	// this to avoid write barriers.
    
    	switch h.gp.atomicstatus.Load() {
    	case _Grunning:
    		if getg().m != h.mp {
    			println("trap on wrong M", getg().m, h.mp)
    			return false
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 15:41:45 UTC 2024
    - 5.1K bytes
    - Viewed (0)
  7. src/runtime/internal/sys/nih.go

    // - Maps and channels contains no-in-heap types are disallowed.
    //
    // 4. Write barriers on pointers to not-in-heap types can be omitted.
    //
    // The last point is the real benefit of NotInHeap. The runtime uses
    // it for low-level internal structures to avoid memory barriers in the
    // scheduler and the memory allocator where they are illegal or simply
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Sep 02 18:24:50 UTC 2022
    - 1.7K bytes
    - Viewed (0)
  8. test/fixedbugs/issue25516.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    // Make sure dead write barriers are handled correctly.
    
    package main
    
    func f(p **int) {
    	// The trick here is to eliminate the block containing the write barrier,
    	// but only after the write barrier branches are inserted.
    	// This requires some delicate code.
    	i := 0
    	var b []bool
    	var s string
    	for true {
    		if b[i] {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 29 17:45:36 UTC 2018
    - 558 bytes
    - Viewed (0)
  9. test/fixedbugs/issue30977.go

    //go:noinline
    func f() {
    	// The compiler optimizes this to direct copying
    	// the call result to both globals, with write
    	// barriers. The first write barrier call clobbers
    	// the result of g on stack.
    	X = g()
    	Y = X
    }
    
    var X, Y T
    
    const N = 1000
    
    func main() {
    	// Keep GC running so the write barrier is on.
    	go func() {
    		for {
    			runtime.GC()
    		}
    	}()
    
    	for i := 0; i < N; i++ {
    		runtime.Gosched()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Mar 21 21:05:13 UTC 2019
    - 865 bytes
    - Viewed (0)
  10. src/runtime/HACKING.md

    `go:nowritebarrier` directs the compiler to emit an error if the
    following function contains any write barriers. (It *does not*
    suppress the generation of write barriers; it is simply an assertion.)
    
    Usually you want `go:nowritebarrierrec`. `go:nowritebarrier` is
    primarily useful in situations where it's "nice" not to have write
    barriers, but not required for correctness.
    
    go:nowritebarrierrec and go:yeswritebarrierrec
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 25 19:53:03 UTC 2024
    - 13.9K bytes
    - Viewed (0)
Back to top