Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 17 for cputicks (0.17 sec)

  1. src/runtime/tracetime.go

    //
    // Hitting this target resolution is easy in the nanotime case: just pick a
    // division of 64. In the cputicks case it's a bit more complex.
    //
    // For x86, on a 3 GHz machine, we'd want to divide by 3*64 to hit our target.
    // To keep the division operation efficient, we round that up to 4*64, or 256.
    // Given what cputicks represents, we use this on all other platforms except
    // for PowerPC.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 21:17:41 UTC 2024
    - 3.3K bytes
    - Viewed (0)
  2. src/runtime/badlinkname.go

    // See go.dev/issue/67401.
    
    // Notable members of the hall of shame include:
    //   - github.com/dgraph-io/ristretto
    //   - github.com/outcaste-io/ristretto
    //   - github.com/clubpay/ronykit
    //go:linkname cputicks
    
    // Notable members of the hall of shame include:
    //   - gvisor.dev/gvisor (from assembly)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 17:58:53 UTC 2024
    - 661 bytes
    - Viewed (0)
  3. src/runtime/vdso_freebsd_x86.go

    	_HPET_MAIN_COUNTER = 0xf0 /* Main counter register */
    
    	hpetDevPath = "/dev/hpetX\x00"
    )
    
    var hpetDevMap [_HPET_DEV_MAP_MAX]uintptr
    
    //go:nosplit
    func (th *vdsoTimehands) getTSCTimecounter() uint32 {
    	tsc := cputicks()
    	if th.x86_shift > 0 {
    		tsc >>= th.x86_shift
    	}
    	return uint32(tsc)
    }
    
    //go:nosplit
    func (th *vdsoTimehands) getHPETTimecounter() (uint32, bool) {
    	idx := int(th.x86_hpet_idx)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 25 19:53:03 UTC 2024
    - 1.9K bytes
    - Viewed (0)
  4. src/runtime/runtime.go

    //
    // Must not run concurrently with ticksPerSecond.
    func (t *ticksType) init() {
    	lock(&ticks.lock)
    	t.startTime = nanotime()
    	t.startTicks = cputicks()
    	unlock(&ticks.lock)
    }
    
    // minTimeForTicksPerSecond is the minimum elapsed time we require to consider our ticksPerSecond
    // measurement to be of decent enough quality for profiling.
    //
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:16:47 UTC 2024
    - 9.9K bytes
    - Viewed (0)
  5. src/runtime/os_wasm.go

    	throw("too many writes on closed pipe")
    }
    
    //go:linkname syscall_now syscall.now
    func syscall_now() (sec int64, nsec int32) {
    	sec, nsec, _ = time_now()
    	return
    }
    
    //go:nosplit
    func cputicks() int64 {
    	// runtime·nanotime() is a poor approximation of CPU ticks that is enough for the profiler.
    	return nanotime()
    }
    
    // gsignalStack is unused on js.
    type gsignalStack struct{}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 25 19:53:03 UTC 2024
    - 3.2K bytes
    - Viewed (0)
  6. src/runtime/sema.go

    	t0 := int64(0)
    	s.releasetime = 0
    	s.acquiretime = 0
    	s.ticket = 0
    	if profile&semaBlockProfile != 0 && blockprofilerate > 0 {
    		t0 = cputicks()
    		s.releasetime = -1
    	}
    	if profile&semaMutexProfile != 0 && mutexprofilerate > 0 {
    		if t0 == 0 {
    			t0 = cputicks()
    		}
    		s.acquiretime = t0
    	}
    	for {
    		lockWithRank(&root.lock, lockRankRoot)
    		// Add ourselves to nwait to disable "easy case" in semrelease.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 17:58:53 UTC 2024
    - 19K bytes
    - Viewed (0)
  7. src/runtime/chan.go

    	// chanrecv() and closechan() to update this thread's view of c.closed and full().
    	if !block && c.closed == 0 && full(c) {
    		return false
    	}
    
    	var t0 int64
    	if blockprofilerate > 0 {
    		t0 = cputicks()
    	}
    
    	lock(&c.lock)
    
    	if c.closed != 0 {
    		unlock(&c.lock)
    		panic(plainError("send on closed channel"))
    	}
    
    	if sg := c.recvq.dequeue(); sg != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:16:50 UTC 2024
    - 25.9K bytes
    - Viewed (0)
  8. src/runtime/metrics_test.go

    					// The test imposes a delay with usleep, verified with calls to
    					// nanotime. Compare against the runtime/metrics package's view
    					// (based on nanotime) rather than runtime/pprof's view (based
    					// on cputicks).
    					t.Errorf("runtime/metrics reported less than the known minimum contention duration (%fs < %fs)", have, want)
    				}
    			})
    			if have, want := n, int64(len(mus)); have != want {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 17:52:17 UTC 2024
    - 45K bytes
    - Viewed (0)
  9. src/runtime/select.go

    		pcs = pc1[:ncases:ncases]
    	}
    	casePC := func(casi int) uintptr {
    		if pcs == nil {
    			return 0
    		}
    		return pcs[casi]
    	}
    
    	var t0 int64
    	if blockprofilerate > 0 {
    		t0 = cputicks()
    	}
    
    	// The compiler rewrites selects that statically have
    	// only 0 or 1 cases plus default into simpler constructs.
    	// The only way we can end up with such small sel.ncase
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Mar 13 21:36:04 UTC 2024
    - 15K bytes
    - Viewed (0)
  10. src/runtime/debuglog.go

    // call with "if dlogEnabled".
    //
    //go:nosplit
    //go:nowritebarrierrec
    func dlog() *dlogger {
    	if !dlogEnabled {
    		return nil
    	}
    
    	// Get the time.
    	tick, nano := uint64(cputicks()), uint64(nanotime())
    
    	// Try to get a cached logger.
    	l := getCachedDlogger()
    
    	// If we couldn't get a cached logger, try to get one from the
    	// global pool.
    	if l == nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 15:10:48 UTC 2024
    - 18.3K bytes
    - Viewed (0)
Back to top