1 instantiation of SchedulableRequest
Microsoft.Build (1)
BackEnd\Components\Scheduler\SchedulingData.cs (1)
269
SchedulableRequest request = new
SchedulableRequest
(this, buildRequest, parent);
206 references to SchedulableRequest
Microsoft.Build (206)
BackEnd\Components\Scheduler\SchedulableRequest.cs (36)
86
private
SchedulableRequest
_parent;
97
private Dictionary<BlockingRequestKey,
SchedulableRequest
> _requestsWeAreBlockedBy;
102
private HashSet<
SchedulableRequest
> _requestsWeAreBlocking;
127
public SchedulableRequest(SchedulingData collection, BuildRequest request,
SchedulableRequest
parent)
137
_requestsWeAreBlockedBy = new Dictionary<BlockingRequestKey,
SchedulableRequest
>();
138
_requestsWeAreBlocking = new HashSet<
SchedulableRequest
>();
170
public
SchedulableRequest
Parent
214
public IEnumerable<
SchedulableRequest
> RequestsWeAreBlockedBy
236
public IEnumerable<
SchedulableRequest
> RequestsWeAreBlocking
335
public void BlockByRequest(
SchedulableRequest
blockingRequest, string[] activeTargets, string blockingTarget = null)
424
List<
SchedulableRequest
> requestsToUnblock = new List<
SchedulableRequest
>(_requestsWeAreBlocking);
425
foreach (
SchedulableRequest
requestWeAreBlocking in requestsToUnblock)
498
private void DetectCircularDependency(
SchedulableRequest
blockingRequest)
515
private void DetectIndirectCircularDependency(
SchedulableRequest
blockingRequest)
519
SchedulableRequest
alternateRequest = _schedulingData.GetBlockedRequestIfAny(blockingRequest.BuildRequest.GlobalRequestId);
525
Stack<
SchedulableRequest
> requestsToEvaluate = new Stack<
SchedulableRequest
>(16);
526
HashSet<
SchedulableRequest
> evaluatedRequests = new HashSet<
SchedulableRequest
>();
531
SchedulableRequest
requestToEvaluate = requestsToEvaluate.Pop();
555
foreach (
SchedulableRequest
childRequest in requestToEvaluate.RequestsWeAreBlockedBy)
568
private void ThrowIndirectCircularDependency(
SchedulableRequest
blockingRequest,
SchedulableRequest
requestToEvaluate)
572
List<
SchedulableRequest
> ancestors = new List<
SchedulableRequest
>(16);
586
private void DetectDirectCircularDependency(
SchedulableRequest
blockingRequest)
590
List<
SchedulableRequest
> ancestors = new List<
SchedulableRequest
>(16);
591
SchedulableRequest
currentRequest = this;
609
private void CleanupForCircularDependencyAndThrow(
SchedulableRequest
requestCausingFailure, List<
SchedulableRequest
> ancestors)
613
List<
SchedulableRequest
> tempRequests = new List<
SchedulableRequest
>(_requestsWeAreBlockedBy.Values);
614
foreach (
SchedulableRequest
requestWeAreBlockedBy in tempRequests)
641
ErrorUtilities.VerifyThrow(_requestsWeAreBlockedBy.TryGetValue(blockingRequestKey, out
SchedulableRequest
unblockingRequest), "We are not blocked by the specified request.");
BackEnd\Components\Scheduler\Scheduler.cs (77)
296
SchedulableRequest
request = _schedulingData.GetExecutingRequestByNode(nodeId);
309
SchedulableRequest
parentRequest = null;
394
SchedulableRequest
request = _schedulingData.GetExecutingRequest(result.GlobalRequestId);
434
List<
SchedulableRequest
> unscheduledRequests = new List<
SchedulableRequest
>(_schedulingData.UnscheduledRequests);
435
foreach (
SchedulableRequest
unscheduledRequest in unscheduledRequests)
527
foreach (
SchedulableRequest
request in _schedulingData.GetScheduledRequestsByNode(nodeId))
561
foreach (
SchedulableRequest
request in _schedulingData.GetRequestsByHierarchy(null))
658
private void HandleYieldAction(
SchedulableRequest
parentRequest, BuildRequestBlocker blocker)
753
foreach (
SchedulableRequest
request in _schedulingData.BlockedRequests)
939
SchedulableRequest
bestRequest = null;
942
foreach (
SchedulableRequest
request in _schedulingData.UnscheduledRequestsWhichCanBeScheduled)
991
private void AssignUnscheduledRequestsToInProcNode(List<ScheduleResponse> responses, HashSet<int> idleNodes, Func<
SchedulableRequest
, bool> shouldBeScheduled)
995
List<
SchedulableRequest
> unscheduledRequests = new List<
SchedulableRequest
>(_schedulingData.UnscheduledRequestsWhichCanBeScheduled);
996
foreach (
SchedulableRequest
request in unscheduledRequests)
1042
foreach (
SchedulableRequest
request in _schedulingData.UnscheduledRequestsWhichCanBeScheduled)
1066
SchedulableRequest
requestWithSmallestSourceFile = null;
1070
foreach (
SchedulableRequest
unscheduledRequest in _schedulingData.UnscheduledRequestsWhichCanBeScheduled)
1108
SchedulableRequest
requestWithLargestSourceFile = null;
1112
foreach (
SchedulableRequest
unscheduledRequest in _schedulingData.UnscheduledRequestsWhichCanBeScheduled)
1151
SchedulableRequest
requestToSchedule = null;
1152
SchedulableRequest
requestToScheduleNoAffinity = null;
1153
SchedulableRequest
requestToScheduleWithAffinity = null;
1154
foreach (
SchedulableRequest
currentSchedulableRequest in _schedulingData.UnscheduledRequestsWhichCanBeScheduled)
1228
SchedulableRequest
mostWaitingRequests = null;
1229
foreach (
SchedulableRequest
unscheduledRequest in _schedulingData.UnscheduledRequestsWhichCanBeScheduled)
1262
foreach (
SchedulableRequest
unscheduledRequest in _schedulingData.UnscheduledRequestsWhichCanBeScheduled)
1326
foreach (
SchedulableRequest
request in _schedulingData.UnscheduledRequestsWhichCanBeScheduled)
1355
private void AssignUnscheduledRequestToNode(
SchedulableRequest
request, int nodeId, List<ScheduleResponse> responses)
1450
private bool CanScheduleRequestToNode(
SchedulableRequest
request, int nodeId)
1474
private bool CreateNewNodeIfPossible(List<ScheduleResponse> responses, IEnumerable<
SchedulableRequest
> requests)
1484
foreach (
SchedulableRequest
request in requests)
1606
private void MarkRequestAborted(
SchedulableRequest
request)
1611
foreach (
SchedulableRequest
blockedRequest in request.RequestsWeAreBlocking)
1620
private void HandleRequestBlockedOnInProgressTarget(
SchedulableRequest
blockedRequest, BuildRequestBlocker blocker)
1626
SchedulableRequest
blockingRequest = _schedulingData.GetScheduledRequest(blocker.BlockingRequestId);
1651
private void HandleRequestBlockedOnResultsTransfer(
SchedulableRequest
parentRequest, List<ScheduleResponse> responses)
1679
private void HandleRequestBlockedByNewRequests(
SchedulableRequest
parentRequest, BuildRequestBlocker blocker, List<ScheduleResponse> responses)
1749
foreach (
SchedulableRequest
existingRequest in _schedulingData.GetRequestsAssignedToConfiguration(request.ConfigurationId))
1810
SchedulableRequest
blockingRequest = _schedulingData.CreateRequest(requestToAdd, parentRequest);
1825
foreach (
SchedulableRequest
request in _schedulingData.GetReadyRequestsByNode(nodeId))
1842
private void ResolveRequestFromCacheAndResumeIfPossible(
SchedulableRequest
request, List<ScheduleResponse> responses)
1937
List<
SchedulableRequest
> unscheduledRequests = new List<
SchedulableRequest
>(_schedulingData.UnscheduledRequests);
1938
foreach (
SchedulableRequest
request in unscheduledRequests)
2033
SchedulableRequest
parentRequest = _schedulingData.BlockedRequests.FirstOrDefault(r => r.BuildRequest.GlobalRequestId == request.ParentGlobalRequestId)
2145
private int ComputeClosureOfWaitingRequests(
SchedulableRequest
request)
2152
foreach (
SchedulableRequest
waitingRequest in request.RequestsWeAreBlocking)
2214
private bool RequestOrAnyItIsBlockedByCanBeServiced(
SchedulableRequest
request)
2218
foreach (
SchedulableRequest
requestWeAreBlockedBy in request.RequestsWeAreBlockedBy)
2260
foreach (
SchedulableRequest
existingRequest in _schedulingData.GetRequestsAssignedToConfiguration(request.ConfigurationId))
2500
private void WriteRecursiveSummary(ILoggingService loggingService, BuildEventContext context, int submissionId,
SchedulableRequest
request, int level, bool useConfigurations, bool isLastChild)
2537
List<
SchedulableRequest
> childRequests = new List<
SchedulableRequest
>(_schedulingData.GetRequestsByHierarchy(request));
2538
childRequests.Sort(delegate (
SchedulableRequest
left,
SchedulableRequest
right)
2554
SchedulableRequest
childRequest = childRequests[i];
2616
List<
SchedulableRequest
> scheduledRequestsByNode = new List<
SchedulableRequest
>(_schedulingData.GetScheduledRequestsByNode(nodeId));
2618
foreach (
SchedulableRequest
request in scheduledRequestsByNode)
2636
Queue<
SchedulableRequest
> blockingRequests = new Queue<
SchedulableRequest
>();
2637
HashSet<
SchedulableRequest
> topLevelBlockingRequests = new HashSet<
SchedulableRequest
>();
2638
foreach (
SchedulableRequest
request in scheduledRequestsByNode)
2642
foreach (
SchedulableRequest
blockingRequest in request.RequestsWeAreBlockedBy)
2651
SchedulableRequest
request = blockingRequests.Dequeue();
2655
foreach (
SchedulableRequest
blockingRequest in request.RequestsWeAreBlockedBy)
2666
foreach (
SchedulableRequest
request in topLevelBlockingRequests)
2683
foreach (
SchedulableRequest
request in _schedulingData.UnscheduledRequests)
2769
private void DumpRequestHierarchy(StreamWriter file,
SchedulableRequest
root, int indent)
2771
foreach (
SchedulableRequest
child in _schedulingData.GetRequestsByHierarchy(root))
2781
private void DumpRequestState(StreamWriter file,
SchedulableRequest
request, int indent)
2786
foreach (
SchedulableRequest
blockingRequest in request.RequestsWeAreBlockedBy)
2794
foreach (
SchedulableRequest
blockedRequest in request.RequestsWeAreBlocking)
2804
private void DumpRequestSpec(StreamWriter file,
SchedulableRequest
request, int indent, string prefix)
BackEnd\Components\Scheduler\SchedulerCircularDependencyException.cs (3)
23
private IList<
SchedulableRequest
> _ancestors;
33
public SchedulerCircularDependencyException(BuildRequest request, IList<
SchedulableRequest
> ancestors)
47
public IEnumerable<
SchedulableRequest
> Ancestors
BackEnd\Components\Scheduler\SchedulingData.cs (80)
24
private readonly Dictionary<int,
SchedulableRequest
> _executingRequests = new Dictionary<int,
SchedulableRequest
>(32);
29
private readonly Dictionary<int,
SchedulableRequest
> _blockedRequests = new Dictionary<int,
SchedulableRequest
>(32);
34
private readonly Dictionary<int,
SchedulableRequest
> _yieldingRequests = new Dictionary<int,
SchedulableRequest
>(32);
39
private readonly Dictionary<int,
SchedulableRequest
> _readyRequests = new Dictionary<int,
SchedulableRequest
>(32);
44
private readonly LinkedList<
SchedulableRequest
> _unscheduledRequests = new LinkedList<
SchedulableRequest
>();
50
private readonly Dictionary<
SchedulableRequest
, LinkedListNode<
SchedulableRequest
>> _unscheduledRequestNodesByRequest = new Dictionary<
SchedulableRequest
, LinkedListNode<
SchedulableRequest
>>(32);
59
private readonly Dictionary<int, HashSet<
SchedulableRequest
>> _scheduledRequestsByNode = new Dictionary<int, HashSet<
SchedulableRequest
>>(32);
64
private readonly Dictionary<int,
SchedulableRequest
> _executingRequestByNode = new Dictionary<int,
SchedulableRequest
>(32);
69
private readonly Dictionary<int, HashSet<
SchedulableRequest
>> _readyRequestsByNode = new Dictionary<int, HashSet<
SchedulableRequest
>>(32);
87
private readonly Dictionary<int, HashSet<
SchedulableRequest
>> _configurationToRequests = new Dictionary<int, HashSet<
SchedulableRequest
>>(32);
105
private readonly Dictionary<
SchedulableRequest
, List<
SchedulableRequest
>> _buildHierarchy = new Dictionary<
SchedulableRequest
, List<
SchedulableRequest
>>(32);
137
public IEnumerable<
SchedulableRequest
> ExecutingRequests
153
public IEnumerable<
SchedulableRequest
> ReadyRequests
177
public IEnumerable<
SchedulableRequest
> BlockedRequests
193
public IEnumerable<
SchedulableRequest
> YieldingRequests
209
public IEnumerable<
SchedulableRequest
> UnscheduledRequests
225
public IEnumerable<
SchedulableRequest
> UnscheduledRequestsWhichCanBeScheduled
229
foreach (
SchedulableRequest
request in _unscheduledRequests)
267
public
SchedulableRequest
CreateRequest(BuildRequest buildRequest,
SchedulableRequest
parent)
269
SchedulableRequest
request = new SchedulableRequest(this, buildRequest, parent);
272
LinkedListNode<
SchedulableRequest
> requestNode = _unscheduledRequests.AddFirst(request);
276
HashSet<
SchedulableRequest
> requests;
279
requests = new HashSet<
SchedulableRequest
>();
288
_buildHierarchy[request] = new List<
SchedulableRequest
>(8);
303
public void UpdateFromState(
SchedulableRequest
request, SchedulableRequestState previousState)
331
LinkedListNode<
SchedulableRequest
> requestNode = _unscheduledRequestNodesByRequest[request];
338
HashSet<
SchedulableRequest
> requestsAssignedToNode;
341
requestsAssignedToNode = new HashSet<
SchedulableRequest
>();
407
HashSet<
SchedulableRequest
> readyRequestsOnNode;
410
readyRequestsOnNode = new HashSet<
SchedulableRequest
>();
429
public IEnumerable<
SchedulableRequest
> GetRequestsAssignedToConfiguration(int configurationId)
439
HashSet<
SchedulableRequest
> requests;
451
public
SchedulableRequest
GetExecutingRequest(int globalRequestId)
460
public
SchedulableRequest
GetBlockedRequest(int globalRequestId)
469
public
SchedulableRequest
GetBlockedRequestIfAny(int globalRequestId)
471
SchedulableRequest
request;
483
public
SchedulableRequest
GetYieldingRequest(int globalRequestId)
492
public
SchedulableRequest
GetReadyRequest(int globalRequestId)
501
public
SchedulableRequest
GetScheduledRequest(int globalRequestId)
503
SchedulableRequest
returnValue = InternalGetScheduledRequestByGlobalRequestId(globalRequestId);
513
SchedulableRequest
request;
552
public
SchedulableRequest
GetExecutingRequestByNode(int nodeId)
560
public bool IsRequestScheduled(
SchedulableRequest
request)
570
HashSet<
SchedulableRequest
> requests;
582
public IEnumerable<
SchedulableRequest
> GetScheduledRequestsByNode(int nodeId)
584
HashSet<
SchedulableRequest
> requests;
587
return ReadOnlyEmptyCollection<
SchedulableRequest
>.Instance;
596
public IEnumerable<
SchedulableRequest
> GetReadyRequestsByNode(int nodeId)
598
HashSet<
SchedulableRequest
> requests;
601
return ReadOnlyEmptyCollection<
SchedulableRequest
>.Instance;
611
public IEnumerable<
SchedulableRequest
> GetRequestsByHierarchy(
SchedulableRequest
root)
616
List<
SchedulableRequest
> roots = new List<
SchedulableRequest
>();
617
foreach (
SchedulableRequest
key in _buildHierarchy.Keys)
649
public bool CanScheduleRequestToNode(
SchedulableRequest
request, int nodeId)
666
SchedulableRequest
request = GetScheduledRequest(globalRequestId);
679
SchedulableRequest
request = GetScheduledRequest(globalRequestId);
706
private
SchedulableRequest
InternalGetScheduledRequestByGlobalRequestId(int globalRequestId)
708
SchedulableRequest
returnValue;
737
SchedulableRequest
request = InternalGetScheduledRequestByGlobalRequestId(globalRequestId);
761
private
SchedulableRequest
_request;
776
public SchedulingEvent(DateTime eventTime,
SchedulableRequest
request, SchedulableRequestState oldState, SchedulableRequestState newState)
795
public
SchedulableRequest
Request
BackEnd\Components\Scheduler\SchedulingPlan.cs (10)
93
SchedulableRequest
rootRequest = GetRootRequest(submissionId);
142
SchedulableRequest
rootRequest = GetRootRequest(submissionId);
204
private string GetPlanName(
SchedulableRequest
rootRequest)
426
private
SchedulableRequest
GetRootRequest(int submissionId)
428
foreach (
SchedulableRequest
request in _schedulingData.GetRequestsByHierarchy(null))
442
private void RecursiveWriteDependencies(StreamWriter file,
SchedulableRequest
request)
445
foreach (
SchedulableRequest
child in _schedulingData.GetRequestsByHierarchy(request))
452
foreach (
SchedulableRequest
child in _schedulingData.GetRequestsByHierarchy(request))
461
private void RecursiveAccumulateConfigurationTimes(
SchedulableRequest
request, Dictionary<int, double> accumulatedTimeByConfiguration)
470
foreach (
SchedulableRequest
childRequest in _schedulingData.GetRequestsByHierarchy(request))