Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 80 for gcbits (0.37 sec)

  1. src/reflect/export_test.go

    	for i, offs := range offset {
    		rodata := sections[i]
    		for _, off := range offs {
    			typ := (*rtype)(resolveTypeOff(rodata, off))
    			r = append(r, typ.String())
    		}
    	}
    	return r
    }
    
    var GCBits = gcbits
    
    func gcbits(any) []byte // provided by runtime
    
    func MapBucketOf(x, y Type) Type {
    	return toType(bucketOf(x.common(), y.common()))
    }
    
    func CachedBucketOf(m Type) Type {
    	t := m.(*rtype)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 15:10:48 UTC 2024
    - 3.8K bytes
    - Viewed (0)
  2. src/runtime/cgocheck.go

    // bytes, and throws if it finds an unpinned Go pointer. The gcbits mark each
    // pointer value. The src pointer is off bytes into the gcbits.
    //
    //go:nosplit
    //go:nowritebarrier
    func cgoCheckBits(src unsafe.Pointer, gcbits *byte, off, size uintptr) {
    	skipMask := off / goarch.PtrSize / 8
    	skipBytes := skipMask * goarch.PtrSize * 8
    	ptrmask := addb(gcbits, skipMask)
    	src = add(src, skipBytes)
    	off -= skipBytes
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 09 04:07:57 UTC 2024
    - 7.6K bytes
    - Viewed (0)
  3. src/runtime/pinner.go

    		atomic.And8(v.bytep, ^mask)
    	}
    }
    
    // pinnerBits is the same type as gcBits but has different methods.
    type pinnerBits gcBits
    
    // ofObject returns the pinState of the n'th object.
    // nosplit, because it's called by isPinned, which is nosplit
    //
    //go:nosplit
    func (p *pinnerBits) ofObject(n uintptr) pinState {
    	bytep, mask := (*gcBits)(p).bitp(n * 2)
    	byteVal := atomic.Load8(bytep)
    	return pinState{bytep, byteVal, mask}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 04 14:29:45 UTC 2024
    - 11K bytes
    - Viewed (0)
  4. src/runtime/mheap.go

    	default:
    		throw("bad special kind")
    		panic("not reached")
    	}
    }
    
    // gcBits is an alloc/mark bitmap. This is always used as gcBits.x.
    type gcBits struct {
    	_ sys.NotInHeap
    	x uint8
    }
    
    // bytep returns a pointer to the n'th byte of b.
    func (b *gcBits) bytep(n uintptr) *uint8 {
    	return addb(&b.x, n)
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 22:31:00 UTC 2024
    - 78K bytes
    - Viewed (0)
  5. src/runtime/gcinfo_test.go

    		//
    		// The Go runtime's pointer/scalar iterator generates pointers beyond
    		// the size of the type, up to the size of the size class. This space
    		// is safe for the GC to scan since it's zero, and GCBits checks to
    		// make sure that's true. But we need to handle the fact that the bitmap
    		// may be larger than we expect.
    		return
    	}
    	t.Errorf("bad GC program for %v:\nwant %+v\ngot  %+v", name, mask0, mask)
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Nov 09 19:58:08 UTC 2023
    - 6K bytes
    - Viewed (0)
  6. src/cmd/link/internal/ld/symtab.go

    		setCarrierSym(t, s.Sym())
    		return s.Sym()
    	}
    	var (
    		symgostring = groupSym("go:string.*", sym.SGOSTRING)
    		symgofunc   = groupSym("go:func.*", sym.SGOFUNC)
    		symgcbits   = groupSym("runtime.gcbits.*", sym.SGCBITS)
    	)
    
    	symgofuncrel := symgofunc
    	if ctxt.UseRelro() {
    		symgofuncrel = groupSym("go:funcrel.*", sym.SGOFUNCRELRO)
    	}
    
    	symt := ldr.CreateSymForUpdate("runtime.symtab", 0)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Sep 13 16:29:40 UTC 2023
    - 29.2K bytes
    - Viewed (0)
  7. src/runtime/gc_test.go

    	// n must always be a multiple of 8, since gcBits is
    	// always rounded up 8 bytes.
    	for _, n := range []int{8, 16, 32, 64, 128} {
    		b.Run(fmt.Sprintf("bits=%d", n*8), func(b *testing.B) {
    			// Initialize a new byte slice with pseduo-random data.
    			bits := make([]byte, n)
    			rand.Read(bits)
    
    			b.ResetTimer()
    			for i := 0; i < b.N; i++ {
    				runtime.MSpanCountAlloc(s, bits)
    			}
    		})
    	}
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jun 05 22:33:52 UTC 2024
    - 17.6K bytes
    - Viewed (0)
  8. src/cmd/link/internal/ld/xcoff.go

    	case sym.SGOFUNC:
    		if !ctxt.DynlinkingGo() {
    			outerSymSize["go:func.*"] = size
    		}
    	case sym.SGOFUNCRELRO:
    		outerSymSize["go:funcrel.*"] = size
    	case sym.SGCBITS:
    		outerSymSize["runtime.gcbits.*"] = size
    	case sym.SPCLNTAB:
    		outerSymSize["runtime.pclntab"] = size
    	}
    }
    
    // addSymbol writes a symbol or an auxiliary symbol entry on ctxt.out.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Dec 01 19:58:23 UTC 2023
    - 51.8K bytes
    - Viewed (0)
  9. src/runtime/mbitmap.go

    			for ; c >= npattern; c -= npattern {
    				bits |= pattern << nbits
    				nbits += npattern
    				for nbits >= 8 {
    					*dst = uint8(bits)
    					dst = add1(dst)
    					bits >>= 8
    					nbits -= 8
    				}
    			}
    
    			// Add final fragment to bit buffer.
    			if c > 0 {
    				pattern &= 1<<c - 1
    				bits |= pattern << nbits
    				nbits += c
    			}
    			continue Run
    		}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 00:18:55 UTC 2024
    - 60K bytes
    - Viewed (0)
  10. src/runtime/export_test.go

    		lock(&mheap_.lock)
    		mheap_.spanalloc.free(unsafe.Pointer(s))
    		unlock(&mheap_.lock)
    	})
    }
    
    func MSpanCountAlloc(ms *MSpan, bits []byte) int {
    	s := (*mspan)(ms)
    	s.nelems = uint16(len(bits) * 8)
    	s.gcmarkBits = (*gcBits)(unsafe.Pointer(&bits[0]))
    	result := s.countAlloc()
    	s.gcmarkBits = nil
    	return result
    }
    
    const (
    	TimeHistSubBucketBits = timeHistSubBucketBits
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 17:50:53 UTC 2024
    - 46.1K bytes
    - Viewed (0)
Back to top