$82 GRAYBYTE WORDPRESS FILE MANAGER $91

SERVER : vnpttt-amd7f72-h1.vietnix.vn #1 SMP Fri May 24 12:42:50 UTC 2024
SERVER IP : 103.200.23.149 | ADMIN IP 216.73.216.22
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : NONE

/lib/golang/src/runtime/

HOME
Current File : /lib/golang/src/runtime//mgcpacer.go
// Copyright 2021 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

package runtime

import (
	"internal/cpu"
	"internal/goexperiment"
	"internal/runtime/atomic"
	"internal/runtime/math"
	"internal/runtime/strconv"
	_ "unsafe" // for go:linkname
)

const (
	// gcGoalUtilization is the goal CPU utilization for
	// marking as a fraction of GOMAXPROCS.
	//
	// Increasing the goal utilization will shorten GC cycles as the GC
	// has more resources behind it, lessening costs from the write barrier,
	// but comes at the cost of increasing mutator latency.
	gcGoalUtilization = gcBackgroundUtilization

	// gcBackgroundUtilization is the fixed CPU utilization for background
	// marking. It must be <= gcGoalUtilization. The difference between
	// gcGoalUtilization and gcBackgroundUtilization will be made up by
	// mark assists. The scheduler will aim to use within 50% of this
	// goal.
	//
	// As a general rule, there's little reason to set gcBackgroundUtilization
	// < gcGoalUtilization. One reason might be in mostly idle applications,
	// where goroutines are unlikely to assist at all, so the actual
	// utilization will be lower than the goal. But this is moot point
	// because the idle mark workers already soak up idle CPU resources.
	// These two values are still kept separate however because they are
	// distinct conceptually, and in previous iterations of the pacer the
	// distinction was more important.
	gcBackgroundUtilization = 0.25

	// gcCreditSlack is the amount of scan work credit that can
	// accumulate locally before updating gcController.heapScanWork and,
	// optionally, gcController.bgScanCredit. Lower values give a more
	// accurate assist ratio and make it more likely that assists will
	// successfully steal background credit. Higher values reduce memory
	// contention.
	gcCreditSlack = 2000

	// gcAssistTimeSlack is the nanoseconds of mutator assist time that
	// can accumulate on a P before updating gcController.assistTime.
	gcAssistTimeSlack = 5000

	// gcOverAssistWork determines how many extra units of scan work a GC
	// assist does when an assist happens. This amortizes the cost of an
	// assist by pre-paying for this many bytes of future allocations.
	gcOverAssistWork = 64 << 10

	// defaultHeapMinimum is the value of heapMinimum for GOGC==100.
	defaultHeapMinimum = (goexperiment.HeapMinimum512KiBInt)*(512<<10) +
		(1-goexperiment.HeapMinimum512KiBInt)*(4<<20)

	// maxStackScanSlack is the bytes of stack space allocated or freed
	// that can accumulate on a P before updating gcController.stackSize.
	maxStackScanSlack = 8 << 10

	// memoryLimitMinHeapGoalHeadroom is the minimum amount of headroom the
	// pacer gives to the heap goal when operating in the memory-limited regime.
	// That is, it'll reduce the heap goal by this many extra bytes off of the
	// base calculation, at minimum.
	memoryLimitMinHeapGoalHeadroom = 1 << 20

	// memoryLimitHeapGoalHeadroomPercent is how headroom the memory-limit-based
	// heap goal should have as a percent of the maximum possible heap goal allowed
	// to maintain the memory limit.
	memoryLimitHeapGoalHeadroomPercent = 3
)

// gcController implements the GC pacing controller that determines
// when to trigger concurrent garbage collection and how much marking
// work to do in mutator assists and background marking.
//
// It calculates the ratio between the allocation rate (in terms of CPU
// time) and the GC scan throughput to determine the heap size at which to
// trigger a GC cycle such that no GC assists are required to finish on time.
// This algorithm thus optimizes GC CPU utilization to the dedicated background
// mark utilization of 25% of GOMAXPROCS by minimizing GC assists.
// GOMAXPROCS. The high-level design of this algorithm is documented
// at https://github.com/golang/proposal/blob/master/design/44167-gc-pacer-redesign.md.
// See https://golang.org/s/go15gcpacing for additional historical context.
var gcController gcControllerState

type gcControllerState struct {
	// Initialized from GOGC. GOGC=off means no GC.
	gcPercent atomic.Int32

	// memoryLimit is the soft memory limit in bytes.
	//
	// Initialized from GOMEMLIMIT. GOMEMLIMIT=off is equivalent to MaxInt64
	// which means no soft memory limit in practice.
	//
	// This is an int64 instead of a uint64 to more easily maintain parity with
	// the SetMemoryLimit API, which sets a maximum at MaxInt64. This value
	// should never be negative.
	memoryLimit atomic.Int64

	// heapMinimum is the minimum heap size at which to trigger GC.
	// For small heaps, this overrides the usual GOGC*live set rule.
	//
	// When there is a very small live set but a lot of allocation, simply
	// collecting when the heap reaches GOGC*live results in many GC
	// cycles and high total per-GC overhead. This minimum amortizes this
	// per-GC overhead while keeping the heap reasonably small.
	//
	// During initialization this is set to 4MB*GOGC/100. In the case of
	// GOGC==0, this will set heapMinimum to 0, resulting in constant
	// collection even when the heap size is small, which is useful for
	// debugging.
	heapMinimum uint64

	// runway is the amount of runway in heap bytes allocated by the
	// application that we want to give the GC once it starts.
	//
	// This is computed from consMark during mark termination.
	runway atomic.Uint64

	// consMark is the estimated per-CPU consMark ratio for the application.
	//
	// It represents the ratio between the application's allocation
	// rate, as bytes allocated per CPU-time, and the GC's scan rate,
	// as bytes scanned per CPU-time.
	// The units of this ratio are (B / cpu-ns) / (B / cpu-ns).
	//
	// At a high level, this value is computed as the bytes of memory
	// allocated (cons) per unit of scan work completed (mark) in a GC
	// cycle, divided by the CPU time spent on each activity.
	//
	// Updated at the end of each GC cycle, in endCycle.
	consMark float64

	// lastConsMark is the computed cons/mark value for the previous 4 GC
	// cycles. Note that this is *not* the last value of consMark, but the
	// measured cons/mark value in endCycle.
	lastConsMark [4]float64

	// gcPercentHeapGoal is the goal heapLive for when next GC ends derived
	// from gcPercent.
	//
	// Set to ^uint64(0) if gcPercent is disabled.
	gcPercentHeapGoal atomic.Uint64

	// sweepDistMinTrigger is the minimum trigger to ensure a minimum
	// sweep distance.
	//
	// This bound is also special because it applies to both the trigger
	// *and* the goal (all other trigger bounds must be based *on* the goal).
	//
	// It is computed ahead of time, at commit time. The theory is that,
	// absent a sudden change to a parameter like gcPercent, the trigger
	// will be chosen to always give the sweeper enough headroom. However,
	// such a change might dramatically and suddenly move up the trigger,
	// in which case we need to ensure the sweeper still has enough headroom.
	sweepDistMinTrigger atomic.Uint64

	// triggered is the point at which the current GC cycle actually triggered.
	// Only valid during the mark phase of a GC cycle, otherwise set to ^uint64(0).
	//
	// Updated while the world is stopped.
	triggered uint64

	// lastHeapGoal is the value of heapGoal at the moment the last GC
	// ended. Note that this is distinct from the last value heapGoal had,
	// because it could change if e.g. gcPercent changes.
	//
	// Read and written with the world stopped or with mheap_.lock held.
	lastHeapGoal uint64

	// heapLive is the number of bytes considered live by the GC.
	// That is: retained by the most recent GC plus allocated
	// since then. heapLive ≤ memstats.totalAlloc-memstats.totalFree, since
	// heapAlloc includes unmarked objects that have not yet been swept (and
	// hence goes up as we allocate and down as we sweep) while heapLive
	// excludes these objects (and hence only goes up between GCs).
	//
	// To reduce contention, this is updated only when obtaining a span
	// from an mcentral and at this point it counts all of the unallocated
	// slots in that span (which will be allocated before that mcache
	// obtains another span from that mcentral). Hence, it slightly
	// overestimates the "true" live heap size. It's better to overestimate
	// than to underestimate because 1) this triggers the GC earlier than
	// necessary rather than potentially too late and 2) this leads to a
	// conservative GC rate rather than a GC rate that is potentially too
	// low.
	//
	// Whenever this is updated, call traceHeapAlloc() and
	// this gcControllerState's revise() method.
	heapLive atomic.Uint64

	// heapScan is the number of bytes of "scannable" heap. This is the
	// live heap (as counted by heapLive), but omitting no-scan objects and
	// no-scan tails of objects.
	//
	// This value is fixed at the start of a GC cycle. It represents the
	// maximum scannable heap.
	heapScan atomic.Uint64

	// lastHeapScan is the number of bytes of heap that were scanned
	// last GC cycle. It is the same as heapMarked, but only
	// includes the "scannable" parts of objects.
	//
	// Updated when the world is stopped.
	lastHeapScan uint64

	// lastStackScan is the number of bytes of stack that were scanned
	// last GC cycle.
	lastStackScan atomic.Uint64

	// maxStackScan is the amount of allocated goroutine stack space in
	// use by goroutines.
	//
	// This number tracks allocated goroutine stack space rather than used
	// goroutine stack space (i.e. what is actually scanned) because used
	// goroutine stack space is much harder to measure cheaply. By using
	// allocated space, we make an overestimate; this is OK, it's better
	// to conservatively overcount than undercount.
	maxStackScan atomic.Uint64

	// globalsScan is the total amount of global variable space
	// that is scannable.
	globalsScan atomic.Uint64

	// heapMarked is the number of bytes marked by the previous
	// GC. After mark termination, heapLive == heapMarked, but
	// unlike heapLive, heapMarked does not change until the
	// next mark termination.
	heapMarked uint64

	// heapScanWork is the total heap scan work performed this cycle.
	// stackScanWork is the total stack scan work performed this cycle.
	// globalsScanWork is the total globals scan work performed this cycle.
	//
	// These are updated atomically during the cycle. Updates occur in
	// bounded batches, since they are both written and read
	// throughout the cycle. At the end of the cycle, heapScanWork is how
	// much of the retained heap is scannable.
	//
	// Currently these are measured in bytes. For most uses, this is an
	// opaque unit of work, but for estimation the definition is important.
	//
	// Note that stackScanWork includes only stack space scanned, not all
	// of the allocated stack.
	heapScanWork    atomic.Int64
	stackScanWork   atomic.Int64
	globalsScanWork atomic.Int64

	// bgScanCredit is the scan work credit accumulated by the concurrent
	// background scan. This credit is accumulated by the background scan
	// and stolen by mutator assists.  Updates occur in bounded batches,
	// since it is both written and read throughout the cycle.
	bgScanCredit atomic.Int64

	// assistTime is the nanoseconds spent in mutator assists
	// during this cycle. This is updated atomically, and must also
	// be updated atomically even during a STW, because it is read
	// by sysmon. Updates occur in bounded batches, since it is both
	// written and read throughout the cycle.
	assistTime atomic.Int64

	// dedicatedMarkTime is the nanoseconds spent in dedicated mark workers
	// during this cycle. This is updated at the end of the concurrent mark
	// phase.
	dedicatedMarkTime atomic.Int64

	// fractionalMarkTime is the nanoseconds spent in the fractional mark
	// worker during this cycle. This is updated throughout the cycle and
	// will be up-to-date if the fractional mark worker is not currently
	// running.
	fractionalMarkTime atomic.Int64

	// idleMarkTime is the nanoseconds spent in idle marking during this
	// cycle. This is updated throughout the cycle.
	idleMarkTime atomic.Int64

	// markStartTime is the absolute start time in nanoseconds
	// that assists and background mark workers started.
	markStartTime int64

	// dedicatedMarkWorkersNeeded is the number of dedicated mark workers
	// that need to be started. This is computed at the beginning of each
	// cycle and decremented as dedicated mark workers get started.
	dedicatedMarkWorkersNeeded atomic.Int64

	// idleMarkWorkers is two packed int32 values in a single uint64.
	// These two values are always updated simultaneously.
	//
	// The bottom int32 is the current number of idle mark workers executing.
	//
	// The top int32 is the maximum number of idle mark workers allowed to
	// execute concurrently. Normally, this number is just gomaxprocs. However,
	// during periodic GC cycles it is set to 0 because the system is idle
	// anyway; there's no need to go full blast on all of GOMAXPROCS.
	//
	// The maximum number of idle mark workers is used to prevent new workers
	// from starting, but it is not a hard maximum. It is possible (but
	// exceedingly rare) for the current number of idle mark workers to
	// transiently exceed the maximum. This could happen if the maximum changes
	// just after a GC ends, and an M with no P.
	//
	// Note that if we have no dedicated mark workers, we set this value to
	// 1 in this case we only have fractional GC workers which aren't scheduled
	// strictly enough to ensure GC progress. As a result, idle-priority mark
	// workers are vital to GC progress in these situations.
	//
	// For example, consider a situation in which goroutines block on the GC
	// (such as via runtime.GOMAXPROCS) and only fractional mark workers are
	// scheduled (e.g. GOMAXPROCS=1). Without idle-priority mark workers, the
	// last running M might skip scheduling a fractional mark worker if its
	// utilization goal is met, such that once it goes to sleep (because there's
	// nothing to do), there will be nothing else to spin up a new M for the
	// fractional worker in the future, stalling GC progress and causing a
	// deadlock. However, idle-priority workers will *always* run when there is
	// nothing left to do, ensuring the GC makes progress.
	//
	// See github.com/golang/go/issues/44163 for more details.
	idleMarkWorkers atomic.Uint64

	// assistWorkPerByte is the ratio of scan work to allocated
	// bytes that should be performed by mutator assists. This is
	// computed at the beginning of each cycle and updated every
	// time heapScan is updated.
	assistWorkPerByte atomic.Float64

	// assistBytesPerWork is 1/assistWorkPerByte.
	//
	// Note that because this is read and written independently
	// from assistWorkPerByte users may notice a skew between
	// the two values, and such a state should be safe.
	assistBytesPerWork atomic.Float64

	// fractionalUtilizationGoal is the fraction of wall clock
	// time that should be spent in the fractional mark worker on
	// each P that isn't running a dedicated worker.
	//
	// For example, if the utilization goal is 25% and there are
	// no dedicated workers, this will be 0.25. If the goal is
	// 25%, there is one dedicated worker, and GOMAXPROCS is 5,
	// this will be 0.05 to make up the missing 5%.
	//
	// If this is zero, no fractional workers are needed.
	fractionalUtilizationGoal float64

	// These memory stats are effectively duplicates of fields from
	// memstats.heapStats but are updated atomically or with the world
	// stopped and don't provide the same consistency guarantees.
	//
	// Because the runtime is responsible for managing a memory limit, it's
	// useful to couple these stats more tightly to the gcController, which
	// is intimately connected to how that memory limit is maintained.
	heapInUse    sysMemStat    // bytes in mSpanInUse spans
	heapReleased sysMemStat    // bytes released to the OS
	heapFree     sysMemStat    // bytes not in any span, but not released to the OS
	totalAlloc   atomic.Uint64 // total bytes allocated
	totalFree    atomic.Uint64 // total bytes freed
	mappedReady  atomic.Uint64 // total virtual memory in the Ready state (see mem.go).

	// test indicates that this is a test-only copy of gcControllerState.
	test bool

	_ cpu.CacheLinePad
}

func (c *gcControllerState) init(gcPercent int32, memoryLimit int64) {
	c.heapMinimum = defaultHeapMinimum
	c.triggered = ^uint64(0)
	c.setGCPercent(gcPercent)
	c.setMemoryLimit(memoryLimit)
	c.commit(true) // No sweep phase in the first GC cycle.
	// N.B. Don't bother calling traceHeapGoal. Tracing is never enabled at
	// initialization time.
	// N.B. No need to call revise; there's no GC enabled during
	// initialization.
}

// startCycle resets the GC controller's state and computes estimates
// for a new GC cycle. The caller must hold worldsema and the world
// must be stopped.
func (c *gcControllerState) startCycle(markStartTime int64, procs int, trigger gcTrigger) {
	c.heapScanWork.Store(0)
	c.stackScanWork.Store(0)
	c.globalsScanWork.Store(0)
	c.bgScanCredit.Store(0)
	c.assistTime.Store(0)
	c.dedicatedMarkTime.Store(0)
	c.fractionalMarkTime.Store(0)
	c.idleMarkTime.Store(0)
	c.markStartTime = markStartTime
	c.triggered = c.heapLive.Load()

	// Compute the background mark utilization goal. In general,
	// this may not come out exactly. We round the number of
	// dedicated workers so that the utilization is closest to
	// 25%. For small GOMAXPROCS, this would introduce too much
	// error, so we add fractional workers in that case.
	totalUtilizationGoal := float64(procs) * gcBackgroundUtilization
	dedicatedMarkWorkersNeeded := int64(totalUtilizationGoal + 0.5)
	utilError := float64(dedicatedMarkWorkersNeeded)/totalUtilizationGoal - 1
	const maxUtilError = 0.3
	if utilError < -maxUtilError || utilError > maxUtilError {
		// Rounding put us more than 30% off our goal. With
		// gcBackgroundUtilization of 25%, this happens for
		// GOMAXPROCS<=3 or GOMAXPROCS=6. Enable fractional
		// workers to compensate.
		if float64(dedicatedMarkWorkersNeeded) > totalUtilizationGoal {
			// Too many dedicated workers.
			dedicatedMarkWorkersNeeded--
		}
		c.fractionalUtilizationGoal = (totalUtilizationGoal - float64(dedicatedMarkWorkersNeeded)) / float64(procs)
	} else {
		c.fractionalUtilizationGoal = 0
	}

	// In STW mode, we just want dedicated workers.
	if debug.gcstoptheworld > 0 {
		dedicatedMarkWorkersNeeded = int64(procs)
		c.fractionalUtilizationGoal = 0
	}

	// Clear per-P state
	for _, p := range allp {
		p.gcAssistTime = 0
		p.gcFractionalMarkTime = 0
	}

	if trigger.kind == gcTriggerTime {
		// During a periodic GC cycle, reduce the number of idle mark workers
		// required. However, we need at least one dedicated mark worker or
		// idle GC worker to ensure GC progress in some scenarios (see comment
		// on maxIdleMarkWorkers).
		if dedicatedMarkWorkersNeeded > 0 {
			c.setMaxIdleMarkWorkers(0)
		} else {
			// TODO(mknyszek): The fundamental reason why we need this is because
			// we can't count on the fractional mark worker to get scheduled.
			// Fix that by ensuring it gets scheduled according to its quota even
			// if the rest of the application is idle.
			c.setMaxIdleMarkWorkers(1)
		}
	} else {
		// N.B. gomaxprocs and dedicatedMarkWorkersNeeded are guaranteed not to
		// change during a GC cycle.
		c.setMaxIdleMarkWorkers(int32(procs) - int32(dedicatedMarkWorkersNeeded))
	}

	// Compute initial values for controls that are updated
	// throughout the cycle.
	c.dedicatedMarkWorkersNeeded.Store(dedicatedMarkWorkersNeeded)
	c.revise()

	if debug.gcpacertrace > 0 {
		heapGoal := c.heapGoal()
		assistRatio := c.assistWorkPerByte.Load()
		print("pacer: assist ratio=", assistRatio,
			" (scan ", gcController.heapScan.Load()>>20, " MB in ",
			work.initialHeapLive>>20, "->",
			heapGoal>>20, " MB)",
			" workers=", dedicatedMarkWorkersNeeded,
			"+", c.fractionalUtilizationGoal, "\n")
	}
}

// revise updates the assist ratio during the GC cycle to account for
// improved estimates. This should be called whenever gcController.heapScan,
// gcController.heapLive, or if any inputs to gcController.heapGoal are
// updated. It is safe to call concurrently, but it may race with other
// calls to revise.
//
// The result of this race is that the two assist ratio values may not line
// up or may be stale. In practice this is OK because the assist ratio
// moves slowly throughout a GC cycle, and the assist ratio is a best-effort
// heuristic anyway. Furthermore, no part of the heuristic depends on
// the two assist ratio values being exact reciprocals of one another, since
// the two values are used to convert values from different sources.
//
// The worst case result of this raciness is that we may miss a larger shift
// in the ratio (say, if we decide to pace more aggressively against the
// hard heap goal) but even this "hard goal" is best-effort (see #40460).
// The dedicated GC should ensure we don't exceed the hard goal by too much
// in the rare case we do exceed it.
//
// It should only be called when gcBlackenEnabled != 0 (because this
// is when assists are enabled and the necessary statistics are
// available).
func (c *gcControllerState) revise() {
	gcPercent := c.gcPercent.Load()
	if gcPercent < 0 {
		// If GC is disabled but we're running a forced GC,
		// act like GOGC is huge for the below calculations.
		gcPercent = 100000
	}
	live := c.heapLive.Load()
	scan := c.heapScan.Load()
	work := c.heapScanWork.Load() + c.stackScanWork.Load() + c.globalsScanWork.Load()

	// Assume we're under the soft goal. Pace GC to complete at
	// heapGoal assuming the heap is in steady-state.
	heapGoal := int64(c.heapGoal())

	// The expected scan work is computed as the amount of bytes scanned last
	// GC cycle (both heap and stack), plus our estimate of globals work for this cycle.
	scanWorkExpected := int64(c.lastHeapScan + c.lastStackScan.Load() + c.globalsScan.Load())

	// maxScanWork is a worst-case estimate of the amount of scan work that
	// needs to be performed in this GC cycle. Specifically, it represents
	// the case where *all* scannable memory turns out to be live, and
	// *all* allocated stack space is scannable.
	maxStackScan := c.maxStackScan.Load()
	maxScanWork := int64(scan + maxStackScan + c.globalsScan.Load())
	if work > scanWorkExpected {
		// We've already done more scan work than expected. Because our expectation
		// is based on a steady-state scannable heap size, we assume this means our
		// heap is growing. Compute a new heap goal that takes our existing runway
		// computed for scanWorkExpected and extrapolates it to maxScanWork, the worst-case
		// scan work. This keeps our assist ratio stable if the heap continues to grow.
		//
		// The effect of this mechanism is that assists stay flat in the face of heap
		// growths. It's OK to use more memory this cycle to scan all the live heap,
		// because the next GC cycle is inevitably going to use *at least* that much
		// memory anyway.
		extHeapGoal := int64(float64(heapGoal-int64(c.triggered))/float64(scanWorkExpected)*float64(maxScanWork)) + int64(c.triggered)
		scanWorkExpected = maxScanWork

		// hardGoal is a hard limit on the amount that we're willing to push back the
		// heap goal, and that's twice the heap goal (i.e. if GOGC=100 and the heap and/or
		// stacks and/or globals grow to twice their size, this limits the current GC cycle's
		// growth to 4x the original live heap's size).
		//
		// This maintains the invariant that we use no more memory than the next GC cycle
		// will anyway.
		hardGoal := int64((1.0 + float64(gcPercent)/100.0) * float64(heapGoal))
		if extHeapGoal > hardGoal {
			extHeapGoal = hardGoal
		}
		heapGoal = extHeapGoal
	}
	if int64(live) > heapGoal {
		// We're already past our heap goal, even the extrapolated one.
		// Leave ourselves some extra runway, so in the worst case we
		// finish by that point.
		const maxOvershoot = 1.1
		heapGoal = int64(float64(heapGoal) * maxOvershoot)

		// Compute the upper bound on the scan work remaining.
		scanWorkExpected = maxScanWork
	}

	// Compute the remaining scan work estimate.
	//
	// Note that we currently count allocations during GC as both
	// scannable heap (heapScan) and scan work completed
	// (scanWork), so allocation will change this difference
	// slowly in the soft regime and not at all in the hard
	// regime.
	scanWorkRemaining := scanWorkExpected - work
	if scanWorkRemaining < 1000 {
		// We set a somewhat arbitrary lower bound on
		// remaining scan work since if we aim a little high,
		// we can miss by a little.
		//
		// We *do* need to enforce that this is at least 1,
		// since marking is racy and double-scanning objects
		// may legitimately make the remaining scan work
		// negative, even in the hard goal regime.
		scanWorkRemaining = 1000
	}

	// Compute the heap distance remaining.
	heapRemaining := heapGoal - int64(live)
	if heapRemaining <= 0 {
		// This shouldn't happen, but if it does, avoid
		// dividing by zero or setting the assist negative.
		heapRemaining = 1
	}

	// Compute the mutator assist ratio so by the time the mutator
	// allocates the remaining heap bytes up to heapGoal, it will
	// have done (or stolen) the remaining amount of scan work.
	// Note that the assist ratio values are updated atomically
	// but not together. This means there may be some degree of
	// skew between the two values. This is generally OK as the
	// values shift relatively slowly over the course of a GC
	// cycle.
	assistWorkPerByte := float64(scanWorkRemaining) / float64(heapRemaining)
	assistBytesPerWork := float64(heapRemaining) / float64(scanWorkRemaining)
	c.assistWorkPerByte.Store(assistWorkPerByte)
	c.assistBytesPerWork.Store(assistBytesPerWork)
}

// endCycle computes the consMark estimate for the next cycle.
// userForced indicates whether the current GC cycle was forced
// by the application.
func (c *gcControllerState) endCycle(now int64, procs int, userForced bool) {
	// Record last heap goal for the scavenger.
	// We'll be updating the heap goal soon.
	gcController.lastHeapGoal = c.heapGoal()

	// Compute the duration of time for which assists were turned on.
	assistDuration := now - c.markStartTime

	// Assume background mark hit its utilization goal.
	utilization := gcBackgroundUtilization
	// Add assist utilization; avoid divide by zero.
	if assistDuration > 0 {
		utilization += float64(c.assistTime.Load()) / float64(assistDuration*int64(procs))
	}

	if c.heapLive.Load() <= c.triggered {
		// Shouldn't happen, but let's be very safe about this in case the
		// GC is somehow extremely short.
		//
		// In this case though, the only reasonable value for c.heapLive-c.triggered
		// would be 0, which isn't really all that useful, i.e. the GC was so short
		// that it didn't matter.
		//
		// Ignore this case and don't update anything.
		return
	}
	idleUtilization := 0.0
	if assistDuration > 0 {
		idleUtilization = float64(c.idleMarkTime.Load()) / float64(assistDuration*int64(procs))
	}
	// Determine the cons/mark ratio.
	//
	// The units we want for the numerator and denominator are both B / cpu-ns.
	// We get this by taking the bytes allocated or scanned, and divide by the amount of
	// CPU time it took for those operations. For allocations, that CPU time is
	//
	//    assistDuration * procs * (1 - utilization)
	//
	// Where utilization includes just background GC workers and assists. It does *not*
	// include idle GC work time, because in theory the mutator is free to take that at
	// any point.
	//
	// For scanning, that CPU time is
	//
	//    assistDuration * procs * (utilization + idleUtilization)
	//
	// In this case, we *include* idle utilization, because that is additional CPU time that
	// the GC had available to it.
	//
	// In effect, idle GC time is sort of double-counted here, but it's very weird compared
	// to other kinds of GC work, because of how fluid it is. Namely, because the mutator is
	// *always* free to take it.
	//
	// So this calculation is really:
	//     (heapLive-trigger) / (assistDuration * procs * (1-utilization)) /
	//         (scanWork) / (assistDuration * procs * (utilization+idleUtilization))
	//
	// Note that because we only care about the ratio, assistDuration and procs cancel out.
	scanWork := c.heapScanWork.Load() + c.stackScanWork.Load() + c.globalsScanWork.Load()
	currentConsMark := (float64(c.heapLive.Load()-c.triggered) * (utilization + idleUtilization)) /
		(float64(scanWork) * (1 - utilization))

	// Update our cons/mark estimate. This is the maximum of the value we just computed and the last
	// 4 cons/mark values we measured. The reason we take the maximum here is to bias a noisy
	// cons/mark measurement toward fewer assists at the expense of additional GC cycles (starting
	// earlier).
	oldConsMark := c.consMark
	c.consMark = currentConsMark
	for i := range c.lastConsMark {
		if c.lastConsMark[i] > c.consMark {
			c.consMark = c.lastConsMark[i]
		}
	}
	copy(c.lastConsMark[:], c.lastConsMark[1:])
	c.lastConsMark[len(c.lastConsMark)-1] = currentConsMark

	if debug.gcpacertrace > 0 {
		printlock()
		goal := gcGoalUtilization * 100
		print("pacer: ", int(utilization*100), "% CPU (", int(goal), " exp.) for ")
		print(c.heapScanWork.Load(), "+", c.stackScanWork.Load(), "+", c.globalsScanWork.Load(), " B work (", c.lastHeapScan+c.lastStackScan.Load()+c.globalsScan.Load(), " B exp.) ")
		live := c.heapLive.Load()
		print("in ", c.triggered, " B -> ", live, " B (∆goal ", int64(live)-int64(c.lastHeapGoal), ", cons/mark ", oldConsMark, ")")
		println()
		printunlock()
	}
}

// enlistWorker encourages another dedicated mark worker to start on
// another P if there are spare worker slots. It is used by putfull
// when more work is made available.
//
// If goexperiment.GreenTeaGC, the caller must not hold a G's scan bit,
// otherwise this could cause a deadlock. This is already enforced by
// the static lock ranking.
//
//go:nowritebarrier
func (c *gcControllerState) enlistWorker() {
	needDedicated := c.dedicatedMarkWorkersNeeded.Load() > 0

	// Create new workers from idle Ps with goexperiment.GreenTeaGC.
	//
	// Note: with Green Tea, this places a requirement on enlistWorker
	// that it must not be called while a G's scan bit is held.
	if goexperiment.GreenTeaGC {
		needIdle := c.needIdleMarkWorker()

		// If we're all full on dedicated and idle workers, nothing
		// to do.
		if !needDedicated && !needIdle {
			return
		}

		// If there are idle Ps, wake one so it will run a worker
		// (the scheduler will already prefer to spin up a new
		// dedicated worker over an idle one).
		if sched.npidle.Load() != 0 && sched.nmspinning.Load() == 0 {
			wakep()
			return
		}
	}

	// If we still need more dedicated workers, try to preempt a running P
	// so it will switch to a worker.
	if !needDedicated {
		return
	}

	// Pick a random other P to preempt.
	if gomaxprocs <= 1 {
		return
	}
	gp := getg()
	if gp == nil || gp.m == nil || gp.m.p == 0 {
		return
	}
	myID := gp.m.p.ptr().id
	for tries := 0; tries < 5; tries++ {
		id := int32(cheaprandn(uint32(gomaxprocs - 1)))
		if id >= myID {
			id++
		}
		p := allp[id]
		if p.status != _Prunning {
			continue
		}
		if preemptone(p) {
			return
		}
	}
}

// findRunnableGCWorker returns a background mark worker for pp if it
// should be run. This must only be called when gcBlackenEnabled != 0.
func (c *gcControllerState) findRunnableGCWorker(pp *p, now int64) (*g, int64) {
	if gcBlackenEnabled == 0 {
		throw("gcControllerState.findRunnable: blackening not enabled")
	}

	// Since we have the current time, check if the GC CPU limiter
	// hasn't had an update in a while. This check is necessary in
	// case the limiter is on but hasn't been checked in a while and
	// so may have left sufficient headroom to turn off again.
	if now == 0 {
		now = nanotime()
	}
	if gcCPULimiter.needUpdate(now) {
		gcCPULimiter.update(now)
	}

	if !gcMarkWorkAvailable(pp) {
		// No work to be done right now. This can happen at
		// the end of the mark phase when there are still
		// assists tapering off. Don't bother running a worker
		// now because it'll just return immediately.
		return nil, now
	}

	if c.dedicatedMarkWorkersNeeded.Load() <= 0 && c.fractionalUtilizationGoal == 0 {
		// No current need for dedicated workers, and no need at all for
		// fractional workers. Check before trying to acquire a worker; when
		// GOMAXPROCS is large, that can be expensive and is often unnecessary.
		//
		// When a dedicated worker stops running, the gcBgMarkWorker loop notes
		// the need for the worker before returning it to the pool. If we don't
		// see the need now, we wouldn't have found it in the pool anyway.
		return nil, now
	}

	// Grab a worker before we commit to running below.
	node := (*gcBgMarkWorkerNode)(gcBgMarkWorkerPool.pop())
	if node == nil {
		// There is at least one worker per P, so normally there are
		// enough workers to run on all Ps, if necessary. However, once
		// a worker enters gcMarkDone it may park without rejoining the
		// pool, thus freeing a P with no corresponding worker.
		// gcMarkDone never depends on another worker doing work, so it
		// is safe to simply do nothing here.
		//
		// If gcMarkDone bails out without completing the mark phase,
		// it will always do so with queued global work. Thus, that P
		// will be immediately eligible to re-run the worker G it was
		// just using, ensuring work can complete.
		return nil, now
	}

	decIfPositive := func(val *atomic.Int64) bool {
		for {
			v := val.Load()
			if v <= 0 {
				return false
			}

			if val.CompareAndSwap(v, v-1) {
				return true
			}
		}
	}

	if decIfPositive(&c.dedicatedMarkWorkersNeeded) {
		// This P is now dedicated to marking until the end of
		// the concurrent mark phase.
		pp.gcMarkWorkerMode = gcMarkWorkerDedicatedMode
	} else if c.fractionalUtilizationGoal == 0 {
		// No need for fractional workers.
		gcBgMarkWorkerPool.push(&node.node)
		return nil, now
	} else {
		// Is this P behind on the fractional utilization
		// goal?
		//
		// This should be kept in sync with pollFractionalWorkerExit.
		delta := now - c.markStartTime
		if delta > 0 && float64(pp.gcFractionalMarkTime)/float64(delta) > c.fractionalUtilizationGoal {
			// Nope. No need to run a fractional worker.
			gcBgMarkWorkerPool.push(&node.node)
			return nil, now
		}
		// Run a fractional worker.
		pp.gcMarkWorkerMode = gcMarkWorkerFractionalMode
	}

	// Run the background mark worker.
	gp := node.gp.ptr()
	trace := traceAcquire()
	casgstatus(gp, _Gwaiting, _Grunnable)
	if trace.ok() {
		trace.GoUnpark(gp, 0)
		traceRelease(trace)
	}
	return gp, now
}

// resetLive sets up the controller state for the next mark phase after the end
// of the previous one. Must be called after endCycle and before commit, before
// the world is started.
//
// The world must be stopped.
func (c *gcControllerState) resetLive(bytesMarked uint64) {
	c.heapMarked = bytesMarked
	c.heapLive.Store(bytesMarked)
	c.heapScan.Store(uint64(c.heapScanWork.Load()))
	c.lastHeapScan = uint64(c.heapScanWork.Load())
	c.lastStackScan.Store(uint64(c.stackScanWork.Load()))
	c.triggered = ^uint64(0) // Reset triggered.

	// heapLive was updated, so emit a trace event.
	trace := traceAcquire()
	if trace.ok() {
		trace.HeapAlloc(bytesMarked)
		traceRelease(trace)
	}
}

// markWorkerStop must be called whenever a mark worker stops executing.
//
// It updates mark work accounting in the controller by a duration of
// work in nanoseconds and other bookkeeping.
//
// Safe to execute at any time.
func (c *gcControllerState) markWorkerStop(mode gcMarkWorkerMode, duration int64) {
	switch mode {
	case gcMarkWorkerDedicatedMode:
		c.dedicatedMarkTime.Add(duration)
		c.dedicatedMarkWorkersNeeded.Add(1)
	case gcMarkWorkerFractionalMode:
		c.fractionalMarkTime.Add(duration)
	case gcMarkWorkerIdleMode:
		c.idleMarkTime.Add(duration)
		c.removeIdleMarkWorker()
	default:
		throw("markWorkerStop: unknown mark worker mode")
	}
}

func (c *gcControllerState) update(dHeapLive, dHeapScan int64) {
	if dHeapLive != 0 {
		trace := traceAcquire()
		live := gcController.heapLive.Add(dHeapLive)
		if trace.ok() {
			// gcController.heapLive changed.
			trace.HeapAlloc(live)
			traceRelease(trace)
		}
	}
	if gcBlackenEnabled == 0 {
		// Update heapScan when we're not in a current GC. It is fixed
		// at the beginning of a cycle.
		if dHeapScan != 0 {
			gcController.heapScan.Add(dHeapScan)
		}
	} else {
		// gcController.heapLive changed.
		c.revise()
	}
}

func (c *gcControllerState) addScannableStack(pp *p, amount int64) {
	if pp == nil {
		c.maxStackScan.Add(amount)
		return
	}
	pp.maxStackScanDelta += amount
	if pp.maxStackScanDelta >= maxStackScanSlack || pp.maxStackScanDelta <= -maxStackScanSlack {
		c.maxStackScan.Add(pp.maxStackScanDelta)
		pp.maxStackScanDelta = 0
	}
}

func (c *gcControllerState) addGlobals(amount int64) {
	c.globalsScan.Add(amount)
}

// heapGoal returns the current heap goal.
func (c *gcControllerState) heapGoal() uint64 {
	goal, _ := c.heapGoalInternal()
	return goal
}

// heapGoalInternal is the implementation of heapGoal which returns additional
// information that is necessary for computing the trigger.
//
// The returned minTrigger is always <= goal.
func (c *gcControllerState) heapGoalInternal() (goal, minTrigger uint64) {
	// Start with the goal calculated for gcPercent.
	goal = c.gcPercentHeapGoal.Load()

	// Check if the memory-limit-based goal is smaller, and if so, pick that.
	if newGoal := c.memoryLimitHeapGoal(); newGoal < goal {
		goal = newGoal
	} else {
		// We're not limited by the memory limit goal, so perform a series of
		// adjustments that might move the goal forward in a variety of circumstances.

		sweepDistTrigger := c.sweepDistMinTrigger.Load()
		if sweepDistTrigger > goal {
			// Set the goal to maintain a minimum sweep distance since
			// the last call to commit. Note that we never want to do this
			// if we're in the memory limit regime, because it could push
			// the goal up.
			goal = sweepDistTrigger
		}
		// Since we ignore the sweep distance trigger in the memory
		// limit regime, we need to ensure we don't propagate it to
		// the trigger, because it could cause a violation of the
		// invariant that the trigger < goal.
		minTrigger = sweepDistTrigger

		// Ensure that the heap goal is at least a little larger than
		// the point at which we triggered. This may not be the case if GC
		// start is delayed or if the allocation that pushed gcController.heapLive
		// over trigger is large or if the trigger is really close to
		// GOGC. Assist is proportional to this distance, so enforce a
		// minimum distance, even if it means going over the GOGC goal
		// by a tiny bit.
		//
		// Ignore this if we're in the memory limit regime: we'd prefer to
		// have the GC respond hard about how close we are to the goal than to
		// push the goal back in such a manner that it could cause us to exceed
		// the memory limit.
		const minRunway = 64 << 10
		if c.triggered != ^uint64(0) && goal < c.triggered+minRunway {
			goal = c.triggered + minRunway
		}
	}
	return
}

// memoryLimitHeapGoal returns a heap goal derived from memoryLimit.
func (c *gcControllerState) memoryLimitHeapGoal() uint64 {
	// Start by pulling out some values we'll need. Be careful about overflow.
	var heapFree, heapAlloc, mappedReady uint64
	for {
		heapFree = c.heapFree.load()                         // Free and unscavenged memory.
		heapAlloc = c.totalAlloc.Load() - c.totalFree.Load() // Heap object bytes in use.
		mappedReady = c.mappedReady.Load()                   // Total unreleased mapped memory.
		if heapFree+heapAlloc <= mappedReady {
			break
		}
		// It is impossible for total unreleased mapped memory to exceed heap memory, but
		// because these stats are updated independently, we may observe a partial update
		// including only some values. Thus, we appear to break the invariant. However,
		// this condition is necessarily transient, so just try again. In the case of a
		// persistent accounting error, we'll deadlock here.
	}

	// Below we compute a goal from memoryLimit. There are a few things to be aware of.
	// Firstly, the memoryLimit does not easily compare to the heap goal: the former
	// is total mapped memory by the runtime that hasn't been released, while the latter is
	// only heap object memory. Intuitively, the way we convert from one to the other is to
	// subtract everything from memoryLimit that both contributes to the memory limit (so,
	// ignore scavenged memory) and doesn't contain heap objects. This isn't quite what
	// lines up with reality, but it's a good starting point.
	//
	// In practice this computation looks like the following:
	//
	//    goal := memoryLimit - ((mappedReady - heapFree - heapAlloc) + max(mappedReady - memoryLimit, 0))
	//                    ^1                                    ^2
	//    goal -= goal / 100 * memoryLimitHeapGoalHeadroomPercent
	//    ^3
	//
	// Let's break this down.
	//
	// The first term (marker 1) is everything that contributes to the memory limit and isn't
	// or couldn't become heap objects. It represents, broadly speaking, non-heap overheads.
	// One oddity you may have noticed is that we also subtract out heapFree, i.e. unscavenged
	// memory that may contain heap objects in the future.
	//
	// Let's take a step back. In an ideal world, this term would look something like just
	// the heap goal. That is, we "reserve" enough space for the heap to grow to the heap
	// goal, and subtract out everything else. This is of course impossible; the definition
	// is circular! However, this impossible definition contains a key insight: the amount
	// we're *going* to use matters just as much as whatever we're currently using.
	//
	// Consider if the heap shrinks to 1/10th its size, leaving behind lots of free and
	// unscavenged memory. mappedReady - heapAlloc will be quite large, because of that free
	// and unscavenged memory, pushing the goal down significantly.
	//
	// heapFree is also safe to exclude from the memory limit because in the steady-state, it's
	// just a pool of memory for future heap allocations, and making new allocations from heapFree
	// memory doesn't increase overall memory use. In transient states, the scavenger and the
	// allocator actively manage the pool of heapFree memory to maintain the memory limit.
	//
	// The second term (marker 2) is the amount of memory we've exceeded the limit by, and is
	// intended to help recover from such a situation. By pushing the heap goal down, we also
	// push the trigger down, triggering and finishing a GC sooner in order to make room for
	// other memory sources. Note that since we're effectively reducing the heap goal by X bytes,
	// we're actually giving more than X bytes of headroom back, because the heap goal is in
	// terms of heap objects, but it takes more than X bytes (e.g. due to fragmentation) to store
	// X bytes worth of objects.
	//
	// The final adjustment (marker 3) reduces the maximum possible memory limit heap goal by
	// memoryLimitHeapGoalPercent. As the name implies, this is to provide additional headroom in
	// the face of pacing inaccuracies, and also to leave a buffer of unscavenged memory so the
	// allocator isn't constantly scavenging. The reduction amount also has a fixed minimum
	// (memoryLimitMinHeapGoalHeadroom, not pictured) because the aforementioned pacing inaccuracies
	// disproportionately affect small heaps: as heaps get smaller, the pacer's inputs get fuzzier.
	// Shorter GC cycles and less GC work means noisy external factors like the OS scheduler have a
	// greater impact.

	memoryLimit := uint64(c.memoryLimit.Load())

	// Compute term 1.
	nonHeapMemory := mappedReady - heapFree - heapAlloc

	// Compute term 2.
	var overage uint64
	if mappedReady > memoryLimit {
		overage = mappedReady - memoryLimit
	}

	if nonHeapMemory+overage >= memoryLimit {
		// We're at a point where non-heap memory exceeds the memory limit on its own.
		// There's honestly not much we can do here but just trigger GCs continuously
		// and let the CPU limiter reign that in. Something has to give at this point.
		// Set it to heapMarked, the lowest possible goal.
		return c.heapMarked
	}

	// Compute the goal.
	goal := memoryLimit - (nonHeapMemory + overage)

	// Apply some headroom to the goal to account for pacing inaccuracies and to reduce
	// the impact of scavenging at allocation time in response to a high allocation rate
	// when GOGC=off. See issue #57069. Also, be careful about small limits.
	headroom := goal / 100 * memoryLimitHeapGoalHeadroomPercent
	if headroom < memoryLimitMinHeapGoalHeadroom {
		// Set a fixed minimum to deal with the particularly large effect pacing inaccuracies
		// have for smaller heaps.
		headroom = memoryLimitMinHeapGoalHeadroom
	}
	if goal < headroom || goal-headroom < headroom {
		goal = headroom
	} else {
		goal = goal - headroom
	}
	// Don't let us go below the live heap. A heap goal below the live heap doesn't make sense.
	if goal < c.heapMarked {
		goal = c.heapMarked
	}
	return goal
}

const (
	// These constants determine the bounds on the GC trigger as a fraction
	// of heap bytes allocated between the start of a GC (heapLive == heapMarked)
	// and the end of a GC (heapLive == heapGoal).
	//
	// The constants are obscured in this way for efficiency. The denominator
	// of the fraction is always a power-of-two for a quick division, so that
	// the numerator is a single constant integer multiplication.
	triggerRatioDen = 64

	// The minimum trigger constant was chosen empirically: given a sufficiently
	// fast/scalable allocator with 48 Ps that could drive the trigger ratio
	// to <0.05, this constant causes applications to retain the same peak
	// RSS compared to not having this allocator.
	minTriggerRatioNum = 45 // ~0.7

	// The maximum trigger constant is chosen somewhat arbitrarily, but the
	// current constant has served us well over the years.
	maxTriggerRatioNum = 61 // ~0.95
)

// trigger returns the current point at which a GC should trigger along with
// the heap goal.
//
// The returned value may be compared against heapLive to determine whether
// the GC should trigger. Thus, the GC trigger condition should be (but may
// not be, in the case of small movements for efficiency) checked whenever
// the heap goal may change.
func (c *gcControllerState) trigger() (uint64, uint64) {
	goal, minTrigger := c.heapGoalInternal()

	// Invariant: the trigger must always be less than the heap goal.
	//
	// Note that the memory limit sets a hard maximum on our heap goal,
	// but the live heap may grow beyond it.

	if c.heapMarked >= goal {
		// The goal should never be smaller than heapMarked, but let's be
		// defensive about it. The only reasonable trigger here is one that
		// causes a continuous GC cycle at heapMarked, but respect the goal
		// if it came out as smaller than that.
		return goal, goal
	}

	// Below this point, c.heapMarked < goal.

	// heapMarked is our absolute minimum, and it's possible the trigger
	// bound we get from heapGoalinternal is less than that.
	if minTrigger < c.heapMarked {
		minTrigger = c.heapMarked
	}

	// If we let the trigger go too low, then if the application
	// is allocating very rapidly we might end up in a situation
	// where we're allocating black during a nearly always-on GC.
	// The result of this is a growing heap and ultimately an
	// increase in RSS. By capping us at a point >0, we're essentially
	// saying that we're OK using more CPU during the GC to prevent
	// this growth in RSS.
	triggerLowerBound := ((goal-c.heapMarked)/triggerRatioDen)*minTriggerRatioNum + c.heapMarked
	if minTrigger < triggerLowerBound {
		minTrigger = triggerLowerBound
	}

	// For small heaps, set the max trigger point at maxTriggerRatio of the way
	// from the live heap to the heap goal. This ensures we always have *some*
	// headroom when the GC actually starts. For larger heaps, set the max trigger
	// point at the goal, minus the minimum heap size.
	//
	// This choice follows from the fact that the minimum heap size is chosen
	// to reflect the costs of a GC with no work to do. With a large heap but
	// very little scan work to perform, this gives us exactly as much runway
	// as we would need, in the worst case.
	maxTrigger := ((goal-c.heapMarked)/triggerRatioDen)*maxTriggerRatioNum + c.heapMarked
	if goal > defaultHeapMinimum && goal-defaultHeapMinimum > maxTrigger {
		maxTrigger = goal - defaultHeapMinimum
	}
	maxTrigger = max(maxTrigger, minTrigger)

	// Compute the trigger from our bounds and the runway stored by commit.
	var trigger uint64
	runway := c.runway.Load()
	if runway > goal {
		trigger = minTrigger
	} else {
		trigger = goal - runway
	}
	trigger = max(trigger, minTrigger)
	trigger = min(trigger, maxTrigger)
	if trigger > goal {
		print("trigger=", trigger, " heapGoal=", goal, "\n")
		print("minTrigger=", minTrigger, " maxTrigger=", maxTrigger, "\n")
		throw("produced a trigger greater than the heap goal")
	}
	return trigger, goal
}

// commit recomputes all pacing parameters needed to derive the
// trigger and the heap goal. Namely, the gcPercent-based heap goal,
// and the amount of runway we want to give the GC this cycle.
//
// This can be called any time. If GC is the in the middle of a
// concurrent phase, it will adjust the pacing of that phase.
//
// isSweepDone should be the result of calling isSweepDone(),
// unless we're testing or we know we're executing during a GC cycle.
//
// This depends on gcPercent, gcController.heapMarked, and
// gcController.heapLive. These must be up to date.
//
// Callers must call gcControllerState.revise after calling this
// function if the GC is enabled.
//
// mheap_.lock must be held or the world must be stopped.
func (c *gcControllerState) commit(isSweepDone bool) {
	if !c.test {
		assertWorldStoppedOrLockHeld(&mheap_.lock)
	}

	if isSweepDone {
		// The sweep is done, so there aren't any restrictions on the trigger
		// we need to think about.
		c.sweepDistMinTrigger.Store(0)
	} else {
		// Concurrent sweep happens in the heap growth
		// from gcController.heapLive to trigger. Make sure we
		// give the sweeper some runway if it doesn't have enough.
		c.sweepDistMinTrigger.Store(c.heapLive.Load() + sweepMinHeapDistance)
	}

	// Compute the next GC goal, which is when the allocated heap
	// has grown by GOGC/100 over where it started the last cycle,
	// plus additional runway for non-heap sources of GC work.
	gcPercentHeapGoal := ^uint64(0)
	if gcPercent := c.gcPercent.Load(); gcPercent >= 0 {
		gcPercentHeapGoal = c.heapMarked + (c.heapMarked+c.lastStackScan.Load()+c.globalsScan.Load())*uint64(gcPercent)/100
	}
	// Apply the minimum heap size here. It's defined in terms of gcPercent
	// and is only updated by functions that call commit.
	if gcPercentHeapGoal < c.heapMinimum {
		gcPercentHeapGoal = c.heapMinimum
	}
	c.gcPercentHeapGoal.Store(gcPercentHeapGoal)

	// Compute the amount of runway we want the GC to have by using our
	// estimate of the cons/mark ratio.
	//
	// The idea is to take our expected scan work, and multiply it by
	// the cons/mark ratio to determine how long it'll take to complete
	// that scan work in terms of bytes allocated. This gives us our GC's
	// runway.
	//
	// However, the cons/mark ratio is a ratio of rates per CPU-second, but
	// here we care about the relative rates for some division of CPU
	// resources among the mutator and the GC.
	//
	// To summarize, we have B / cpu-ns, and we want B / ns. We get that
	// by multiplying by our desired division of CPU resources. We choose
	// to express CPU resources as GOMAPROCS*fraction. Note that because
	// we're working with a ratio here, we can omit the number of CPU cores,
	// because they'll appear in the numerator and denominator and cancel out.
	// As a result, this is basically just "weighing" the cons/mark ratio by
	// our desired division of resources.
	//
	// Furthermore, by setting the runway so that CPU resources are divided
	// this way, assuming that the cons/mark ratio is correct, we make that
	// division a reality.
	c.runway.Store(uint64((c.consMark * (1 - gcGoalUtilization) / (gcGoalUtilization)) * float64(c.lastHeapScan+c.lastStackScan.Load()+c.globalsScan.Load())))
}

// setGCPercent updates gcPercent. commit must be called after.
// Returns the old value of gcPercent.
//
// The world must be stopped, or mheap_.lock must be held.
func (c *gcControllerState) setGCPercent(in int32) int32 {
	if !c.test {
		assertWorldStoppedOrLockHeld(&mheap_.lock)
	}

	out := c.gcPercent.Load()
	if in < 0 {
		in = -1
	}
	c.heapMinimum = defaultHeapMinimum * uint64(in) / 100
	c.gcPercent.Store(in)

	return out
}

//go:linkname setGCPercent runtime/debug.setGCPercent
func setGCPercent(in int32) (out int32) {
	// Run on the system stack since we grab the heap lock.
	systemstack(func() {
		lock(&mheap_.lock)
		out = gcController.setGCPercent(in)
		gcControllerCommit()
		unlock(&mheap_.lock)
	})

	// If we just disabled GC, wait for any concurrent GC mark to
	// finish so we always return with no GC running.
	if in < 0 {
		gcWaitOnMark(work.cycles.Load())
	}

	return out
}

func readGOGC() int32 {
	p := gogetenv("GOGC")
	if p == "off" {
		return -1
	}
	if n, ok := strconv.Atoi32(p); ok {
		return n
	}
	return 100
}

// setMemoryLimit updates memoryLimit. commit must be called after
// Returns the old value of memoryLimit.
//
// The world must be stopped, or mheap_.lock must be held.
func (c *gcControllerState) setMemoryLimit(in int64) int64 {
	if !c.test {
		assertWorldStoppedOrLockHeld(&mheap_.lock)
	}

	out := c.memoryLimit.Load()
	if in >= 0 {
		c.memoryLimit.Store(in)
	}

	return out
}

//go:linkname setMemoryLimit runtime/debug.setMemoryLimit
func setMemoryLimit(in int64) (out int64) {
	// Run on the system stack since we grab the heap lock.
	systemstack(func() {
		lock(&mheap_.lock)
		out = gcController.setMemoryLimit(in)
		if in < 0 || out == in {
			// If we're just checking the value or not changing
			// it, there's no point in doing the rest.
			unlock(&mheap_.lock)
			return
		}
		gcControllerCommit()
		unlock(&mheap_.lock)
	})
	return out
}

func readGOMEMLIMIT() int64 {
	p := gogetenv("GOMEMLIMIT")
	if p == "" || p == "off" {
		return math.MaxInt64
	}
	n, ok := parseByteCount(p)
	if !ok {
		print("GOMEMLIMIT=", p, "\n")
		throw("malformed GOMEMLIMIT; see `go doc runtime/debug.SetMemoryLimit`")
	}
	return n
}

// addIdleMarkWorker attempts to add a new idle mark worker.
//
// If this returns true, the caller must become an idle mark worker unless
// there's no background mark worker goroutines in the pool. This case is
// harmless because there are already background mark workers running.
// If this returns false, the caller must NOT become an idle mark worker.
//
// nosplit because it may be called without a P.
//
//go:nosplit
func (c *gcControllerState) addIdleMarkWorker() bool {
	for {
		old := c.idleMarkWorkers.Load()
		n, max := int32(old&uint64(^uint32(0))), int32(old>>32)
		if n >= max {
			// See the comment on idleMarkWorkers for why
			// n > max is tolerated.
			return false
		}
		if n < 0 {
			print("n=", n, " max=", max, "\n")
			throw("negative idle mark workers")
		}
		new := uint64(uint32(n+1)) | (uint64(max) << 32)
		if c.idleMarkWorkers.CompareAndSwap(old, new) {
			return true
		}
	}
}

// needIdleMarkWorker is a hint as to whether another idle mark worker is needed.
//
// The caller must still call addIdleMarkWorker to become one. This is mainly
// useful for a quick check before an expensive operation.
//
// nosplit because it may be called without a P.
//
//go:nosplit
func (c *gcControllerState) needIdleMarkWorker() bool {
	p := c.idleMarkWorkers.Load()
	n, max := int32(p&uint64(^uint32(0))), int32(p>>32)
	return n < max
}

// removeIdleMarkWorker must be called when a new idle mark worker stops executing.
func (c *gcControllerState) removeIdleMarkWorker() {
	for {
		old := c.idleMarkWorkers.Load()
		n, max := int32(old&uint64(^uint32(0))), int32(old>>32)
		if n-1 < 0 {
			print("n=", n, " max=", max, "\n")
			throw("negative idle mark workers")
		}
		new := uint64(uint32(n-1)) | (uint64(max) << 32)
		if c.idleMarkWorkers.CompareAndSwap(old, new) {
			return
		}
	}
}

// setMaxIdleMarkWorkers sets the maximum number of idle mark workers allowed.
//
// This method is optimistic in that it does not wait for the number of
// idle mark workers to reduce to max before returning; it assumes the workers
// will deschedule themselves.
func (c *gcControllerState) setMaxIdleMarkWorkers(max int32) {
	for {
		old := c.idleMarkWorkers.Load()
		n := int32(old & uint64(^uint32(0)))
		if n < 0 {
			print("n=", n, " max=", max, "\n")
			throw("negative idle mark workers")
		}
		new := uint64(uint32(n)) | (uint64(max) << 32)
		if c.idleMarkWorkers.CompareAndSwap(old, new) {
			return
		}
	}
}

// gcControllerCommit is gcController.commit, but passes arguments from live
// (non-test) data. It also updates any consumers of the GC pacing, such as
// sweep pacing and the background scavenger.
//
// Calls gcController.commit.
//
// The heap lock must be held, so this must be executed on the system stack.
//
//go:systemstack
func gcControllerCommit() {
	assertWorldStoppedOrLockHeld(&mheap_.lock)

	gcController.commit(isSweepDone())

	// Update mark pacing.
	if gcphase != _GCoff {
		gcController.revise()
	}

	// TODO(mknyszek): This isn't really accurate any longer because the heap
	// goal is computed dynamically. Still useful to snapshot, but not as useful.
	trace := traceAcquire()
	if trace.ok() {
		trace.HeapGoal()
		traceRelease(trace)
	}

	trigger, heapGoal := gcController.trigger()
	gcPaceSweeper(trigger)
	gcPaceScavenger(gcController.memoryLimit.Load(), heapGoal, gcController.lastHeapGoal)
}

Current_dir [ NOT WRITEABLE ] Document_root [ WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
16 Dec 2025 9.30 PM
root / root
0755
asan
--
16 Dec 2025 9.30 PM
root / root
0755
cgo
--
16 Dec 2025 9.30 PM
root / root
0755
coverage
--
16 Dec 2025 9.30 PM
root / root
0755
debug
--
16 Dec 2025 9.30 PM
root / root
0755
metrics
--
16 Dec 2025 9.30 PM
root / root
0755
msan
--
16 Dec 2025 9.30 PM
root / root
0755
pprof
--
16 Dec 2025 9.30 PM
root / root
0755
race
--
16 Dec 2025 9.34 PM
root / root
0755
trace
--
16 Dec 2025 9.30 PM
root / root
0755
HACKING.md
16.996 KB
4 Dec 2025 6.06 PM
root / root
0644
Makefile
0.174 KB
4 Dec 2025 6.06 PM
root / root
0644
alg.go
11.129 KB
4 Dec 2025 6.06 PM
root / root
0644
arena.go
38.046 KB
4 Dec 2025 6.06 PM
root / root
0644
asan.go
1.998 KB
4 Dec 2025 6.06 PM
root / root
0644
asan0.go
0.989 KB
4 Dec 2025 6.06 PM
root / root
0644
asan_amd64.s
3.342 KB
4 Dec 2025 6.06 PM
root / root
0644
asan_arm64.s
3.04 KB
4 Dec 2025 6.06 PM
root / root
0644
asan_loong64.s
3.013 KB
4 Dec 2025 6.06 PM
root / root
0644
asan_ppc64le.s
3.625 KB
4 Dec 2025 6.06 PM
root / root
0644
asan_riscv64.s
2.789 KB
4 Dec 2025 6.06 PM
root / root
0644
asm.s
0.377 KB
4 Dec 2025 6.06 PM
root / root
0644
asm_386.s
42.975 KB
4 Dec 2025 6.06 PM
root / root
0644
asm_amd64.h
0.616 KB
4 Dec 2025 6.06 PM
root / root
0644
asm_amd64.s
60.331 KB
4 Dec 2025 6.06 PM
root / root
0644
asm_arm.s
31.931 KB
4 Dec 2025 6.06 PM
root / root
0644
asm_arm64.s
44.624 KB
4 Dec 2025 6.06 PM
root / root
0644
asm_loong64.s
34.597 KB
4 Dec 2025 6.06 PM
root / root
0644
asm_mips64x.s
24.202 KB
4 Dec 2025 6.06 PM
root / root
0644
asm_mipsx.s
26.186 KB
4 Dec 2025 6.06 PM
root / root
0644
asm_ppc64x.h
1.933 KB
4 Dec 2025 6.06 PM
root / root
0644
asm_ppc64x.s
45.254 KB
4 Dec 2025 6.06 PM
root / root
0644
asm_riscv64.h
0.522 KB
4 Dec 2025 6.06 PM
root / root
0644
asm_riscv64.s
27.11 KB
4 Dec 2025 6.06 PM
root / root
0644
asm_s390x.s
27.919 KB
4 Dec 2025 6.06 PM
root / root
0644
asm_wasm.s
13.101 KB
4 Dec 2025 6.06 PM
root / root
0644
atomic_arm64.s
0.253 KB
4 Dec 2025 6.06 PM
root / root
0644
atomic_loong64.s
0.267 KB
4 Dec 2025 6.06 PM
root / root
0644
atomic_mips64x.s
0.293 KB
4 Dec 2025 6.06 PM
root / root
0644
atomic_mipsx.s
0.256 KB
4 Dec 2025 6.06 PM
root / root
0644
atomic_pointer.go
3.979 KB
4 Dec 2025 6.06 PM
root / root
0644
atomic_ppc64x.s
0.427 KB
4 Dec 2025 6.06 PM
root / root
0644
atomic_riscv64.s
0.269 KB
4 Dec 2025 6.06 PM
root / root
0644
auxv_none.go
0.291 KB
4 Dec 2025 6.06 PM
root / root
0644
badlinkname.go
0.646 KB
4 Dec 2025 6.06 PM
root / root
0644
badlinkname_linux.go
0.494 KB
4 Dec 2025 6.06 PM
root / root
0644
cgo.go
3.613 KB
4 Dec 2025 6.06 PM
root / root
0644
cgo_mmap.go
2.423 KB
4 Dec 2025 6.06 PM
root / root
0644
cgo_ppc64x.go
0.408 KB
4 Dec 2025 6.06 PM
root / root
0644
cgo_sigaction.go
3.273 KB
4 Dec 2025 6.06 PM
root / root
0644
cgocall.go
25.173 KB
4 Dec 2025 6.06 PM
root / root
0644
cgocallback.go
0.31 KB
4 Dec 2025 6.06 PM
root / root
0644
cgocheck.go
5.46 KB
4 Dec 2025 6.06 PM
root / root
0644
cgroup_linux.go
3.582 KB
4 Dec 2025 6.06 PM
root / root
0644
cgroup_stubs.go
0.591 KB
4 Dec 2025 6.06 PM
root / root
0644
chan.go
26.842 KB
4 Dec 2025 6.06 PM
root / root
0644
checkptr.go
3.574 KB
4 Dec 2025 6.06 PM
root / root
0644
compiler.go
0.4 KB
4 Dec 2025 6.06 PM
root / root
0644
complex.go
1.591 KB
4 Dec 2025 6.06 PM
root / root
0644
coro.go
8.315 KB
4 Dec 2025 6.06 PM
root / root
0644
covercounter.go
0.723 KB
4 Dec 2025 6.06 PM
root / root
0644
covermeta.go
0.589 KB
4 Dec 2025 6.06 PM
root / root
0644
cpuflags.go
0.999 KB
4 Dec 2025 6.06 PM
root / root
0644
cpuflags_amd64.go
1.092 KB
4 Dec 2025 6.06 PM
root / root
0644
cpuflags_arm64.go
0.305 KB
4 Dec 2025 6.06 PM
root / root
0644
cpuprof.go
8.523 KB
4 Dec 2025 6.06 PM
root / root
0644
cputicks.go
0.427 KB
4 Dec 2025 6.06 PM
root / root
0644
create_file_nounix.go
0.298 KB
4 Dec 2025 6.06 PM
root / root
0644
create_file_unix.go
0.359 KB
4 Dec 2025 6.06 PM
root / root
0644
debug.go
8.235 KB
4 Dec 2025 6.06 PM
root / root
0644
debugcall.go
7.132 KB
4 Dec 2025 6.06 PM
root / root
0644
debuglog.go
20.045 KB
4 Dec 2025 6.06 PM
root / root
0644
debuglog_off.go
0.432 KB
4 Dec 2025 6.06 PM
root / root
0644
debuglog_on.go
1.441 KB
4 Dec 2025 6.06 PM
root / root
0644
defs1_linux.go
0.825 KB
4 Dec 2025 6.06 PM
root / root
0644
defs1_netbsd_386.go
2.999 KB
4 Dec 2025 6.06 PM
root / root
0644
defs1_netbsd_amd64.go
3.229 KB
4 Dec 2025 6.06 PM
root / root
0644
defs1_netbsd_arm.go
3.116 KB
4 Dec 2025 6.06 PM
root / root
0644
defs1_netbsd_arm64.go
3.341 KB
4 Dec 2025 6.06 PM
root / root
0644
defs1_solaris_amd64.go
4.014 KB
4 Dec 2025 6.06 PM
root / root
0644
defs2_linux.go
3.218 KB
4 Dec 2025 6.06 PM
root / root
0644
defs3_linux.go
1.092 KB
4 Dec 2025 6.06 PM
root / root
0644
defs_aix.go
4.175 KB
4 Dec 2025 6.06 PM
root / root
0644
defs_aix_ppc64.go
3.625 KB
4 Dec 2025 6.06 PM
root / root
0644
defs_arm_linux.go
2.67 KB
4 Dec 2025 6.06 PM
root / root
0644
defs_darwin.go
4.297 KB
4 Dec 2025 6.06 PM
root / root
0644
defs_darwin_amd64.go
6.434 KB
4 Dec 2025 6.06 PM
root / root
0644
defs_darwin_arm64.go
4.257 KB
4 Dec 2025 6.06 PM
root / root
0644
defs_dragonfly.go
2.851 KB
4 Dec 2025 6.06 PM
root / root
0644
defs_dragonfly_amd64.go
3.499 KB
4 Dec 2025 6.06 PM
root / root
0644
defs_freebsd.go
4.075 KB
4 Dec 2025 6.06 PM
root / root
0644
defs_freebsd_386.go
4.614 KB
4 Dec 2025 6.06 PM
root / root
0644
defs_freebsd_amd64.go
4.883 KB
4 Dec 2025 6.06 PM
root / root
0644
defs_freebsd_arm.go
4.005 KB
4 Dec 2025 6.06 PM
root / root
0644
defs_freebsd_arm64.go
4.269 KB
4 Dec 2025 6.06 PM
root / root
0644
defs_freebsd_riscv64.go
4.279 KB
4 Dec 2025 6.06 PM
root / root
0644
defs_illumos_amd64.go
0.278 KB
4 Dec 2025 6.06 PM
root / root
0644
defs_linux.go
2.922 KB
4 Dec 2025 6.06 PM
root / root
0644
defs_linux_386.go
4.195 KB
4 Dec 2025 6.06 PM
root / root
0644
defs_linux_amd64.go
4.703 KB
4 Dec 2025 6.06 PM
root / root
0644
defs_linux_arm.go
3.888 KB
4 Dec 2025 6.06 PM
root / root
0644
defs_linux_arm64.go
3.62 KB
4 Dec 2025 6.06 PM
root / root
0644
defs_linux_loong64.go
3.451 KB
4 Dec 2025 6.06 PM
root / root
0644
defs_linux_mips64x.go
3.601 KB
4 Dec 2025 6.06 PM
root / root
0644
defs_linux_mipsx.go
3.602 KB
4 Dec 2025 6.06 PM
root / root
0644
defs_linux_ppc64.go
3.688 KB
4 Dec 2025 6.06 PM
root / root
0644
defs_linux_ppc64le.go
3.688 KB
4 Dec 2025 6.06 PM
root / root
0644
defs_linux_riscv64.go
3.814 KB
4 Dec 2025 6.06 PM
root / root
0644
defs_linux_s390x.go
3.162 KB
4 Dec 2025 6.06 PM
root / root
0644
defs_netbsd.go
2.947 KB
4 Dec 2025 6.06 PM
root / root
0644
defs_netbsd_386.go
0.835 KB
4 Dec 2025 6.06 PM
root / root
0644
defs_netbsd_amd64.go
1.012 KB
4 Dec 2025 6.06 PM
root / root
0644
defs_netbsd_arm.go
0.746 KB
4 Dec 2025 6.06 PM
root / root
0644
defs_openbsd.go
3.058 KB
4 Dec 2025 6.06 PM
root / root
0644
defs_openbsd_386.go
2.911 KB
4 Dec 2025 6.06 PM
root / root
0644
defs_openbsd_amd64.go
3.111 KB
4 Dec 2025 6.06 PM
root / root
0644
defs_openbsd_arm.go
3.026 KB
4 Dec 2025 6.06 PM
root / root
0644
defs_openbsd_arm64.go
2.778 KB
4 Dec 2025 6.06 PM
root / root
0644
defs_openbsd_mips64.go
2.755 KB
4 Dec 2025 6.06 PM
root / root
0644
defs_openbsd_ppc64.go
3.001 KB
4 Dec 2025 6.06 PM
root / root
0644
defs_openbsd_riscv64.go
2.891 KB
4 Dec 2025 6.06 PM
root / root
0644
defs_plan9_386.go
1.627 KB
4 Dec 2025 6.06 PM
root / root
0644
defs_plan9_amd64.go
1.816 KB
4 Dec 2025 6.06 PM
root / root
0644
defs_plan9_arm.go
1.73 KB
4 Dec 2025 6.06 PM
root / root
0644
defs_solaris.go
3.319 KB
4 Dec 2025 6.06 PM
root / root
0644
defs_solaris_amd64.go
0.98 KB
4 Dec 2025 6.06 PM
root / root
0644
defs_windows.go
2.534 KB
4 Dec 2025 6.06 PM
root / root
0644
defs_windows_386.go
2.491 KB
4 Dec 2025 6.06 PM
root / root
0644
defs_windows_amd64.go
3.394 KB
4 Dec 2025 6.06 PM
root / root
0644
defs_windows_arm.go
2.956 KB
4 Dec 2025 6.06 PM
root / root
0644
defs_windows_arm64.go
3.455 KB
4 Dec 2025 6.06 PM
root / root
0644
duff_386.s
8.236 KB
4 Dec 2025 6.06 PM
root / root
0644
duff_amd64.s
5.637 KB
4 Dec 2025 6.06 PM
root / root
0644
duff_arm.s
7.111 KB
4 Dec 2025 6.06 PM
root / root
0644
duff_arm64.s
5.273 KB
4 Dec 2025 6.06 PM
root / root
0644
duff_loong64.s
11.902 KB
4 Dec 2025 6.06 PM
root / root
0644
duff_mips64x.s
11.282 KB
4 Dec 2025 6.06 PM
root / root
0644
duff_ppc64x.s
7.056 KB
4 Dec 2025 6.06 PM
root / root
0644
duff_riscv64.s
11.402 KB
4 Dec 2025 6.06 PM
root / root
0644
duff_s390x.s
0.495 KB
4 Dec 2025 6.06 PM
root / root
0644
env_plan9.go
3.019 KB
4 Dec 2025 6.06 PM
root / root
0644
env_posix.go
2.131 KB
4 Dec 2025 6.06 PM
root / root
0644
error.go
10.387 KB
4 Dec 2025 6.06 PM
root / root
0644
extern.go
19.966 KB
4 Dec 2025 6.06 PM
root / root
0644
fastlog2.go
1.22 KB
4 Dec 2025 6.06 PM
root / root
0644
fastlog2table.go
0.883 KB
4 Dec 2025 6.06 PM
root / root
0644
fds_nonunix.go
0.25 KB
4 Dec 2025 6.06 PM
root / root
0644
fds_unix.go
1.27 KB
4 Dec 2025 6.06 PM
root / root
0644
fedora.go
0.242 KB
4 Dec 2025 6.06 PM
root / root
0644
float.go
2.922 KB
4 Dec 2025 6.06 PM
root / root
0644
funcdata.h
2.526 KB
4 Dec 2025 6.06 PM
root / root
0644
go_tls.h
0.357 KB
4 Dec 2025 6.06 PM
root / root
0644
hash32.go
1.584 KB
4 Dec 2025 6.06 PM
root / root
0644
hash64.go
1.894 KB
4 Dec 2025 6.06 PM
root / root
0644
heapdump.go
17.623 KB
4 Dec 2025 6.06 PM
root / root
0644
histogram.go
7.297 KB
4 Dec 2025 6.06 PM
root / root
0644
iface.go
21.337 KB
4 Dec 2025 6.06 PM
root / root
0644
ints.s
9.863 KB
4 Dec 2025 6.06 PM
root / root
0644
lfstack.go
1.686 KB
4 Dec 2025 6.06 PM
root / root
0644
libfuzzer.go
6.342 KB
4 Dec 2025 6.06 PM
root / root
0644
libfuzzer_amd64.s
5.026 KB
4 Dec 2025 6.06 PM
root / root
0644
libfuzzer_arm64.s
3.152 KB
4 Dec 2025 6.06 PM
root / root
0644
libfuzzer_loong64.s
3.24 KB
4 Dec 2025 6.06 PM
root / root
0644
linkname.go
0.786 KB
4 Dec 2025 6.06 PM
root / root
0644
linkname_swiss.go
6.674 KB
4 Dec 2025 6.06 PM
root / root
0644
linkname_unix.go
0.26 KB
4 Dec 2025 6.06 PM
root / root
0644
lock_futex.go
3.077 KB
4 Dec 2025 6.06 PM
root / root
0644
lock_js.go
7.078 KB
4 Dec 2025 6.06 PM
root / root
0644
lock_sema.go
4.146 KB
4 Dec 2025 6.06 PM
root / root
0644
lock_spinbit.go
14.618 KB
4 Dec 2025 6.06 PM
root / root
0644
lock_wasip1.go
2.063 KB
4 Dec 2025 6.06 PM
root / root
0644
lockrank.go
24.401 KB
4 Dec 2025 6.06 PM
root / root
0644
lockrank_off.go
1.299 KB
4 Dec 2025 6.06 PM
root / root
0644
lockrank_on.go
10.562 KB
4 Dec 2025 6.06 PM
root / root
0644
malloc.go
71.77 KB
4 Dec 2025 6.06 PM
root / root
0644
map_fast32_noswiss.go
13.967 KB
4 Dec 2025 6.06 PM
root / root
0644
map_fast32_swiss.go
1.712 KB
4 Dec 2025 6.06 PM
root / root
0644
map_fast64_noswiss.go
14.181 KB
4 Dec 2025 6.06 PM
root / root
0644
map_fast64_swiss.go
1.745 KB
4 Dec 2025 6.06 PM
root / root
0644
map_faststr_noswiss.go
15.409 KB
4 Dec 2025 6.06 PM
root / root
0644
map_faststr_swiss.go
1.327 KB
4 Dec 2025 6.06 PM
root / root
0644
map_noswiss.go
57.593 KB
4 Dec 2025 6.06 PM
root / root
0644
map_swiss.go
10.174 KB
4 Dec 2025 6.06 PM
root / root
0644
mbarrier.go
15.26 KB
4 Dec 2025 6.06 PM
root / root
0644
mbitmap.go
61.238 KB
4 Dec 2025 6.06 PM
root / root
0644
mcache.go
10.449 KB
4 Dec 2025 6.06 PM
root / root
0644
mcentral.go
7.837 KB
4 Dec 2025 6.06 PM
root / root
0644
mcheckmark.go
9.268 KB
4 Dec 2025 6.06 PM
root / root
0644
mcleanup.go
23.188 KB
4 Dec 2025 6.06 PM
root / root
0644
mem.go
7.337 KB
4 Dec 2025 6.06 PM
root / root
0644
mem_aix.go
2.038 KB
4 Dec 2025 6.06 PM
root / root
0644
mem_bsd.go
2.244 KB
4 Dec 2025 6.06 PM
root / root
0644
mem_darwin.go
1.987 KB
4 Dec 2025 6.06 PM
root / root
0644
mem_js.go
0.446 KB
4 Dec 2025 6.06 PM
root / root
0644
mem_linux.go
5.222 KB
4 Dec 2025 6.06 PM
root / root
0644
mem_nonsbrk.go
0.344 KB
4 Dec 2025 6.06 PM
root / root
0644
mem_plan9.go
0.437 KB
4 Dec 2025 6.06 PM
root / root
0644
mem_sbrk.go
6.113 KB
4 Dec 2025 6.06 PM
root / root
0644
mem_wasip1.go
0.383 KB
4 Dec 2025 6.06 PM
root / root
0644
mem_wasm.go
0.57 KB
4 Dec 2025 6.06 PM
root / root
0644
mem_windows.go
3.905 KB
4 Dec 2025 6.06 PM
root / root
0644
memclr_386.s
2.381 KB
4 Dec 2025 6.06 PM
root / root
0644
memclr_amd64.s
4.906 KB
4 Dec 2025 6.06 PM
root / root
0644
memclr_arm.s
2.604 KB
4 Dec 2025 6.06 PM
root / root
0644
memclr_arm64.s
3.684 KB
4 Dec 2025 6.06 PM
root / root
0644
memclr_loong64.s
6.951 KB
4 Dec 2025 6.06 PM
root / root
0644
memclr_mips64x.s
1.722 KB
4 Dec 2025 6.06 PM
root / root
0644
memclr_mipsx.s
1.324 KB
4 Dec 2025 6.06 PM
root / root
0644
memclr_plan9_386.s
0.96 KB
4 Dec 2025 6.06 PM
root / root
0644
memclr_plan9_amd64.s
0.499 KB
4 Dec 2025 6.06 PM
root / root
0644
memclr_ppc64x.s
4.438 KB
4 Dec 2025 6.06 PM
root / root
0644
memclr_riscv64.s
1.705 KB
4 Dec 2025 6.06 PM
root / root
0644
memclr_s390x.s
3.558 KB
4 Dec 2025 6.06 PM
root / root
0644
memclr_wasm.s
0.474 KB
4 Dec 2025 6.06 PM
root / root
0644
memmove_386.s
4.419 KB
4 Dec 2025 6.06 PM
root / root
0644
memmove_amd64.s
12.874 KB
4 Dec 2025 6.06 PM
root / root
0644
memmove_arm.s
5.897 KB
4 Dec 2025 6.06 PM
root / root
0644
memmove_arm64.s
5.955 KB
4 Dec 2025 6.06 PM
root / root
0644
memmove_loong64.s
11.653 KB
4 Dec 2025 6.06 PM
root / root
0644
memmove_mips64x.s
1.826 KB
4 Dec 2025 6.06 PM
root / root
0644
memmove_mipsx.s
4.396 KB
4 Dec 2025 6.06 PM
root / root
0644
memmove_plan9_386.s
3.063 KB
4 Dec 2025 6.06 PM
root / root
0644
memmove_plan9_amd64.s
3.041 KB
4 Dec 2025 6.06 PM
root / root
0644
memmove_ppc64x.s
4.858 KB
4 Dec 2025 6.06 PM
root / root
0644
memmove_riscv64.s
5.461 KB
4 Dec 2025 6.06 PM
root / root
0644
memmove_s390x.s
2.918 KB
4 Dec 2025 6.06 PM
root / root
0644
memmove_wasm.s
0.468 KB
4 Dec 2025 6.06 PM
root / root
0644
metrics.go
25.988 KB
4 Dec 2025 6.06 PM
root / root
0644
mfinal.go
19.779 KB
4 Dec 2025 6.06 PM
root / root
0644
mfixalloc.go
3.127 KB
4 Dec 2025 6.06 PM
root / root
0644
mgc.go
64.943 KB
4 Dec 2025 6.06 PM
root / root
0644
mgclimit.go
17.241 KB
4 Dec 2025 6.06 PM
root / root
0644
mgcmark.go
55.107 KB
4 Dec 2025 6.06 PM
root / root
0644
mgcmark_greenteagc.go
27.73 KB
4 Dec 2025 6.06 PM
root / root
0644
mgcmark_nogreenteagc.go
2.204 KB
4 Dec 2025 6.06 PM
root / root
0644
mgcpacer.go
56.521 KB
4 Dec 2025 6.06 PM
root / root
0644
mgcscavenge.go
52.258 KB
4 Dec 2025 6.06 PM
root / root
0644
mgcstack.go
10.585 KB
4 Dec 2025 6.06 PM
root / root
0644
mgcsweep.go
32.938 KB
4 Dec 2025 6.06 PM
root / root
0644
mgcwork.go
14.936 KB
4 Dec 2025 6.06 PM
root / root
0644
mheap.go
97.843 KB
4 Dec 2025 6.06 PM
root / root
0644
minmax.go
1.458 KB
4 Dec 2025 6.06 PM
root / root
0644
mkduff.go
8.029 KB
4 Dec 2025 6.06 PM
root / root
0644
mkfastlog2table.go
3.075 KB
4 Dec 2025 6.06 PM
root / root
0644
mklockrank.go
9.474 KB
4 Dec 2025 6.06 PM
root / root
0644
mkpreempt.go
14.839 KB
4 Dec 2025 6.06 PM
root / root
0644
mmap.go
0.824 KB
4 Dec 2025 6.06 PM
root / root
0644
mpagealloc.go
39.259 KB
4 Dec 2025 6.06 PM
root / root
0644
mpagealloc_32bit.go
4.609 KB
4 Dec 2025 6.06 PM
root / root
0644
mpagealloc_64bit.go
9.406 KB
4 Dec 2025 6.06 PM
root / root
0644
mpagecache.go
5.593 KB
4 Dec 2025 6.06 PM
root / root
0644
mpallocbits.go
12.526 KB
4 Dec 2025 6.06 PM
root / root
0644
mprof.go
54.017 KB
4 Dec 2025 6.06 PM
root / root
0644
mranges.go
14.455 KB
4 Dec 2025 6.06 PM
root / root
0644
msan.go
1.622 KB
4 Dec 2025 6.06 PM
root / root
0644
msan0.go
0.708 KB
4 Dec 2025 6.06 PM
root / root
0644
msan_amd64.s
2.415 KB
4 Dec 2025 6.06 PM
root / root
0644
msan_arm64.s
2.091 KB
4 Dec 2025 6.06 PM
root / root
0644
msan_loong64.s
2.066 KB
4 Dec 2025 6.06 PM
root / root
0644
msize.go
1.351 KB
4 Dec 2025 6.06 PM
root / root
0644
mspanset.go
13.307 KB
4 Dec 2025 6.06 PM
root / root
0644
mstats.go
33.924 KB
4 Dec 2025 6.06 PM
root / root
0644
mwbbuf.go
8.184 KB
4 Dec 2025 6.06 PM
root / root
0644
nbpipe_pipe.go
0.396 KB
4 Dec 2025 6.06 PM
root / root
0644
nbpipe_pipe2.go
0.336 KB
4 Dec 2025 6.06 PM
root / root
0644
net_plan9.go
0.63 KB
4 Dec 2025 6.06 PM
root / root
0644
netpoll.go
20.81 KB
4 Dec 2025 6.06 PM
root / root
0644
netpoll_aix.go
5.166 KB
4 Dec 2025 6.06 PM
root / root
0644
netpoll_epoll.go
4.697 KB
4 Dec 2025 6.06 PM
root / root
0644
netpoll_fake.go
0.648 KB
4 Dec 2025 6.06 PM
root / root
0644
netpoll_kqueue.go
4.691 KB
4 Dec 2025 6.06 PM
root / root
0644
netpoll_kqueue_event.go
1.778 KB
4 Dec 2025 6.06 PM
root / root
0644
netpoll_kqueue_pipe.go
2.143 KB
4 Dec 2025 6.06 PM
root / root
0644
netpoll_solaris.go
11.311 KB
4 Dec 2025 6.06 PM
root / root
0644
netpoll_stub.go
1.579 KB
4 Dec 2025 6.06 PM
root / root
0644
netpoll_wasip1.go
6.004 KB
4 Dec 2025 6.06 PM
root / root
0644
netpoll_windows.go
9.491 KB
4 Dec 2025 6.06 PM
root / root
0644
nonwindows_stub.go
0.939 KB
4 Dec 2025 6.06 PM
root / root
0644
note_js.go
1.343 KB
4 Dec 2025 6.06 PM
root / root
0644
note_other.go
1.191 KB
4 Dec 2025 6.06 PM
root / root
0644
os2_aix.go
20.961 KB
4 Dec 2025 6.06 PM
root / root
0644
os2_freebsd.go
0.295 KB
4 Dec 2025 6.06 PM
root / root
0644
os2_openbsd.go
0.289 KB
4 Dec 2025 6.06 PM
root / root
0644
os2_plan9.go
1.481 KB
4 Dec 2025 6.06 PM
root / root
0644
os2_solaris.go
0.313 KB
4 Dec 2025 6.06 PM
root / root
0644
os3_plan9.go
3.977 KB
4 Dec 2025 6.06 PM
root / root
0644
os3_solaris.go
17.703 KB
4 Dec 2025 6.06 PM
root / root
0644
os_aix.go
9.052 KB
4 Dec 2025 6.06 PM
root / root
0644
os_android.go
0.452 KB
4 Dec 2025 6.06 PM
root / root
0644
os_darwin.go
11.864 KB
4 Dec 2025 6.06 PM
root / root
0644
os_darwin_arm64.go
0.321 KB
4 Dec 2025 6.06 PM
root / root
0644
os_dragonfly.go
7.312 KB
4 Dec 2025 6.06 PM
root / root
0644
os_freebsd.go
11.729 KB
4 Dec 2025 6.06 PM
root / root
0644
os_freebsd2.go
0.589 KB
4 Dec 2025 6.06 PM
root / root
0644
os_freebsd_amd64.go
0.643 KB
4 Dec 2025 6.06 PM
root / root
0644
os_freebsd_arm.go
1.466 KB
4 Dec 2025 6.06 PM
root / root
0644
os_freebsd_arm64.go
0.313 KB
4 Dec 2025 6.06 PM
root / root
0644
os_freebsd_noauxv.go
0.235 KB
4 Dec 2025 6.06 PM
root / root
0644
os_freebsd_riscv64.go
0.193 KB
4 Dec 2025 6.06 PM
root / root
0644
os_illumos.go
3.931 KB
4 Dec 2025 6.06 PM
root / root
0644
os_js.go
0.749 KB
4 Dec 2025 6.06 PM
root / root
0644
os_linux.go
27.048 KB
4 Dec 2025 6.06 PM
root / root
0644
os_linux_arm.go
1.506 KB
4 Dec 2025 6.06 PM
root / root
0644
os_linux_arm64.go
0.467 KB
4 Dec 2025 6.06 PM
root / root
0644
os_linux_be64.go
0.787 KB
4 Dec 2025 6.06 PM
root / root
0644
os_linux_generic.go
0.85 KB
4 Dec 2025 6.06 PM
root / root
0644
os_linux_loong64.go
0.337 KB
4 Dec 2025 6.06 PM
root / root
0644
os_linux_mips64x.go
0.973 KB
4 Dec 2025 6.06 PM
root / root
0644
os_linux_mipsx.go
0.964 KB
4 Dec 2025 6.06 PM
root / root
0644
os_linux_noauxv.go
0.329 KB
4 Dec 2025 6.06 PM
root / root
0644
os_linux_novdso.go
0.339 KB
4 Dec 2025 6.06 PM
root / root
0644
os_linux_ppc64x.go
0.514 KB
4 Dec 2025 6.06 PM
root / root
0644
os_linux_riscv64.go
1.362 KB
4 Dec 2025 6.06 PM
root / root
0644
os_linux_s390x.go
0.806 KB
4 Dec 2025 6.06 PM
root / root
0644
os_linux_x86.go
0.229 KB
4 Dec 2025 6.06 PM
root / root
0644
os_netbsd.go
10.232 KB
4 Dec 2025 6.06 PM
root / root
0644
os_netbsd_386.go
0.603 KB
4 Dec 2025 6.06 PM
root / root
0644
os_netbsd_amd64.go
0.6 KB
4 Dec 2025 6.06 PM
root / root
0644
os_netbsd_arm.go
1.094 KB
4 Dec 2025 6.06 PM
root / root
0644
os_netbsd_arm64.go
0.751 KB
4 Dec 2025 6.06 PM
root / root
0644
os_nonopenbsd.go
0.427 KB
4 Dec 2025 6.06 PM
root / root
0644
os_only_solaris.go
0.353 KB
4 Dec 2025 6.06 PM
root / root
0644
os_openbsd.go
6.447 KB
4 Dec 2025 6.06 PM
root / root
0644
os_openbsd_arm.go
0.667 KB
4 Dec 2025 6.06 PM
root / root
0644
os_openbsd_arm64.go
0.321 KB
4 Dec 2025 6.06 PM
root / root
0644
os_openbsd_libc.go
1.488 KB
4 Dec 2025 6.06 PM
root / root
0644
os_openbsd_mips64.go
0.321 KB
4 Dec 2025 6.06 PM
root / root
0644
os_openbsd_syscall.go
1.359 KB
4 Dec 2025 6.06 PM
root / root
0644
os_openbsd_syscall1.go
0.431 KB
4 Dec 2025 6.06 PM
root / root
0644
os_openbsd_syscall2.go
2.511 KB
4 Dec 2025 6.06 PM
root / root
0644
os_plan9.go
11.943 KB
4 Dec 2025 6.06 PM
root / root
0644
os_plan9_arm.go
0.366 KB
4 Dec 2025 6.06 PM
root / root
0644
os_solaris.go
6.707 KB
4 Dec 2025 6.06 PM
root / root
0644
os_unix.go
0.426 KB
4 Dec 2025 6.06 PM
root / root
0644
os_unix_nonlinux.go
0.505 KB
4 Dec 2025 6.06 PM
root / root
0644
os_wasip1.go
6.88 KB
4 Dec 2025 6.06 PM
root / root
0644
os_wasm.go
3.314 KB
4 Dec 2025 6.06 PM
root / root
0644
os_windows.go
40.658 KB
4 Dec 2025 6.06 PM
root / root
0644
os_windows_arm.go
0.499 KB
4 Dec 2025 6.06 PM
root / root
0644
os_windows_arm64.go
0.331 KB
4 Dec 2025 6.06 PM
root / root
0644
panic.go
45.134 KB
4 Dec 2025 6.06 PM
root / root
0644
panic32.go
4.895 KB
4 Dec 2025 6.06 PM
root / root
0644
pinner.go
10.994 KB
4 Dec 2025 6.06 PM
root / root
0644
plugin.go
4.394 KB
4 Dec 2025 6.06 PM
root / root
0644
preempt.go
15.458 KB
4 Dec 2025 6.06 PM
root / root
0644
preempt_386.s
0.805 KB
4 Dec 2025 6.06 PM
root / root
0644
preempt_amd64.s
1.541 KB
4 Dec 2025 6.06 PM
root / root
0644
preempt_arm.s
1.487 KB
4 Dec 2025 6.06 PM
root / root
0644
preempt_arm64.s
1.967 KB
4 Dec 2025 6.06 PM
root / root
0644
preempt_loong64.s
2.411 KB
4 Dec 2025 6.06 PM
root / root
0644
preempt_mips64x.s
2.716 KB
4 Dec 2025 6.06 PM
root / root
0644
preempt_mipsx.s
2.681 KB
4 Dec 2025 6.06 PM
root / root
0644
preempt_nonwindows.go
0.283 KB
4 Dec 2025 6.06 PM
root / root
0644
preempt_ppc64x.s
2.716 KB
4 Dec 2025 6.06 PM
root / root
0644
preempt_riscv64.s
2.258 KB
4 Dec 2025 6.06 PM
root / root
0644
preempt_s390x.s
1.009 KB
4 Dec 2025 6.06 PM
root / root
0644
preempt_wasm.s
0.172 KB
4 Dec 2025 6.06 PM
root / root
0644
print.go
5.921 KB
4 Dec 2025 6.06 PM
root / root
0644
proc.go
220.345 KB
4 Dec 2025 6.06 PM
root / root
0644
profbuf.go
18.203 KB
4 Dec 2025 6.06 PM
root / root
0644
proflabel.go
2.059 KB
4 Dec 2025 6.06 PM
root / root
0644
race.go
22.501 KB
4 Dec 2025 6.06 PM
root / root
0644
race0.go
2.894 KB
4 Dec 2025 6.06 PM
root / root
0644
race_amd64.s
15.17 KB
4 Dec 2025 6.06 PM
root / root
0644
race_arm64.s
15.554 KB
4 Dec 2025 6.06 PM
root / root
0644
race_loong64.s
15.241 KB
4 Dec 2025 6.06 PM
root / root
0644
race_ppc64le.s
17.035 KB
4 Dec 2025 6.06 PM
root / root
0644
race_s390x.s
13.131 KB
4 Dec 2025 6.06 PM
root / root
0644
rand.go
8.788 KB
4 Dec 2025 6.06 PM
root / root
0644
rdebug.go
0.537 KB
4 Dec 2025 6.06 PM
root / root
0644
retry.go
0.742 KB
4 Dec 2025 6.06 PM
root / root
0644
rt0_aix_ppc64.s
5.056 KB
4 Dec 2025 6.06 PM
root / root
0644
rt0_android_386.s
0.803 KB
4 Dec 2025 6.06 PM
root / root
0644
rt0_android_amd64.s
0.736 KB
4 Dec 2025 6.06 PM
root / root
0644
rt0_android_arm.s
0.823 KB
4 Dec 2025 6.06 PM
root / root
0644
rt0_android_arm64.s
0.919 KB
4 Dec 2025 6.06 PM
root / root
0644
rt0_darwin_amd64.s
0.39 KB
4 Dec 2025 6.06 PM
root / root
0644
rt0_darwin_arm64.s
1.688 KB
4 Dec 2025 6.06 PM
root / root
0644
rt0_dragonfly_amd64.s
0.438 KB
4 Dec 2025 6.06 PM
root / root
0644
rt0_freebsd_386.s
0.443 KB
4 Dec 2025 6.06 PM
root / root
0644
rt0_freebsd_amd64.s
0.432 KB
4 Dec 2025 6.06 PM
root / root
0644
rt0_freebsd_arm.s
0.291 KB
4 Dec 2025 6.06 PM
root / root
0644
rt0_freebsd_arm64.s
1.879 KB
4 Dec 2025 6.06 PM
root / root
0644
rt0_freebsd_riscv64.s
2.721 KB
4 Dec 2025 6.06 PM
root / root
0644
rt0_illumos_amd64.s
0.304 KB
4 Dec 2025 6.06 PM
root / root
0644
rt0_ios_amd64.s
0.415 KB
4 Dec 2025 6.06 PM
root / root
0644
rt0_ios_arm64.s
0.415 KB
4 Dec 2025 6.06 PM
root / root
0644
rt0_js_wasm.s
1.431 KB
4 Dec 2025 6.06 PM
root / root
0644
rt0_linux_386.s
0.439 KB
4 Dec 2025 6.06 PM
root / root
0644
rt0_linux_amd64.s
0.3 KB
4 Dec 2025 6.06 PM
root / root
0644
rt0_linux_arm.s
0.983 KB
4 Dec 2025 6.06 PM
root / root
0644
rt0_linux_arm64.s
1.809 KB
4 Dec 2025 6.06 PM
root / root
0644
rt0_linux_loong64.s
2.009 KB
4 Dec 2025 6.06 PM
root / root
0644
rt0_linux_mips64x.s
0.99 KB
4 Dec 2025 6.06 PM
root / root
0644
rt0_linux_mipsx.s
0.778 KB
4 Dec 2025 6.06 PM
root / root
0644
rt0_linux_ppc64.s
0.827 KB
4 Dec 2025 6.06 PM
root / root
0644
rt0_linux_ppc64le.s
2.887 KB
4 Dec 2025 6.06 PM
root / root
0644
rt0_linux_riscv64.s
2.648 KB
4 Dec 2025 6.06 PM
root / root
0644
rt0_linux_s390x.s
0.66 KB
4 Dec 2025 6.06 PM
root / root
0644
rt0_netbsd_386.s
0.441 KB
4 Dec 2025 6.06 PM
root / root
0644
rt0_netbsd_amd64.s
0.302 KB
4 Dec 2025 6.06 PM
root / root
0644
rt0_netbsd_arm.s
0.289 KB
4 Dec 2025 6.06 PM
root / root
0644
rt0_netbsd_arm64.s
1.803 KB
4 Dec 2025 6.06 PM
root / root
0644
rt0_openbsd_386.s
0.443 KB
4 Dec 2025 6.06 PM
root / root
0644
rt0_openbsd_amd64.s
0.304 KB
4 Dec 2025 6.06 PM
root / root
0644
rt0_openbsd_arm.s
0.291 KB
4 Dec 2025 6.06 PM
root / root
0644
rt0_openbsd_arm64.s
1.961 KB
4 Dec 2025 6.06 PM
root / root
0644
rt0_openbsd_mips64.s
0.953 KB
4 Dec 2025 6.06 PM
root / root
0644
rt0_openbsd_ppc64.s
0.361 KB
4 Dec 2025 6.06 PM
root / root
0644
rt0_openbsd_riscv64.s
0.363 KB
4 Dec 2025 6.06 PM
root / root
0644
rt0_plan9_386.s
0.511 KB
4 Dec 2025 6.06 PM
root / root
0644
rt0_plan9_amd64.s
0.47 KB
4 Dec 2025 6.06 PM
root / root
0644
rt0_plan9_arm.s
0.388 KB
4 Dec 2025 6.06 PM
root / root
0644
rt0_solaris_amd64.s
0.304 KB
4 Dec 2025 6.06 PM
root / root
0644
rt0_wasip1_wasm.s
0.453 KB
4 Dec 2025 6.06 PM
root / root
0644
rt0_windows_386.s
1.28 KB
4 Dec 2025 6.06 PM
root / root
0644
rt0_windows_amd64.s
1.139 KB
4 Dec 2025 6.06 PM
root / root
0644
rt0_windows_arm.s
0.377 KB
4 Dec 2025 6.06 PM
root / root
0644
rt0_windows_arm64.s
0.716 KB
4 Dec 2025 6.06 PM
root / root
0644
runtime-gdb.py
18.864 KB
4 Dec 2025 6.06 PM
root / root
0644
runtime.go
9.768 KB
4 Dec 2025 6.06 PM
root / root
0644
runtime1.go
20.791 KB
4 Dec 2025 6.06 PM
root / root
0644
runtime2.go
50.123 KB
4 Dec 2025 6.06 PM
root / root
0644
runtime_boring.go
0.447 KB
4 Dec 2025 6.06 PM
root / root
0644
rwmutex.go
4.984 KB
4 Dec 2025 6.06 PM
root / root
0644
security_aix.go
0.438 KB
4 Dec 2025 6.06 PM
root / root
0644
security_issetugid.go
0.49 KB
4 Dec 2025 6.06 PM
root / root
0644
security_linux.go
0.327 KB
4 Dec 2025 6.06 PM
root / root
0644
security_nonunix.go
0.25 KB
4 Dec 2025 6.06 PM
root / root
0644
security_unix.go
0.846 KB
4 Dec 2025 6.06 PM
root / root
0644
select.go
15.398 KB
4 Dec 2025 6.06 PM
root / root
0644
sema.go
20.174 KB
4 Dec 2025 6.06 PM
root / root
0644
set_vma_name_linux.go
0.936 KB
4 Dec 2025 6.06 PM
root / root
0644
set_vma_name_stub.go
0.355 KB
4 Dec 2025 6.06 PM
root / root
0644
sigaction.go
0.489 KB
4 Dec 2025 6.06 PM
root / root
0644
signal_386.go
1.718 KB
4 Dec 2025 6.06 PM
root / root
0644
signal_aix_ppc64.go
3.545 KB
4 Dec 2025 6.06 PM
root / root
0644
signal_amd64.go
2.726 KB
4 Dec 2025 6.06 PM
root / root
0644
signal_arm.go
2.543 KB
4 Dec 2025 6.06 PM
root / root
0644
signal_arm64.go
3.828 KB
4 Dec 2025 6.06 PM
root / root
0644
signal_darwin.go
2.128 KB
4 Dec 2025 6.06 PM
root / root
0644
signal_darwin_amd64.go
4.004 KB
4 Dec 2025 6.06 PM
root / root
0644
signal_darwin_arm64.go
3.598 KB
4 Dec 2025 6.06 PM
root / root
0644
signal_dragonfly.go
2.171 KB
4 Dec 2025 6.06 PM
root / root
0644
signal_dragonfly_amd64.go
2.015 KB
4 Dec 2025 6.06 PM
root / root
0644
signal_freebsd.go
2.202 KB
4 Dec 2025 6.06 PM
root / root
0644
signal_freebsd_386.go
1.551 KB
4 Dec 2025 6.06 PM
root / root
0644
signal_freebsd_amd64.go
2.03 KB
4 Dec 2025 6.06 PM
root / root
0644
signal_freebsd_arm.go
2.179 KB
4 Dec 2025 6.06 PM
root / root
0644
signal_freebsd_arm64.go
3.237 KB
4 Dec 2025 6.06 PM
root / root
0644
signal_freebsd_riscv64.go
3.075 KB
4 Dec 2025 6.06 PM
root / root
0644
signal_linux_386.go
1.592 KB
4 Dec 2025 6.06 PM
root / root
0644
signal_linux_amd64.go
2.051 KB
4 Dec 2025 6.06 PM
root / root
0644
signal_linux_arm.go
2.123 KB
4 Dec 2025 6.06 PM
root / root
0644
signal_linux_arm64.go
2.945 KB
4 Dec 2025 6.06 PM
root / root
0644
signal_linux_loong64.go
3.216 KB
4 Dec 2025 6.06 PM
root / root
0644
signal_linux_mips64x.go
3.35 KB
4 Dec 2025 6.06 PM
root / root
0644
signal_linux_mipsx.go
3.667 KB
4 Dec 2025 6.06 PM
root / root
0644
signal_linux_ppc64x.go
3.501 KB
4 Dec 2025 6.06 PM
root / root
0644
signal_linux_riscv64.go
2.921 KB
4 Dec 2025 6.06 PM
root / root
0644
signal_linux_s390x.go
4.485 KB
4 Dec 2025 6.06 PM
root / root
0644
signal_loong64.go
3.072 KB
4 Dec 2025 6.06 PM
root / root
0644
signal_mips64x.go
3.181 KB
4 Dec 2025 6.06 PM
root / root
0644
signal_mipsx.go
3.06 KB
4 Dec 2025 6.06 PM
root / root
0644
signal_netbsd.go
2.181 KB
4 Dec 2025 6.06 PM
root / root
0644
signal_netbsd_386.go
1.757 KB
4 Dec 2025 6.06 PM
root / root
0644
signal_netbsd_amd64.go
2.325 KB
4 Dec 2025 6.06 PM
root / root
0644
signal_netbsd_arm.go
2.301 KB
4 Dec 2025 6.06 PM
root / root
0644
signal_netbsd_arm64.go
3.404 KB
4 Dec 2025 6.06 PM
root / root
0644
signal_openbsd.go
2.18 KB
4 Dec 2025 6.06 PM
root / root
0644
signal_openbsd_386.go
1.585 KB
4 Dec 2025 6.06 PM
root / root
0644
signal_openbsd_amd64.go
2.036 KB
4 Dec 2025 6.06 PM
root / root
0644
signal_openbsd_arm.go
2.117 KB
4 Dec 2025 6.06 PM
root / root
0644
signal_openbsd_arm64.go
3.391 KB
4 Dec 2025 6.06 PM
root / root
0644
signal_openbsd_mips64.go
3.282 KB
4 Dec 2025 6.06 PM
root / root
0644
signal_openbsd_ppc64.go
3.53 KB
4 Dec 2025 6.06 PM
root / root
0644
signal_openbsd_riscv64.go
3.12 KB
4 Dec 2025 6.06 PM
root / root
0644
signal_plan9.go
1.934 KB
4 Dec 2025 6.06 PM
root / root
0644
signal_ppc64x.go
3.708 KB
4 Dec 2025 6.06 PM
root / root
0644
signal_riscv64.go
2.91 KB
4 Dec 2025 6.06 PM
root / root
0644
signal_solaris.go
4.501 KB
4 Dec 2025 6.06 PM
root / root
0644
signal_solaris_amd64.go
2.466 KB
4 Dec 2025 6.06 PM
root / root
0644
signal_unix.go
45.658 KB
4 Dec 2025 6.06 PM
root / root
0644
signal_windows.go
14.353 KB
4 Dec 2025 6.06 PM
root / root
0644
sigqueue.go
7.618 KB
4 Dec 2025 6.06 PM
root / root
0644
sigqueue_note.go
0.633 KB
4 Dec 2025 6.06 PM
root / root
0644
sigqueue_plan9.go
3.254 KB
4 Dec 2025 6.06 PM
root / root
0644
sigtab_aix.go
11.304 KB
4 Dec 2025 6.06 PM
root / root
0644
sigtab_linux_generic.go
3.518 KB
4 Dec 2025 6.06 PM
root / root
0644
sigtab_linux_mipsx.go
5.953 KB
4 Dec 2025 6.06 PM
root / root
0644
slice.go
12.204 KB
4 Dec 2025 6.06 PM
root / root
0644
softfloat64.go
11.536 KB
4 Dec 2025 6.06 PM
root / root
0644
stack.go
42.74 KB
4 Dec 2025 6.06 PM
root / root
0644
stkframe.go
9.771 KB
4 Dec 2025 6.06 PM
root / root
0644
string.go
13.166 KB
4 Dec 2025 6.06 PM
root / root
0644
stubs.go
18.087 KB
4 Dec 2025 6.06 PM
root / root
0644
stubs2.go
1.146 KB
4 Dec 2025 6.06 PM
root / root
0644
stubs3.go
0.316 KB
4 Dec 2025 6.06 PM
root / root
0644
stubs_386.go
0.691 KB
4 Dec 2025 6.06 PM
root / root
0644
stubs_amd64.go
1.384 KB
4 Dec 2025 6.06 PM
root / root
0644
stubs_arm.go
0.673 KB
4 Dec 2025 6.06 PM
root / root
0644
stubs_arm64.go
0.684 KB
4 Dec 2025 6.06 PM
root / root
0644
stubs_linux.go
0.635 KB
4 Dec 2025 6.06 PM
root / root
0644
stubs_loong64.go
0.623 KB
4 Dec 2025 6.06 PM
root / root
0644
stubs_mips64x.go
0.51 KB
4 Dec 2025 6.06 PM
root / root
0644
stubs_mipsx.go
0.431 KB
4 Dec 2025 6.06 PM
root / root
0644
stubs_nonlinux.go
0.291 KB
4 Dec 2025 6.06 PM
root / root
0644
stubs_nonwasm.go
0.271 KB
4 Dec 2025 6.06 PM
root / root
0644
stubs_ppc64.go
0.295 KB
4 Dec 2025 6.06 PM
root / root
0644
stubs_ppc64x.go
0.672 KB
4 Dec 2025 6.06 PM
root / root
0644
stubs_riscv64.go
0.679 KB
4 Dec 2025 6.06 PM
root / root
0644
stubs_s390x.go
0.404 KB
4 Dec 2025 6.06 PM
root / root
0644
stubs_wasm.go
0.691 KB
4 Dec 2025 6.06 PM
root / root
0644
symtab.go
40.96 KB
4 Dec 2025 6.06 PM
root / root
0644
symtabinl.go
4.526 KB
4 Dec 2025 6.06 PM
root / root
0644
synctest.go
12.779 KB
4 Dec 2025 6.06 PM
root / root
0644
sys_aix_ppc64.s
7.42 KB
4 Dec 2025 6.06 PM
root / root
0644
sys_arm.go
0.509 KB
4 Dec 2025 6.06 PM
root / root
0644
sys_arm64.go
0.458 KB
4 Dec 2025 6.06 PM
root / root
0644
sys_darwin.go
24.438 KB
4 Dec 2025 6.06 PM
root / root
0644
sys_darwin_amd64.s
19.855 KB
4 Dec 2025 6.06 PM
root / root
0644
sys_darwin_arm64.go
1.738 KB
4 Dec 2025 6.06 PM
root / root
0644
sys_darwin_arm64.s
18.422 KB
4 Dec 2025 6.06 PM
root / root
0644
sys_dragonfly_amd64.s
8.31 KB
4 Dec 2025 6.06 PM
root / root
0644
sys_freebsd_386.s
9.409 KB
4 Dec 2025 6.06 PM
root / root
0644
sys_freebsd_amd64.s
12.675 KB
4 Dec 2025 6.06 PM
root / root
0644
sys_freebsd_arm.s
10.378 KB
4 Dec 2025 6.06 PM
root / root
0644
sys_freebsd_arm64.s
9.493 KB
4 Dec 2025 6.06 PM
root / root
0644
sys_freebsd_riscv64.s
8.918 KB
4 Dec 2025 6.06 PM
root / root
0644
sys_libc.go
1.878 KB
4 Dec 2025 6.06 PM
root / root
0644
sys_linux_386.s
17.89 KB
4 Dec 2025 6.06 PM
root / root
0644
sys_linux_amd64.s
16.357 KB
4 Dec 2025 6.06 PM
root / root
0644
sys_linux_arm.s
13.502 KB
4 Dec 2025 6.06 PM
root / root
0644
sys_linux_arm64.s
17.529 KB
4 Dec 2025 6.06 PM
root / root
0644
sys_linux_loong64.s
16.812 KB
4 Dec 2025 6.06 PM
root / root
0644
sys_linux_mips64x.s
11.965 KB
4 Dec 2025 6.06 PM
root / root
0644
sys_linux_mipsx.s
9.69 KB
4 Dec 2025 6.06 PM
root / root
0644
sys_linux_ppc64x.s
18.909 KB
4 Dec 2025 6.06 PM
root / root
0644
sys_linux_riscv64.s
10.523 KB
4 Dec 2025 6.06 PM
root / root
0644
sys_linux_s390x.s
13.451 KB
4 Dec 2025 6.06 PM
root / root
0644
sys_loong64.go
0.478 KB
4 Dec 2025 6.06 PM
root / root
0644
sys_mips64x.go
0.488 KB
4 Dec 2025 6.06 PM
root / root
0644
sys_mipsx.go
0.484 KB
4 Dec 2025 6.06 PM
root / root
0644
sys_netbsd_386.s
9.608 KB
4 Dec 2025 6.06 PM
root / root
0644
sys_netbsd_amd64.s
9.782 KB
4 Dec 2025 6.06 PM
root / root
0644
sys_netbsd_arm.s
10.576 KB
4 Dec 2025 6.06 PM
root / root
0644
sys_netbsd_arm64.s
9.469 KB
4 Dec 2025 6.06 PM
root / root
0644
sys_nonppc64x.go
0.239 KB
4 Dec 2025 6.06 PM
root / root
0644
sys_openbsd.go
2.593 KB
4 Dec 2025 6.06 PM
root / root
0644
sys_openbsd1.go
1.229 KB
4 Dec 2025 6.06 PM
root / root
0644
sys_openbsd2.go
8.671 KB
4 Dec 2025 6.06 PM
root / root
0644
sys_openbsd3.go
4.069 KB
4 Dec 2025 6.06 PM
root / root
0644
sys_openbsd_386.s
20.4 KB
4 Dec 2025 6.06 PM
root / root
0644
sys_openbsd_amd64.s
15.539 KB
4 Dec 2025 6.06 PM
root / root
0644
sys_openbsd_arm.s
18.461 KB
4 Dec 2025 6.06 PM
root / root
0644
sys_openbsd_arm64.s
15.053 KB
4 Dec 2025 6.06 PM
root / root
0644
sys_openbsd_mips64.s
8.807 KB
4 Dec 2025 6.06 PM
root / root
0644
sys_openbsd_ppc64.s
15.297 KB
4 Dec 2025 6.06 PM
root / root
0644
sys_openbsd_riscv64.s
16.802 KB
4 Dec 2025 6.06 PM
root / root
0644
sys_plan9_386.s
4.335 KB
4 Dec 2025 6.06 PM
root / root
0644
sys_plan9_amd64.s
4.732 KB
4 Dec 2025 6.06 PM
root / root
0644
sys_plan9_arm.s
6.798 KB
4 Dec 2025 6.06 PM
root / root
0644
sys_ppc64x.go
0.52 KB
4 Dec 2025 6.06 PM
root / root
0644
sys_riscv64.go
0.458 KB
4 Dec 2025 6.06 PM
root / root
0644
sys_s390x.go
0.458 KB
4 Dec 2025 6.06 PM
root / root
0644
sys_solaris_amd64.s
6.418 KB
4 Dec 2025 6.06 PM
root / root
0644
sys_wasm.go
1.127 KB
4 Dec 2025 6.06 PM
root / root
0644
sys_wasm.s
1.521 KB
4 Dec 2025 6.06 PM
root / root
0644
sys_windows_386.s
6.457 KB
4 Dec 2025 6.06 PM
root / root
0644
sys_windows_amd64.s
8.418 KB
4 Dec 2025 6.06 PM
root / root
0644
sys_windows_arm.s
7.744 KB
4 Dec 2025 6.06 PM
root / root
0644
sys_windows_arm64.s
6.797 KB
4 Dec 2025 6.06 PM
root / root
0644
sys_x86.go
0.539 KB
4 Dec 2025 6.06 PM
root / root
0644
syscall2_solaris.go
1.85 KB
4 Dec 2025 6.06 PM
root / root
0644
syscall_aix.go
6.332 KB
4 Dec 2025 6.06 PM
root / root
0644
syscall_solaris.go
8.383 KB
4 Dec 2025 6.06 PM
root / root
0644
syscall_windows.go
16.67 KB
4 Dec 2025 6.06 PM
root / root
0644
tagptr.go
0.891 KB
4 Dec 2025 6.06 PM
root / root
0644
tagptr_32bit.go
0.964 KB
4 Dec 2025 6.06 PM
root / root
0644
tagptr_64bit.go
3.127 KB
4 Dec 2025 6.06 PM
root / root
0644
test_amd64.go
0.191 KB
4 Dec 2025 6.06 PM
root / root
0644
test_amd64.s
0.309 KB
4 Dec 2025 6.06 PM
root / root
0644
test_stubs.go
0.213 KB
4 Dec 2025 6.06 PM
root / root
0644
textflag.h
1.466 KB
4 Dec 2025 6.06 PM
root / root
0644
time.go
43.854 KB
4 Dec 2025 6.06 PM
root / root
0644
time_fake.go
2.521 KB
4 Dec 2025 6.06 PM
root / root
0644
time_linux_amd64.s
2.019 KB
4 Dec 2025 6.06 PM
root / root
0644
time_nofake.go
1.568 KB
4 Dec 2025 6.06 PM
root / root
0644
time_plan9.go
0.629 KB
4 Dec 2025 6.06 PM
root / root
0644
time_windows.h
0.735 KB
4 Dec 2025 6.06 PM
root / root
0644
time_windows_386.s
1.707 KB
4 Dec 2025 6.06 PM
root / root
0644
time_windows_amd64.s
0.768 KB
4 Dec 2025 6.06 PM
root / root
0644
time_windows_arm.s
1.974 KB
4 Dec 2025 6.06 PM
root / root
0644
time_windows_arm64.s
0.885 KB
4 Dec 2025 6.06 PM
root / root
0644
timeasm.go
0.408 KB
4 Dec 2025 6.06 PM
root / root
0644
timestub.go
0.878 KB
4 Dec 2025 6.06 PM
root / root
0644
timestub2.go
0.364 KB
4 Dec 2025 6.06 PM
root / root
0644
tls_arm.s
3.451 KB
4 Dec 2025 6.06 PM
root / root
0644
tls_arm64.h
1.098 KB
4 Dec 2025 6.06 PM
root / root
0644
tls_arm64.s
1.199 KB
4 Dec 2025 6.06 PM
root / root
0644
tls_loong64.s
0.575 KB
4 Dec 2025 6.06 PM
root / root
0644
tls_mips64x.s
0.716 KB
4 Dec 2025 6.06 PM
root / root
0644
tls_mipsx.s
0.693 KB
4 Dec 2025 6.06 PM
root / root
0644
tls_ppc64x.s
1.523 KB
4 Dec 2025 6.06 PM
root / root
0644
tls_riscv64.s
0.601 KB
4 Dec 2025 6.06 PM
root / root
0644
tls_s390x.s
1.546 KB
4 Dec 2025 6.06 PM
root / root
0644
tls_stub.go
0.254 KB
4 Dec 2025 6.06 PM
root / root
0644
tls_windows_amd64.go
0.287 KB
4 Dec 2025 6.06 PM
root / root
0644
trace.go
38.343 KB
4 Dec 2025 6.06 PM
root / root
0644
traceallocfree.go
5.998 KB
4 Dec 2025 6.06 PM
root / root
0644
traceback.go
56.618 KB
4 Dec 2025 6.06 PM
root / root
0644
tracebuf.go
10.405 KB
4 Dec 2025 6.06 PM
root / root
0644
tracecpu.go
8.79 KB
4 Dec 2025 6.06 PM
root / root
0644
traceevent.go
3.685 KB
4 Dec 2025 6.06 PM
root / root
0644
tracemap.go
4.529 KB
4 Dec 2025 6.06 PM
root / root
0644
traceregion.go
3.402 KB
4 Dec 2025 6.06 PM
root / root
0644
traceruntime.go
25.478 KB
4 Dec 2025 6.06 PM
root / root
0644
tracestack.go
11.361 KB
4 Dec 2025 6.06 PM
root / root
0644
tracestatus.go
6.927 KB
4 Dec 2025 6.06 PM
root / root
0644
tracestring.go
2.438 KB
4 Dec 2025 6.06 PM
root / root
0644
tracetime.go
3.829 KB
4 Dec 2025 6.06 PM
root / root
0644
tracetype.go
2.279 KB
4 Dec 2025 6.06 PM
root / root
0644
type.go
17.42 KB
4 Dec 2025 6.06 PM
root / root
0644
typekind.go
0.348 KB
4 Dec 2025 6.06 PM
root / root
0644
unsafe.go
3.17 KB
4 Dec 2025 6.06 PM
root / root
0644
utf8.go
3.386 KB
4 Dec 2025 6.06 PM
root / root
0644
valgrind.go
5.013 KB
4 Dec 2025 6.06 PM
root / root
0644
valgrind0.go
1.116 KB
4 Dec 2025 6.06 PM
root / root
0644
valgrind_amd64.s
1.266 KB
4 Dec 2025 6.06 PM
root / root
0644
valgrind_arm64.s
0.763 KB
4 Dec 2025 6.06 PM
root / root
0644
vdso_elf32.go
2.761 KB
4 Dec 2025 6.06 PM
root / root
0644
vdso_elf64.go
2.836 KB
4 Dec 2025 6.06 PM
root / root
0644
vdso_freebsd.go
2.443 KB
4 Dec 2025 6.06 PM
root / root
0644
vdso_freebsd_arm.go
0.443 KB
4 Dec 2025 6.06 PM
root / root
0644
vdso_freebsd_arm64.go
0.443 KB
4 Dec 2025 6.06 PM
root / root
0644
vdso_freebsd_riscv64.go
0.419 KB
4 Dec 2025 6.06 PM
root / root
0644
vdso_freebsd_x86.go
1.856 KB
4 Dec 2025 6.06 PM
root / root
0644
vdso_in_none.go
0.433 KB
4 Dec 2025 6.06 PM
root / root
0644
vdso_linux.go
7.786 KB
4 Dec 2025 6.06 PM
root / root
0644
vdso_linux_386.go
0.653 KB
4 Dec 2025 6.06 PM
root / root
0644
vdso_linux_amd64.go
0.888 KB
4 Dec 2025 6.06 PM
root / root
0644
vdso_linux_arm.go
0.653 KB
4 Dec 2025 6.06 PM
root / root
0644
vdso_linux_arm64.go
0.712 KB
4 Dec 2025 6.06 PM
root / root
0644
vdso_linux_loong64.go
0.824 KB
4 Dec 2025 6.06 PM
root / root
0644
vdso_linux_mips64x.go
0.83 KB
4 Dec 2025 6.06 PM
root / root
0644
vdso_linux_ppc64x.go
0.709 KB
4 Dec 2025 6.06 PM
root / root
0644
vdso_linux_riscv64.go
0.65 KB
4 Dec 2025 6.06 PM
root / root
0644
vdso_linux_s390x.go
0.696 KB
4 Dec 2025 6.06 PM
root / root
0644
vgetrandom_linux.go
3.825 KB
4 Dec 2025 6.06 PM
root / root
0644
vgetrandom_unsupported.go
0.45 KB
4 Dec 2025 6.06 PM
root / root
0644
vlop_386.s
2.018 KB
4 Dec 2025 6.06 PM
root / root
0644
vlop_arm.s
7.063 KB
4 Dec 2025 6.06 PM
root / root
0644
vlrt.go
6.712 KB
4 Dec 2025 6.06 PM
root / root
0644
wincallback.go
3.454 KB
4 Dec 2025 6.06 PM
root / root
0644
write_err.go
0.289 KB
4 Dec 2025 6.06 PM
root / root
0644
write_err_android.go
4.59 KB
4 Dec 2025 6.06 PM
root / root
0644
zcallback_windows.go
0.151 KB
4 Dec 2025 6.06 PM
root / root
0644
zcallback_windows.s
63.057 KB
4 Dec 2025 6.06 PM
root / root
0644
zcallback_windows_arm.s
89.323 KB
4 Dec 2025 6.06 PM
root / root
0644
zcallback_windows_arm64.s
89.323 KB
4 Dec 2025 6.06 PM
root / root
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2026 CONTACT ME
Static GIF