aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/skyframe
Commit message (Collapse)AuthorAge
* Allow opaque OptionsClassProvider to be passed around in BuildDriver#meta et ↵Gravatar Nathan Harmata2016-01-20
| | | | | | | all so that custom implementations can have custom options passed around. -- MOS_MIGRATED_REVID=112502778
* Skyfunctions can now catch up to five exceptions.Gravatar John Field2016-01-15
| | | | | | | This is a prerequisite to making some changes to PackageFunction that require handling another exception. -- MOS_MIGRATED_REVID=112172100
* Stop filtering out targets not in the graph in SkyQueryEnvironment. Instead, ↵Gravatar Janak Ramakrishnan2016-01-15
| | | | | | | | | | | | | | just warn if a target turns out to not be present. This means that queries may return unexpected results. For instance, if "query" means "bazel query --order_output=no ", then here are the results of two queries: query --universe_scope=//foo/... //foo:output_file //foo:output_file query --universe_scope=//foo/... deps(//foo:output_file) WARNING: Targets not in graph [//foo:output_file generated_file] //foo:output_file -- MOS_MIGRATED_REVID=112163475
* Include the new 'catastrophe' field in EvaluationResult.mergeFrom().Gravatar Googler2016-01-14
| | | | | | | This is necessary for propagating the catastrophic exception so that it is available at the top level. -- MOS_MIGRATED_REVID=112083848
* Use AutoProfiler in SkyQueryEnvironment#init. Also augment the ↵Gravatar Nathan Harmata2016-01-14
| | | | | | | WalkableGraphFactory interface with a hook to inform the factory when the WalkableGraph is done being used. -- MOS_MIGRATED_REVID=112074284
* Add the ability to customize the bazel client's exit code used when the ↵Gravatar Nathan Harmata2016-01-08
| | | | | | | bazel server exits abruptly. -- MOS_MIGRATED_REVID=111641619
* In SkyQueryEnvironment, don't silently give up when there's a cycle in the ↵Gravatar Janak Ramakrishnan2016-01-07
| | | | | | | graph. We can compute the universe target patterns outside of skyframe, which is the only reason we need the value we were requesting. Giving up was preventing us from evaluating "..." patterns even if the "..." pattern didn't contain any cycles itself. -- MOS_MIGRATED_REVID=111605976
* Add catastrophe field to EvaluationResult so that callers can identify the ↵Gravatar Janak Ramakrishnan2016-01-04
| | | | | | | | | cause of a catastrophic failure (this is distinct from a crash). Also clean up catastrophe logic in ParallelEvaluator -- the catastrophic nature of an exception is important only if the build is keep_going, and only if the exception is catastrophic can we have an exception in the first place. -- MOS_MIGRATED_REVID=111293164
* Clarify the message of the exception thrown when a .getValue() calls returns ↵Gravatar Lukacs Berki2015-12-13
| | | | | | | null but the SkyFunction that called it returns non-null. -- MOS_MIGRATED_REVID=110009359
* Use Bazel Preconditions variant which avoids varargs array creationGravatar Mark Schaller2015-12-10
| | | | | | | Reduces garbage. -- MOS_MIGRATED_REVID=109914243
* Repurpose the not-meaningfully-used ErrorInfo#isTransient to mean "is ↵Gravatar Nathan Harmata2015-12-10
| | | | | | | | | transitively transient". Some followup changes will use this method. Previously, ErrorInfo#isTransient was only used internally in ParallelEvaluator; I think this method was originally added to ErrorInfo solely for the sake of convenience. -- MOS_MIGRATED_REVID=109840031
* Avoid list copy in BuildingState.getNextDirtyDirectDepsGravatar Mark Schaller2015-12-09
| | | | | | | | | Also, in GroupedList, short-circuit expensive group equality check with a reference check, saving time and garbage when groups are the same object. -- MOS_MIGRATED_REVID=109795332
* Track changed and dirtied keys separately during invalidationGravatar Mark Schaller2015-11-30
| | | | | | | | Reduces the number of allocations during invalidation. Has a magnified effect when optional support for interruptibility is turned off. -- MOS_MIGRATED_REVID=108978068
* Avoid low-value boxing of ints in BuildingStateGravatar Mark Schaller2015-11-30
| | | | | | | Reduces garbage. -- MOS_MIGRATED_REVID=108977813
* Make support for interruptibility optional during dirtyingGravatar Mark Schaller2015-11-25
| | | | | | | Reduces the amount of work needed when interruptibility isn't needed. -- MOS_MIGRATED_REVID=108611609
* Avoid extra rdeps copy when finishing nodeGravatar Mark Schaller2015-11-24
| | | | | | | Reduces garbage and wasted work -- MOS_MIGRATED_REVID=108566164
* Presize invalidation pairs collectionGravatar Mark Schaller2015-11-24
| | | | | | | Reduces garbage generated during array resizing. -- MOS_MIGRATED_REVID=108528430
* Extract ReverseDepsUtil interface so that InMemoryNodeEntry can be partially ↵Gravatar Janak Ramakrishnan2015-11-24
| | | | | | | isolated from implementation details. -- MOS_MIGRATED_REVID=108523104
* Tolerate independent cycle underneath main cycle during a re-evaluation.Gravatar Janak Ramakrishnan2015-11-24
| | | | | | | With the new-ish behavior of change pruning, where nodes transition from NEEDS_REBUILDING to REBUILDING, we need to make that transition unconditionally for dirty nodes -- being ready after unfinished deps were removed is irrelevant. -- MOS_MIGRATED_REVID=108508979
* Add previous() method to IntVersion.Gravatar Janak Ramakrishnan2015-11-24
| | | | | -- MOS_MIGRATED_REVID=108386134
* Presize invalidation sets for better performanceGravatar Mark Schaller2015-11-20
| | | | | -- MOS_MIGRATED_REVID=108266475
* Allow SkyValues to be marked not "comparable". Such values are not compared ↵Gravatar Eric Fellheimer2015-11-19
| | | | | | | for the purpose of change pruning. -- MOS_MIGRATED_REVID=108203369
* More batching of graph lookups during evaluationGravatar Mark Schaller2015-11-19
| | | | | -- MOS_MIGRATED_REVID=108186573
* Batch (r)deps lookups during evaluationGravatar Mark Schaller2015-11-19
| | | | | -- MOS_MIGRATED_REVID=108174404
* Avoid re-evaluating a parent node when a child is found to be unchanged from ↵Gravatar Janak Ramakrishnan2015-11-19
| | | | | | | | | | | an earlier version at which the child changed but the parent did not. Concrete scenario: Parent depends on Child. We first evaluate at version v1, Child has value A1, Parent has value B1. We then evaluate at version v2, which changes a dependency of Child. Child has value A2, and Child.getVersion() returns v2. Parent re-evaluates to B1, so is unchanged. Parent.getVersion() returns v1. Now evaluate at version v3, which also changes a dependency of Child. Child re-evaluates to A2, so Child.getVersion() returns v2. If we signal Parent with v2 and Parent only knows that it is at version v1, then Parent must unnecessarily re-evaluate. To fix this, we store an additional version in the entry -- the version at which the node was last evaluated, even if the evaluation did not result in a new value. Parent can then compare that version to its children's versions. If that version is at least as recent as their versions, it knows that the result of evaluating will be the same as it was at that last evaluated version, which is its current value. An alternative solution might be to just signal the parent with a boolean, saying whether or not the child was changed on this evaluation. However, this would be incorrect in the scenario above, with the modification that in the second evaluation, the user just requests the value of Child -- Parent is not updated. In that case, during the third evaluation, Child would report that it was not changed during this evaluation, but we must still re-evaluate Parent since it has not yet picked up the value of Child from the earlier build. -- MOS_MIGRATED_REVID=108163443
* Cleanup MarkedDirtyResult docs and constructorGravatar Mark Schaller2015-11-18
| | | | | -- MOS_MIGRATED_REVID=108069029
* Batch reverse dep retrieval in invalidationGravatar Mark Schaller2015-11-18
| | | | | | | | | | | Rather than retrieve and process the reverse deps of an invalidated node one at a time, batch request the set of reverse deps and then process each of them. This reduces the overhead of requesting values from the graph. -- MOS_MIGRATED_REVID=108062933
* Return rdeps when marking a node dirtyGravatar Mark Schaller2015-11-18
| | | | | | | | | | The thread that succeeds at marking a node dirty during invalidation must then schedule that node's reverse deps for invalidation. Providing the set of reverse deps as a return value from marking a node dirty makes some future optimizations possible. -- MOS_MIGRATED_REVID=108045473
* Improve concurrency level in invalidation setsGravatar Mark Schaller2015-11-17
| | | | | -- MOS_MIGRATED_REVID=107974602
* Use Labels, rather than PathFragments, to represent Skylark loads ↵Gravatar John Field2015-11-13
| | | | | | | | | | | | | | | | | | | | | internally. The load location for a Skylark Aspect is specified via a PathFragment, for consistency with current non-Aspect Skylark loads. This should be a semantics-preserving change for users. In a subsequent CL, I'll change the Skylark syntax to allow load statements to use labels as well as paths, with the goal of eventually deprecating the latter. Also: - Removed the hack for handling relative loads in the prelude file. - Refactored some redundant functionality in PackageFunction and SkylarkImportLookupFunction for handling loads. - Removed the ability to put the BUILD file for the package containing a Skylark file under a different package root than the Skylark file itself. This functionality isn't currently used and is inconsistent with Blaze's handling of the package path elsewhere. - Added BUILD files to a number of tests that load Skylark files; this is consistent with the requirement that all Skylark files need to be part of some package. - Changed the constants used to set the location of the prelude file from paths to labels. -- MOS_MIGRATED_REVID=107741568
* Put NodeEntry in Supplier<SkyValue> passed to EvaluationProgressReceiver so ↵Gravatar Janak Ramakrishnan2015-11-13
| | | | | | | it's readily accessible in the program. -- MOS_MIGRATED_REVID=107698784
* Allow FilesystemValueChecker to operate on a WalkableGraph and add TODOs for ↵Gravatar Nathan Harmata2015-11-10
| | | | | | | | | replacing MemoizingEvaluator#getValues et al with WalkableGraph usage. I initially attempted to do this but punted once I realized how much work it would be. Also make DirectoryListingStateValue and FileStateValue public for use in outside callers of FilesystemValueChecker. -- MOS_MIGRATED_REVID=107447425
* BUILD file tweaks.Gravatar Han-Wen Nienhuys2015-11-10
| | | | | -- MOS_MIGRATED_REVID=107389541
* Record Skyframe timing metrics even if Profiling is disabled.Gravatar Eric Fellheimer2015-11-06
| | | | | -- MOS_MIGRATED_REVID=107228414
* Intern rdep removal operations to save memory on incremental builds.Gravatar Janak Ramakrishnan2015-11-05
| | | | | -- MOS_MIGRATED_REVID=107135644
* Add sanity check in bubbleErrorUp that the parentEntry is non-null iff the ↵Gravatar Nathan Harmata2015-11-05
| | | | | | | parent is non-null. -- MOS_MIGRATED_REVID=107062267
* In SkyKey#equals, check for 'functionName' equality before checking for ↵Gravatar Nathan Harmata2015-11-04
| | | | | | | 'argument' equality. When the two keys are equal we have to check both fields anyways, so we should only consider the case where they are unequal: 'functionName' equality is almost certainly cheaper, so we'd prefer short circuiting on inequality from that cheap check. -- MOS_MIGRATED_REVID=106989244
* Permit use of ForkJoinQuiescingExecutor for invalidationGravatar Mark Schaller2015-11-04
| | | | | | | | | | Changes InvalidatingNodeVisitor's use of AbstractQueueVisitor from inheritance to composition. This allows it to vary its executor implementation. A ForkJoinPool-specialized implementation option is provided. -- MOS_MIGRATED_REVID=106960011
* Introduce ForkJoinQuiescingExecutor, permit its use in evaluationGravatar Mark Schaller2015-11-02
| | | | | | | | | | | | | | | | | | This CL introduces a QuiescingExecutor implementation specialized for ForkJoinPools with the same interrupt handling, error propagation, and task completion semantics as AbstractQueueVisitor. Currently it does this by largely sharing its implementation with AQV. Future refactoring could let it rely more on ForkJoinPool's own awaitQuiescence implementation to avoid the overhead of AQV's remainingTasks counter maintenance. Subtasks spawned by tasks executing in ForkJoinQuiescingExecutor will rely on ForkJoinPool's thread-local task deques for low contention and (mostly) LIFO ordering. -- MOS_MIGRATED_REVID=106864395
* Cleanup ValueVisitor (and dirty QuiescingExecutor)Gravatar Mark Schaller2015-11-02
| | | | | | | | | | | | | Raises the level of abstraction of ValueVisitor's dependence on AbstractQueueVisitor. Except for the "ForTestingOnly" methods now available on the QuiescingExecutor interface, ValueVisitor is agnostic to the implementation of its executor. This also cleans up the full spectrum of visibility modifiers on ValueVisitor methods, all of which ought to be private. -- MOS_MIGRATED_REVID=106847453
* Change ValueVisitor to use delegationGravatar Mark Schaller2015-11-02
| | | | | | | | This simplifies a future change that introduces new variance to ValueVisitor's use of AbstractQueueVisitor. -- MOS_MIGRATED_REVID=106846210
* Introduce ErrorClassifierGravatar Mark Schaller2015-11-02
| | | | | | | | | | Changes the AbstractQueueVisitor strategy for varying its response to unhandled exceptions from inheritance to composition. This will help with a forthcoming switch from inheritance to delegation for ValueVisitor's use of AbstractQueueVisitor. -- MOS_MIGRATED_REVID=106730708
* Introduce QuiescingExecutorGravatar Mark Schaller2015-11-02
| | | | | | | | | | | | This interface (mostly) encapsulates what the ValueVisitor expects from the AbstractQueueVisitor class it currently inherits from. This makes it easier for a future CL to change ValueVisitor's strategy of code reuse from inheritance to composition. RELNOTES: -- MOS_MIGRATED_REVID=106728863
* Split off more BUILD files.Gravatar Han-Wen Nienhuys2015-10-28
| | | | | -- MOS_MIGRATED_REVID=106493557
* Share SkyKey interning between evaluation and deserialization.Gravatar Eric Fellheimer2015-10-27
| | | | | -- MOS_MIGRATED_REVID=106323413
* Avoid the usage of Maps.transformValues since it is lazy and keeps a ↵Gravatar Miguel Alcon Pinto2015-10-23
| | | | | | | reference to the original map. This made us to keep a reference to the whole node but we are only interested on the rdeps. -- MOS_MIGRATED_REVID=106098938
* Increase visibility of BuildingState methodGravatar Mark Schaller2015-10-22
| | | | | -- MOS_MIGRATED_REVID=106004898
* Singleton-ify ErrorTransienceValueGravatar Michajlo Matijkiw2015-10-22
| | | | | | | | | | | | | | We rely on ErrorTransienceValue being different across evaluations by way of java reference inequality, instead make it a singleton and make it so that ErrorTransienceValue compares equal to nothing, including itself. Alternatively we could attach the corresponding Version to ErrorTransienceValue and use that to force inequality across evaluations. However this gets into the different possible Version implementations and their varying semantics, so go with the simplest approach first and see how it works out. -- MOS_MIGRATED_REVID=106001826
* Remove wildcard of SkyFunctionName, as it is finalGravatar Mark Schaller2015-10-22
| | | | | | | Nothing can extend SkyFunctionName. It's final. -- MOS_MIGRATED_REVID=105989976
* In SkyQueryEnvironment, check TransitiveTraversalValues for errorsGravatar Mark Schaller2015-10-22
| | | | | | | | | | | | | | | In SkyQueryEnvironment, the buildTransitiveClosure method ignored the error messages in successfully evaluated TransitiveTraversalValues, under the belief that any such error messages are also obtainable by calling getMissingAndExceptions. This happens to be true right now, but may not be true in the future. If, in particular, the TransitiveTraversal skyfunction inlines its call to the TargetMarker skyfunction, those error messages won't be available through getMissingAndExceptions. -- MOS_MIGRATED_REVID=105980430