1 write to _schedulingData
Microsoft.Build (1)
BackEnd\Components\Scheduler\Scheduler.cs (1)
541_schedulingData = new SchedulingData();
116 references to _schedulingData
Microsoft.Build (116)
BackEnd\Components\Scheduler\Scheduler.cs (116)
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); 1025return Comparer<int>.Default.Compare(_schedulingData.GetConfigurationsCountByNode(left, true /* excludeTraversals */, _configCache), _schedulingData.GetConfigurationsCountByNode(right, true /* excludeTraversals */, _configCache)); 1038TraceScheduler("System load limit reached, cannot schedule new work. Executing: {0} Yielding: {1} Max Count: {2}", _schedulingData.ExecutingRequestsCount, _schedulingData.YieldingRequestsCount, _componentHost.BuildParameters.MaxNodeCount); 1042foreach (SchedulableRequest request in _schedulingData.UnscheduledRequestsWhichCanBeScheduled) 1064while (idleNodes.Count > 0 && _schedulingData.UnscheduledRequestsCount > 0) 1070foreach (SchedulableRequest unscheduledRequest in _schedulingData.UnscheduledRequestsWhichCanBeScheduled) 1072int requiredNodeId = _schedulingData.GetAssignedNodeForRequestConfiguration(unscheduledRequest.BuildRequest.ConfigurationId); 1106while (idleNodes.Count > 0 && _schedulingData.UnscheduledRequestsCount > 0) 1112foreach (SchedulableRequest unscheduledRequest in _schedulingData.UnscheduledRequestsWhichCanBeScheduled) 1114int requiredNodeId = _schedulingData.GetAssignedNodeForRequestConfiguration(unscheduledRequest.BuildRequest.ConfigurationId); 1154foreach (SchedulableRequest currentSchedulableRequest in _schedulingData.UnscheduledRequestsWhichCanBeScheduled) 1157int requiredNodeId = _schedulingData.GetAssignedNodeForRequestConfiguration(currentRequest.ConfigurationId); 1229foreach (SchedulableRequest unscheduledRequest in _schedulingData.UnscheduledRequestsWhichCanBeScheduled) 1258TraceScheduler("System load limit reached, cannot schedule new work. Executing: {0} Yielding: {1} Max Count: {2}", _schedulingData.ExecutingRequestsCount, _schedulingData.YieldingRequestsCount, _componentHost.BuildParameters.MaxNodeCount); 1262foreach (SchedulableRequest unscheduledRequest in _schedulingData.UnscheduledRequestsWhichCanBeScheduled) 1299configurationCountsByNode[availableNodeId] = _schedulingData.GetConfigurationsCountByNode(availableNodeId, true /* excludeTraversals */, _configCache); 1322TraceScheduler("System load limit reached, cannot schedule new work. Executing: {0} Yielding: {1} Max Count: {2}", _schedulingData.ExecutingRequestsCount, _schedulingData.YieldingRequestsCount, _componentHost.BuildParameters.MaxNodeCount); 1326foreach (SchedulableRequest request in _schedulingData.UnscheduledRequestsWhichCanBeScheduled) 1330int requiredNodeId = _schedulingData.GetAssignedNodeForRequestConfiguration(request.BuildRequest.ConfigurationId); 1385if (request.IsProxyBuildRequest() && nodeId != InProcNodeId && _schedulingData.CanScheduleRequestToNode(request, InProcNodeId)) 1408int implicitlyGrantedCores = Math.Max(1, (_schedulingData.ExecutingRequestsCount * _nodeCoreAllocationWeight) / 100); 1411int explicitlyGrantedCores = _schedulingData.ExplicitlyGrantedCores; 1428if (_schedulingData.ExecutingRequestsCount >= _componentHost.BuildParameters.MaxNodeCount) 1442return _schedulingData.ExecutingRequestsCount + 1443_schedulingData.YieldingRequestsCount + 1444_schedulingData.ExplicitlyGrantedCores >= limit; 1452if (_schedulingData.CanScheduleRequestToNode(request, nodeId)) 1486int assignedNodeForConfiguration = _schedulingData.GetAssignedNodeForRequestConfiguration(request.BuildRequest.ConfigurationId); 1626SchedulableRequest blockingRequest = _schedulingData.GetScheduledRequest(blocker.BlockingRequestId); 1728int assignedNodeId = _schedulingData.GetAssignedNodeForRequestConfiguration(request.ConfigurationId); 1734if (_schedulingData.GetRequestsAssignedToConfigurationCount(request.ConfigurationId) == 0) 1737_schedulingData.UnassignNodeForRequestConfiguration(request.ConfigurationId); 1746else if (_schedulingData.GetRequestsAssignedToConfigurationCount(request.ConfigurationId) > 0) 1749foreach (SchedulableRequest existingRequest in _schedulingData.GetRequestsAssignedToConfiguration(request.ConfigurationId)) 1810SchedulableRequest blockingRequest = _schedulingData.CreateRequest(requestToAdd, parentRequest); 1825foreach (SchedulableRequest request in _schedulingData.GetReadyRequestsByNode(nodeId)) 1874if (!_schedulingData.IsNodeWorking(response.NodeId)) 1921TraceScheduler("System load limit reached, cannot resume any more work. Executing: {0} Yielding: {1} Max Count: {2}", _schedulingData.ExecutingRequestsCount, _schedulingData.YieldingRequestsCount, _componentHost.BuildParameters.MaxNodeCount); 1926if (_schedulingData.IsNodeWorking(nodeId)) 1937List<SchedulableRequest> unscheduledRequests = new List<SchedulableRequest>(_schedulingData.UnscheduledRequests); 2033SchedulableRequest parentRequest = _schedulingData.BlockedRequests.FirstOrDefault(r => r.BuildRequest.GlobalRequestId == request.ParentGlobalRequestId) 2034?? _schedulingData.ExecutingRequests.FirstOrDefault(r => r.BuildRequest.GlobalRequestId == request.ParentGlobalRequestId); 2130int nodeId = _schedulingData.GetAssignedNodeForRequestConfiguration(request.ConfigurationId); 2181if (_schedulingData.CanScheduleConfigurationToNode(request.ConfigurationId, InProcNodeId) && request.IsProxyBuildRequest()) 2258if (request.GlobalRequestId == BuildRequest.InvalidGlobalRequestId && _schedulingData.GetRequestsAssignedToConfigurationCount(request.ConfigurationId) > 0) 2260foreach (SchedulableRequest existingRequest in _schedulingData.GetRequestsAssignedToConfiguration(request.ConfigurationId)) 2332foreach (SchedulingData.SchedulingEvent buildEvent in _schedulingData.BuildEvents) 2537List<SchedulableRequest> childRequests = new List<SchedulableRequest>(_schedulingData.GetRequestsByHierarchy(request)); 2573file.Write("{0}({1})-{2}: ", Thread.CurrentThread.Name, Thread.CurrentThread.ManagedThreadId, _schedulingData.EventTime.Ticks); 2591if (_schedulingData != null) 2598file.WriteLine("Scheduler state at timestamp {0}:", _schedulingData.EventTime.Ticks); 2606_schedulingData.IsNodeWorking(nodeId) 2610_schedulingData.GetExecutingRequestByNode(nodeId) 2613_schedulingData.GetScheduledRequestsCountByNode(nodeId), 2614_schedulingData.GetConfigurationsCountByNode(nodeId, false, null)); 2616List<SchedulableRequest> scheduledRequestsByNode = new List<SchedulableRequest>(_schedulingData.GetScheduledRequestsByNode(nodeId)); 2625if (!_schedulingData.IsNodeWorking(nodeId)) 2675if (_schedulingData.UnscheduledRequestsCount == 0) 2683foreach (SchedulableRequest request in _schedulingData.UnscheduledRequests) 2706if (_schedulingData != null) 2715List<int> configurations = new List<int>(_schedulingData.Configurations); 2720file.WriteLine("Config {0} Node {1} TV: {2} File {3}", config, _schedulingData.GetAssignedNodeForRequestConfiguration(config), _configCache[config].ToolsVersion, _configCache[config].ProjectFullPath); 2746if (_schedulingData != null) 2771foreach (SchedulableRequest child in _schedulingData.GetRequestsByHierarchy(root)) 2813_schedulingData.GetAssignedNodeForRequestConfiguration(buildRequest.ConfigurationId), 2814_schedulingData.IsRequestScheduled(request) 2828SchedulingPlan plan = new SchedulingPlan(_configCache, _schedulingData); 2837_schedulingPlan = new SchedulingPlan(_configCache, _schedulingData);