Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 45 for cputicks (0.19 sec)

  1. 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)
  2. 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)
  3. 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)
  4. 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)
  5. 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)
  6. 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)
  7. src/runtime/mprof.go

    	}
    
    	if rate > 0 && int64(cheaprand())%rate == 0 {
    		lt.tickStart = cputicks()
    	}
    }
    
    func (lt *lockTimer) end() {
    	gp := getg()
    
    	if lt.timeStart != 0 {
    		nowTime := nanotime()
    		gp.m.mLockProfile.waitTime.Add((nowTime - lt.timeStart) * lt.timeRate)
    	}
    
    	if lt.tickStart != 0 {
    		nowTick := cputicks()
    		gp.m.mLockProfile.recordLock(nowTick-lt.tickStart, lt.lock)
    	}
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 17:57:37 UTC 2024
    - 53.3K bytes
    - Viewed (0)
  8. src/runtime/asm_riscv64.s

    	CALL	runtime·mstart0(SB)
    	RET // not reached
    
    // void setg_gcc(G*); set g called from gcc with g in A0
    TEXT setg_gcc<>(SB),NOSPLIT,$0-0
    	MOV	A0, g
    	CALL	runtime·save_g(SB)
    	RET
    
    // func cputicks() int64
    TEXT runtime·cputicks(SB),NOSPLIT,$0-8
    	// RDTIME to emulate cpu ticks
    	// RDCYCLE reads counter that is per HART(core) based
    	// according to the riscv manual, see issue 46737
    	RDTIME	A0
    	MOV	A0, ret+0(FP)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Nov 09 13:57:06 UTC 2023
    - 27K bytes
    - Viewed (0)
  9. src/runtime/asm_loong64.s

    	BREAK
    	RET
    
    TEXT runtime·asminit(SB),NOSPLIT|NOFRAME,$0-0
    	RET
    
    TEXT runtime·mstart(SB),NOSPLIT|TOPFRAME,$0
    	JAL     runtime·mstart0(SB)
    	RET // not reached
    
    // func cputicks() int64
    TEXT runtime·cputicks(SB),NOSPLIT,$0-8
    	RDTIMED	R0, R4
    	MOVV	R4, ret+0(FP)
    	RET
    
    /*
     *  go-routine
     */
    
    // void gogo(Gobuf*)
    // restore state from Gobuf; longjmp
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 13 15:04:25 UTC 2024
    - 26.5K bytes
    - Viewed (0)
  10. src/runtime/asm_386.s

    	get_tls(CX)
    	MOVL	g(CX), AX
    	CMPL	(g_stack+stack_hi)(AX), SP
    	JHI	2(PC)
    	CALL	runtime·abort(SB)
    	CMPL	SP, (g_stack+stack_lo)(AX)
    	JHI	2(PC)
    	CALL	runtime·abort(SB)
    	RET
    
    // func cputicks() int64
    TEXT runtime·cputicks(SB),NOSPLIT,$0-8
    	// LFENCE/MFENCE instruction support is dependent on SSE2.
    	// When no SSE2 support is present do not enforce any serialization
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Mar 15 15:45:13 UTC 2024
    - 43.1K bytes
    - Viewed (0)
Back to top