Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 13 of 13 for setThreadCPUProfiler (0.29 sec)

  1. src/runtime/os_linux.go

    	}
    
    	// No active per-thread timer means the only valid profiler is setitimer.
    	return setitimer
    }
    
    func setProcessCPUProfiler(hz int32) {
    	setProcessCPUProfilerTimer(hz)
    }
    
    func setThreadCPUProfiler(hz int32) {
    	mp := getg().m
    	mp.profilehz = hz
    
    	// destroy any active timer
    	if mp.profileTimerValid.Load() {
    		timerid := mp.profileTimer
    		mp.profileTimerValid.Store(false)
    		mp.profileTimer = 0
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 25 19:53:03 UTC 2024
    - 25.9K bytes
    - Viewed (0)
  2. src/runtime/os_windows.go

    			timer = createHighResTimer()
    		} else {
    			timer = stdcall3(_CreateWaitableTimerA, 0, 0, 0)
    		}
    		atomic.Storeuintptr(&profiletimer, timer)
    		newm(profileLoop, nil, -1)
    	}
    }
    
    func setThreadCPUProfiler(hz int32) {
    	ms := int32(0)
    	due := ^int64(^uint64(1 << 63))
    	if hz > 0 {
    		ms = 1000 / hz
    		if ms == 0 {
    			ms = 1
    		}
    		due = int64(ms) * -10000
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 26 22:55:25 UTC 2024
    - 41.5K bytes
    - Viewed (0)
  3. src/runtime/proc.go

    	// it would deadlock.
    	setThreadCPUProfiler(0)
    
    	for !prof.signalLock.CompareAndSwap(0, 1) {
    		osyield()
    	}
    	if prof.hz.Load() != hz {
    		setProcessCPUProfiler(hz)
    		prof.hz.Store(hz)
    	}
    	prof.signalLock.Store(0)
    
    	lock(&sched.lock)
    	sched.profilehz = hz
    	unlock(&sched.lock)
    
    	if hz != 0 {
    		setThreadCPUProfiler(hz)
    	}
    
    	gp.m.locks--
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 17:58:53 UTC 2024
    - 207.5K bytes
    - Viewed (0)
Back to top