aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/skyframe
Commit message (Collapse)AuthorAge
* Make MinimalVersion package-private, since it has no outside consumers.Gravatar Janak Ramakrishnan2016-03-31
| | | | | -- MOS_MIGRATED_REVID=118623130
* Fix keep-going build with an existing cycle by only setting errorDepKey in a ↵Gravatar Janak Ramakrishnan2016-03-29
| | | | | | | non-keep-going build. Setting errorDepKey was only mostly harmless, to mix memes. (Actually, it was quite harmful.) -- MOS_MIGRATED_REVID=118410594
* Fix debugging info when crashing with missing SkyFunction.Gravatar Janak Ramakrishnan2016-03-23
| | | | | -- MOS_MIGRATED_REVID=117894693
* Transform the getBatch result in SkyFunctionEnvironment instead of copying ↵Gravatar Janak Ramakrishnan2016-03-22
| | | | | | | it. The copying showed up as a source of memory spikiness. -- MOS_MIGRATED_REVID=117741939
* Remove the WalkableGraphFactory#afterUse hook, which was only called in ↵Gravatar Nathan Harmata2016-03-21
| | | | | | | SkyQueryEnvironment. QueryEnvironmentFactory, recently introduced by unknown commit, is a much more general purpose mechanism. -- MOS_MIGRATED_REVID=117590252
* Transform the passed-in map in AbstractSkyFunctionEnvironment instead of ↵Gravatar Janak Ramakrishnan2016-03-18
| | | | | | | copying it. The copying showed up as a source of memory spikiness in an OOM. -- MOS_MIGRATED_REVID=117477133
* Fix style issue; convert comment to Javadoc format.Gravatar Ulf Adams2016-03-11
| | | | | | | ...so the docs show up on hover in an IDE. -- MOS_MIGRATED_REVID=116986129
* Use static creation method for SkyKey. This allows interning SkyKeys as they ↵Gravatar Janak Ramakrishnan2016-03-03
| | | | | | | are created, as opposed to when they are requested from the ParallelEvaluator. That delay can lead to large memory spikes and churn. -- MOS_MIGRATED_REVID=116224565
* Improve the error message when the ParallelEvaluator is unable to create a ↵Gravatar Luis Fernando Pino Duque2016-02-28
| | | | | | | SkyFunction -- MOS_MIGRATED_REVID=115671161
* Prevent new evaluations from starting if a done child's error is discovered. ↵Gravatar Janak Ramakrishnan2016-02-23
| | | | | | | Also delete some code that's been dead for a while, now that we eagerly shut down evaluation when we come across a child in error during a fail-fast evaluation. -- MOS_MIGRATED_REVID=115272603
* Make IntVersion package-private, since it isn't used outside of Skyframe core.Gravatar Janak Ramakrishnan2016-02-12
| | | | | -- MOS_MIGRATED_REVID=114488935
* Allow ParallelEvaluator to not store errors alongside values if nodes ↵Gravatar Janak Ramakrishnan2016-02-11
| | | | | | | recover from errors. In the case of a single keep_going build, with no subsequent nokeep_going builds, storing the errors is unnecessary. -- MOS_MIGRATED_REVID=114355846
* Remove TransitivePackageLoader#getVisitedTargets, which was only used in ↵Gravatar Janak Ramakrishnan2016-02-11
| | | | | | | tests. Replace it in tests with direct Skyframe graph lookups. -- MOS_MIGRATED_REVID=114335937
* Support for handling TreeArtifact metadata and returning TreeArtifacts from ↵Gravatar Michael Thvedt2016-02-09
| | | | | | | ArtifactFunction. -- MOS_MIGRATED_REVID=114174899
* Don't check direct deps when doing change pruning. Since dependents of a ↵Gravatar Janak Ramakrishnan2016-02-09
| | | | | | | node don't have access to its dependencies ("grandparents don't know grandchildren", or vice versa, depending on your point of view), changes to a node's dependencies can't affect downstream nodes. -- MOS_MIGRATED_REVID=114143894
* Parallelize top-level invalidation. No need to do all of these in sequence.Gravatar Eric Fellheimer2016-01-29
| | | | | -- MOS_MIGRATED_REVID=113313675
* Parallelize Package retrieval during Sky-query operation. To maintain ↵Gravatar Eric Fellheimer2016-01-29
| | | | | | | type-safety, we now must pass in the exception type of the callback. -- MOS_MIGRATED_REVID=113313312
* Intern IntVersions.Gravatar Janak Ramakrishnan2016-01-28
| | | | | -- MOS_MIGRATED_REVID=113197641
* Fix SkyframeBuilder's error handling, and change the contract of ↵Gravatar Janak Ramakrishnan2016-01-28
| | | | | | | | | | | EvaluationResult to return true for hasError() iff errorMap is non-empty or there is a catastrophe. There was no good reason for the previous behavior of saying hasError even if there was a transitive recovered-from error, since callers shouldn't care. This was a latent bug that was only benign since none of the consumers of hasError were invoking Skyframe with recoverable SkyFunctions. Also add an EvaluationResultSubject so that tests can more fluently assert things about EvaluationResult objects going forward. -- MOS_MIGRATED_REVID=113192415
* 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