1 write to _schedulingData
Microsoft.Build (1)
BackEnd\Components\Scheduler\Scheduler.cs (1)
541_schedulingData = new SchedulingData();
115 references to _schedulingData
Microsoft.Build (115)
BackEnd\Components\Scheduler\Scheduler.cs (115)
268return _schedulingData.GetRequestsAssignedToConfigurationCount(configurationId) > 0; 291if (!_schedulingData.IsNodeWorking(nodeId)) 296SchedulableRequest request = _schedulingData.GetExecutingRequestByNode(nodeId); 305_schedulingData.EventTime = DateTime.UtcNow; 314parentRequest = _schedulingData.GetYieldingRequest(blocker.BlockedRequestId); 318parentRequest = _schedulingData.GetExecutingRequest(blocker.BlockedRequestId); 378_schedulingData.EventTime = DateTime.UtcNow; 394SchedulableRequest request = _schedulingData.GetExecutingRequest(result.GlobalRequestId); 434List<SchedulableRequest> unscheduledRequests = new List<SchedulableRequest>(_schedulingData.UnscheduledRequests); 488_schedulingData.EventTime = DateTime.UtcNow; 522_schedulingData.EventTime = DateTime.UtcNow; 527foreach (SchedulableRequest request in _schedulingData.GetScheduledRequestsByNode(nodeId)) 561foreach (SchedulableRequest request in _schedulingData.GetRequestsByHierarchy(null)) 588_schedulingData.GrantCoresToRequest(requestId, grantedCores); 612_schedulingData.RemoveCoresFromRequest(requestId, coresToRelease); 681if (_schedulingData.UnscheduledRequestsCount == 0 && 682_schedulingData.ReadyRequestsCount == 0 && 683_schedulingData.BlockedRequestsCount == 0) 685if (_schedulingData.ExecutingRequestsCount == 0 && _schedulingData.YieldingRequestsCount == 0) 705if (!_schedulingData.IsNodeWorking(availableNodeId)) 714if (idleNodes.Count > 0 && _schedulingData.UnscheduledRequestsCount > 0) 723if (_schedulingData.UnscheduledRequestsCount > 0 || responses.Count == 0) 725createNodePending = CreateNewNodeIfPossible(responses, _schedulingData.UnscheduledRequests); 731if (_schedulingData.ExecutingRequestsCount > 0 || _schedulingData.YieldingRequestsCount > 0) 735else if (_schedulingData.UnscheduledRequestsCount == 0 && 736_schedulingData.ReadyRequestsCount == 0 && 737_schedulingData.BlockedRequestsCount == 0) 742else if (_schedulingData.BlockedRequestsCount != 0) 753foreach (SchedulableRequest request in _schedulingData.BlockedRequests) 758ErrorUtilities.ThrowInternalError("Somehow no requests are currently executing, and at least one of the {0} requests blocked by in-progress requests is servicable by a currently existing node, but no circular dependency was detected ...", _schedulingData.BlockedRequestsCount); 765ErrorUtilities.ThrowInternalError("None of the {0} blocked requests can be serviced by currently existing nodes, but we aren't requesting a new one.", _schedulingData.BlockedRequestsCount); 768else if (_schedulingData.ReadyRequestsCount != 0) 771ErrorUtilities.ThrowInternalError("Somehow we have {0} requests which are ready to go but we didn't tell the nodes to continue.", _schedulingData.ReadyRequestsCount); 773else if (_schedulingData.UnscheduledRequestsCount != 0 && !createNodePending) 776ErrorUtilities.ThrowInternalError("Somehow we have {0} unassigned build requests but {1} of our nodes are free and we aren't requesting a new one...", _schedulingData.UnscheduledRequestsCount, idleNodes.Count); 784TraceScheduler("Requests scheduled: {0} Unassigned Requests: {1} Blocked Requests: {2} Unblockable Requests: {3} Free Nodes: {4}/{5} Responses: {6}", nodesFreeToDoWorkPriorToScheduling - idleNodes.Count, _schedulingData.UnscheduledRequestsCount, _schedulingData.BlockedRequestsCount, _schedulingData.ReadyRequestsCount, idleNodes.Count, _availableNodes.Count, responses.Count); 850_schedulingPlan = new SchedulingPlan(_configCache, _schedulingData); 851ReadSchedulingPlan(_schedulingData.GetRequestsByHierarchy(null).First().BuildRequest.SubmissionId); 942foreach (SchedulableRequest request in _schedulingData.UnscheduledRequestsWhichCanBeScheduled) 995List<SchedulableRequest> unscheduledRequests = new List<SchedulableRequest>(_schedulingData.UnscheduledRequestsWhichCanBeScheduled); 1023IEnumerable<int> nodesByConfigurationCountAscending = _availableNodes.Keys.OrderBy(x => _schedulingData.GetConfigurationsCountByNode(x, excludeTraversals: true, _configCache)); 1035TraceScheduler("System load limit reached, cannot schedule new work. Executing: {0} Yielding: {1} Max Count: {2}", _schedulingData.ExecutingRequestsCount, _schedulingData.YieldingRequestsCount, _componentHost.BuildParameters.MaxNodeCount); 1039foreach (SchedulableRequest request in _schedulingData.UnscheduledRequestsWhichCanBeScheduled) 1061while (idleNodes.Count > 0 && _schedulingData.UnscheduledRequestsCount > 0) 1067foreach (SchedulableRequest unscheduledRequest in _schedulingData.UnscheduledRequestsWhichCanBeScheduled) 1069int requiredNodeId = _schedulingData.GetAssignedNodeForRequestConfiguration(unscheduledRequest.BuildRequest.ConfigurationId); 1103while (idleNodes.Count > 0 && _schedulingData.UnscheduledRequestsCount > 0) 1109foreach (SchedulableRequest unscheduledRequest in _schedulingData.UnscheduledRequestsWhichCanBeScheduled) 1111int requiredNodeId = _schedulingData.GetAssignedNodeForRequestConfiguration(unscheduledRequest.BuildRequest.ConfigurationId); 1151foreach (SchedulableRequest currentSchedulableRequest in _schedulingData.UnscheduledRequestsWhichCanBeScheduled) 1154int requiredNodeId = _schedulingData.GetAssignedNodeForRequestConfiguration(currentRequest.ConfigurationId); 1226foreach (SchedulableRequest unscheduledRequest in _schedulingData.UnscheduledRequestsWhichCanBeScheduled) 1255TraceScheduler("System load limit reached, cannot schedule new work. Executing: {0} Yielding: {1} Max Count: {2}", _schedulingData.ExecutingRequestsCount, _schedulingData.YieldingRequestsCount, _componentHost.BuildParameters.MaxNodeCount); 1259foreach (SchedulableRequest unscheduledRequest in _schedulingData.UnscheduledRequestsWhichCanBeScheduled) 1296configurationCountsByNode[availableNodeId] = _schedulingData.GetConfigurationsCountByNode(availableNodeId, true /* excludeTraversals */, _configCache); 1319TraceScheduler("System load limit reached, cannot schedule new work. Executing: {0} Yielding: {1} Max Count: {2}", _schedulingData.ExecutingRequestsCount, _schedulingData.YieldingRequestsCount, _componentHost.BuildParameters.MaxNodeCount); 1323foreach (SchedulableRequest request in _schedulingData.UnscheduledRequestsWhichCanBeScheduled) 1327int requiredNodeId = _schedulingData.GetAssignedNodeForRequestConfiguration(request.BuildRequest.ConfigurationId); 1382if (request.IsProxyBuildRequest() && nodeId != InProcNodeId && _schedulingData.CanScheduleRequestToNode(request, InProcNodeId)) 1405int implicitlyGrantedCores = Math.Max(1, (_schedulingData.ExecutingRequestsCount * _nodeCoreAllocationWeight) / 100); 1408int explicitlyGrantedCores = _schedulingData.ExplicitlyGrantedCores; 1425if (_schedulingData.ExecutingRequestsCount >= _componentHost.BuildParameters.MaxNodeCount) 1439return _schedulingData.ExecutingRequestsCount + 1440_schedulingData.YieldingRequestsCount + 1441_schedulingData.ExplicitlyGrantedCores >= limit; 1449if (_schedulingData.CanScheduleRequestToNode(request, nodeId)) 1483int assignedNodeForConfiguration = _schedulingData.GetAssignedNodeForRequestConfiguration(request.BuildRequest.ConfigurationId); 1623SchedulableRequest blockingRequest = _schedulingData.GetScheduledRequest(blocker.BlockingRequestId); 1725int assignedNodeId = _schedulingData.GetAssignedNodeForRequestConfiguration(request.ConfigurationId); 1731if (_schedulingData.GetRequestsAssignedToConfigurationCount(request.ConfigurationId) == 0) 1734_schedulingData.UnassignNodeForRequestConfiguration(request.ConfigurationId); 1743else if (_schedulingData.GetRequestsAssignedToConfigurationCount(request.ConfigurationId) > 0) 1746foreach (SchedulableRequest existingRequest in _schedulingData.GetRequestsAssignedToConfiguration(request.ConfigurationId)) 1807SchedulableRequest blockingRequest = _schedulingData.CreateRequest(requestToAdd, parentRequest); 1822foreach (SchedulableRequest request in _schedulingData.GetReadyRequestsByNode(nodeId)) 1871if (!_schedulingData.IsNodeWorking(response.NodeId)) 1918TraceScheduler("System load limit reached, cannot resume any more work. Executing: {0} Yielding: {1} Max Count: {2}", _schedulingData.ExecutingRequestsCount, _schedulingData.YieldingRequestsCount, _componentHost.BuildParameters.MaxNodeCount); 1923if (_schedulingData.IsNodeWorking(nodeId)) 1934List<SchedulableRequest> unscheduledRequests = new List<SchedulableRequest>(_schedulingData.UnscheduledRequests); 2030SchedulableRequest parentRequest = _schedulingData.BlockedRequests.FirstOrDefault(r => r.BuildRequest.GlobalRequestId == request.ParentGlobalRequestId) 2031?? _schedulingData.ExecutingRequests.FirstOrDefault(r => r.BuildRequest.GlobalRequestId == request.ParentGlobalRequestId); 2127int nodeId = _schedulingData.GetAssignedNodeForRequestConfiguration(request.ConfigurationId); 2178if (_schedulingData.CanScheduleConfigurationToNode(request.ConfigurationId, InProcNodeId) && request.IsProxyBuildRequest()) 2255if (request.GlobalRequestId == BuildRequest.InvalidGlobalRequestId && _schedulingData.GetRequestsAssignedToConfigurationCount(request.ConfigurationId) > 0) 2257foreach (SchedulableRequest existingRequest in _schedulingData.GetRequestsAssignedToConfiguration(request.ConfigurationId)) 2329foreach (SchedulingData.SchedulingEvent buildEvent in _schedulingData.BuildEvents) 2534List<SchedulableRequest> childRequests = new List<SchedulableRequest>(_schedulingData.GetRequestsByHierarchy(request)); 2570file.Write("{0}({1})-{2}: ", Thread.CurrentThread.Name, Thread.CurrentThread.ManagedThreadId, _schedulingData.EventTime.Ticks); 2588if (_schedulingData != null) 2595file.WriteLine("Scheduler state at timestamp {0}:", _schedulingData.EventTime.Ticks); 2603_schedulingData.IsNodeWorking(nodeId) 2607_schedulingData.GetExecutingRequestByNode(nodeId) 2610_schedulingData.GetScheduledRequestsCountByNode(nodeId), 2611_schedulingData.GetConfigurationsCountByNode(nodeId, false, null)); 2613List<SchedulableRequest> scheduledRequestsByNode = new List<SchedulableRequest>(_schedulingData.GetScheduledRequestsByNode(nodeId)); 2622if (!_schedulingData.IsNodeWorking(nodeId)) 2672if (_schedulingData.UnscheduledRequestsCount == 0) 2680foreach (SchedulableRequest request in _schedulingData.UnscheduledRequests) 2703if (_schedulingData != null) 2712List<int> configurations = new List<int>(_schedulingData.Configurations); 2717file.WriteLine("Config {0} Node {1} TV: {2} File {3}", config, _schedulingData.GetAssignedNodeForRequestConfiguration(config), _configCache[config].ToolsVersion, _configCache[config].ProjectFullPath); 2743if (_schedulingData != null) 2768foreach (SchedulableRequest child in _schedulingData.GetRequestsByHierarchy(root)) 2810_schedulingData.GetAssignedNodeForRequestConfiguration(buildRequest.ConfigurationId), 2811_schedulingData.IsRequestScheduled(request) 2825SchedulingPlan plan = new SchedulingPlan(_configCache, _schedulingData); 2834_schedulingPlan = new SchedulingPlan(_configCache, _schedulingData);