Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for setThreadCPUProfiler (0.32 sec)

  1. src/runtime/os3_plan9.go

    }
    
    func sigenable(sig uint32) {
    }
    
    func sigdisable(sig uint32) {
    }
    
    func sigignore(sig uint32) {
    }
    
    func setProcessCPUProfiler(hz int32) {
    }
    
    func setThreadCPUProfiler(hz int32) {
    	// TODO: Enable profiling interrupts.
    	getg().m.profilehz = hz
    }
    
    // gsignalStack is unused on Plan 9.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 15:41:45 UTC 2024
    - 4K bytes
    - Viewed (0)
  2. src/runtime/cgocall.go

    	}
    
    	// Check whether the profiler needs to be turned on or off; this route to
    	// run Go code does not use runtime.execute, so bypasses the check there.
    	hz := sched.profilehz
    	if gp.m.profilehz != hz {
    		setThreadCPUProfiler(hz)
    	}
    
    	// Add entry to defer stack in case of panic.
    	restore := true
    	defer unwindm(&restore)
    
    	if raceenabled {
    		raceacquire(unsafe.Pointer(&racecgosync))
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:16:47 UTC 2024
    - 24.2K bytes
    - Viewed (0)
  3. 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)
  4. 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