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)
268
return
_schedulingData
.GetRequestsAssignedToConfigurationCount(configurationId) > 0;
291
if (!
_schedulingData
.IsNodeWorking(nodeId))
296
SchedulableRequest request =
_schedulingData
.GetExecutingRequestByNode(nodeId);
305
_schedulingData
.EventTime = DateTime.UtcNow;
314
parentRequest =
_schedulingData
.GetYieldingRequest(blocker.BlockedRequestId);
318
parentRequest =
_schedulingData
.GetExecutingRequest(blocker.BlockedRequestId);
378
_schedulingData
.EventTime = DateTime.UtcNow;
394
SchedulableRequest request =
_schedulingData
.GetExecutingRequest(result.GlobalRequestId);
434
List<SchedulableRequest> unscheduledRequests = new List<SchedulableRequest>(
_schedulingData
.UnscheduledRequests);
488
_schedulingData
.EventTime = DateTime.UtcNow;
522
_schedulingData
.EventTime = DateTime.UtcNow;
527
foreach (SchedulableRequest request in
_schedulingData
.GetScheduledRequestsByNode(nodeId))
561
foreach (SchedulableRequest request in
_schedulingData
.GetRequestsByHierarchy(null))
588
_schedulingData
.GrantCoresToRequest(requestId, grantedCores);
612
_schedulingData
.RemoveCoresFromRequest(requestId, coresToRelease);
681
if (
_schedulingData
.UnscheduledRequestsCount == 0 &&
682
_schedulingData
.ReadyRequestsCount == 0 &&
683
_schedulingData
.BlockedRequestsCount == 0)
685
if (
_schedulingData
.ExecutingRequestsCount == 0 &&
_schedulingData
.YieldingRequestsCount == 0)
705
if (!
_schedulingData
.IsNodeWorking(availableNodeId))
714
if (idleNodes.Count > 0 &&
_schedulingData
.UnscheduledRequestsCount > 0)
723
if (
_schedulingData
.UnscheduledRequestsCount > 0 || responses.Count == 0)
725
createNodePending = CreateNewNodeIfPossible(responses,
_schedulingData
.UnscheduledRequests);
731
if (
_schedulingData
.ExecutingRequestsCount > 0 ||
_schedulingData
.YieldingRequestsCount > 0)
735
else if (
_schedulingData
.UnscheduledRequestsCount == 0 &&
736
_schedulingData
.ReadyRequestsCount == 0 &&
737
_schedulingData
.BlockedRequestsCount == 0)
742
else if (
_schedulingData
.BlockedRequestsCount != 0)
753
foreach (SchedulableRequest request in
_schedulingData
.BlockedRequests)
758
ErrorUtilities.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);
765
ErrorUtilities.ThrowInternalError("None of the {0} blocked requests can be serviced by currently existing nodes, but we aren't requesting a new one.",
_schedulingData
.BlockedRequestsCount);
768
else if (
_schedulingData
.ReadyRequestsCount != 0)
771
ErrorUtilities.ThrowInternalError("Somehow we have {0} requests which are ready to go but we didn't tell the nodes to continue.",
_schedulingData
.ReadyRequestsCount);
773
else if (
_schedulingData
.UnscheduledRequestsCount != 0 && !createNodePending)
776
ErrorUtilities.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);
784
TraceScheduler("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
);
851
ReadSchedulingPlan(
_schedulingData
.GetRequestsByHierarchy(null).First().BuildRequest.SubmissionId);
942
foreach (SchedulableRequest request in
_schedulingData
.UnscheduledRequestsWhichCanBeScheduled)
995
List<SchedulableRequest> unscheduledRequests = new List<SchedulableRequest>(
_schedulingData
.UnscheduledRequestsWhichCanBeScheduled);
1025
return Comparer<int>.Default.Compare(
_schedulingData
.GetConfigurationsCountByNode(left, true /* excludeTraversals */, _configCache),
_schedulingData
.GetConfigurationsCountByNode(right, true /* excludeTraversals */, _configCache));
1038
TraceScheduler("System load limit reached, cannot schedule new work. Executing: {0} Yielding: {1} Max Count: {2}",
_schedulingData
.ExecutingRequestsCount,
_schedulingData
.YieldingRequestsCount, _componentHost.BuildParameters.MaxNodeCount);
1042
foreach (SchedulableRequest request in
_schedulingData
.UnscheduledRequestsWhichCanBeScheduled)
1064
while (idleNodes.Count > 0 &&
_schedulingData
.UnscheduledRequestsCount > 0)
1070
foreach (SchedulableRequest unscheduledRequest in
_schedulingData
.UnscheduledRequestsWhichCanBeScheduled)
1072
int requiredNodeId =
_schedulingData
.GetAssignedNodeForRequestConfiguration(unscheduledRequest.BuildRequest.ConfigurationId);
1106
while (idleNodes.Count > 0 &&
_schedulingData
.UnscheduledRequestsCount > 0)
1112
foreach (SchedulableRequest unscheduledRequest in
_schedulingData
.UnscheduledRequestsWhichCanBeScheduled)
1114
int requiredNodeId =
_schedulingData
.GetAssignedNodeForRequestConfiguration(unscheduledRequest.BuildRequest.ConfigurationId);
1154
foreach (SchedulableRequest currentSchedulableRequest in
_schedulingData
.UnscheduledRequestsWhichCanBeScheduled)
1157
int requiredNodeId =
_schedulingData
.GetAssignedNodeForRequestConfiguration(currentRequest.ConfigurationId);
1229
foreach (SchedulableRequest unscheduledRequest in
_schedulingData
.UnscheduledRequestsWhichCanBeScheduled)
1258
TraceScheduler("System load limit reached, cannot schedule new work. Executing: {0} Yielding: {1} Max Count: {2}",
_schedulingData
.ExecutingRequestsCount,
_schedulingData
.YieldingRequestsCount, _componentHost.BuildParameters.MaxNodeCount);
1262
foreach (SchedulableRequest unscheduledRequest in
_schedulingData
.UnscheduledRequestsWhichCanBeScheduled)
1299
configurationCountsByNode[availableNodeId] =
_schedulingData
.GetConfigurationsCountByNode(availableNodeId, true /* excludeTraversals */, _configCache);
1322
TraceScheduler("System load limit reached, cannot schedule new work. Executing: {0} Yielding: {1} Max Count: {2}",
_schedulingData
.ExecutingRequestsCount,
_schedulingData
.YieldingRequestsCount, _componentHost.BuildParameters.MaxNodeCount);
1326
foreach (SchedulableRequest request in
_schedulingData
.UnscheduledRequestsWhichCanBeScheduled)
1330
int requiredNodeId =
_schedulingData
.GetAssignedNodeForRequestConfiguration(request.BuildRequest.ConfigurationId);
1385
if (request.IsProxyBuildRequest() && nodeId != InProcNodeId &&
_schedulingData
.CanScheduleRequestToNode(request, InProcNodeId))
1408
int implicitlyGrantedCores = Math.Max(1, (
_schedulingData
.ExecutingRequestsCount * _nodeCoreAllocationWeight) / 100);
1411
int explicitlyGrantedCores =
_schedulingData
.ExplicitlyGrantedCores;
1428
if (
_schedulingData
.ExecutingRequestsCount >= _componentHost.BuildParameters.MaxNodeCount)
1442
return
_schedulingData
.ExecutingRequestsCount +
1443
_schedulingData
.YieldingRequestsCount +
1444
_schedulingData
.ExplicitlyGrantedCores >= limit;
1452
if (
_schedulingData
.CanScheduleRequestToNode(request, nodeId))
1486
int assignedNodeForConfiguration =
_schedulingData
.GetAssignedNodeForRequestConfiguration(request.BuildRequest.ConfigurationId);
1626
SchedulableRequest blockingRequest =
_schedulingData
.GetScheduledRequest(blocker.BlockingRequestId);
1728
int assignedNodeId =
_schedulingData
.GetAssignedNodeForRequestConfiguration(request.ConfigurationId);
1734
if (
_schedulingData
.GetRequestsAssignedToConfigurationCount(request.ConfigurationId) == 0)
1737
_schedulingData
.UnassignNodeForRequestConfiguration(request.ConfigurationId);
1746
else if (
_schedulingData
.GetRequestsAssignedToConfigurationCount(request.ConfigurationId) > 0)
1749
foreach (SchedulableRequest existingRequest in
_schedulingData
.GetRequestsAssignedToConfiguration(request.ConfigurationId))
1810
SchedulableRequest blockingRequest =
_schedulingData
.CreateRequest(requestToAdd, parentRequest);
1825
foreach (SchedulableRequest request in
_schedulingData
.GetReadyRequestsByNode(nodeId))
1874
if (!
_schedulingData
.IsNodeWorking(response.NodeId))
1921
TraceScheduler("System load limit reached, cannot resume any more work. Executing: {0} Yielding: {1} Max Count: {2}",
_schedulingData
.ExecutingRequestsCount,
_schedulingData
.YieldingRequestsCount, _componentHost.BuildParameters.MaxNodeCount);
1926
if (
_schedulingData
.IsNodeWorking(nodeId))
1937
List<SchedulableRequest> unscheduledRequests = new List<SchedulableRequest>(
_schedulingData
.UnscheduledRequests);
2033
SchedulableRequest parentRequest =
_schedulingData
.BlockedRequests.FirstOrDefault(r => r.BuildRequest.GlobalRequestId == request.ParentGlobalRequestId)
2034
??
_schedulingData
.ExecutingRequests.FirstOrDefault(r => r.BuildRequest.GlobalRequestId == request.ParentGlobalRequestId);
2130
int nodeId =
_schedulingData
.GetAssignedNodeForRequestConfiguration(request.ConfigurationId);
2181
if (
_schedulingData
.CanScheduleConfigurationToNode(request.ConfigurationId, InProcNodeId) && request.IsProxyBuildRequest())
2258
if (request.GlobalRequestId == BuildRequest.InvalidGlobalRequestId &&
_schedulingData
.GetRequestsAssignedToConfigurationCount(request.ConfigurationId) > 0)
2260
foreach (SchedulableRequest existingRequest in
_schedulingData
.GetRequestsAssignedToConfiguration(request.ConfigurationId))
2332
foreach (SchedulingData.SchedulingEvent buildEvent in
_schedulingData
.BuildEvents)
2537
List<SchedulableRequest> childRequests = new List<SchedulableRequest>(
_schedulingData
.GetRequestsByHierarchy(request));
2573
file.Write("{0}({1})-{2}: ", Thread.CurrentThread.Name, Thread.CurrentThread.ManagedThreadId,
_schedulingData
.EventTime.Ticks);
2591
if (
_schedulingData
!= null)
2598
file.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));
2616
List<SchedulableRequest> scheduledRequestsByNode = new List<SchedulableRequest>(
_schedulingData
.GetScheduledRequestsByNode(nodeId));
2625
if (!
_schedulingData
.IsNodeWorking(nodeId))
2675
if (
_schedulingData
.UnscheduledRequestsCount == 0)
2683
foreach (SchedulableRequest request in
_schedulingData
.UnscheduledRequests)
2706
if (
_schedulingData
!= null)
2715
List<int> configurations = new List<int>(
_schedulingData
.Configurations);
2720
file.WriteLine("Config {0} Node {1} TV: {2} File {3}", config,
_schedulingData
.GetAssignedNodeForRequestConfiguration(config), _configCache[config].ToolsVersion, _configCache[config].ProjectFullPath);
2746
if (
_schedulingData
!= null)
2771
foreach (SchedulableRequest child in
_schedulingData
.GetRequestsByHierarchy(root))
2813
_schedulingData
.GetAssignedNodeForRequestConfiguration(buildRequest.ConfigurationId),
2814
_schedulingData
.IsRequestScheduled(request)
2828
SchedulingPlan plan = new SchedulingPlan(_configCache,
_schedulingData
);
2837
_schedulingPlan = new SchedulingPlan(_configCache,
_schedulingData
);