aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/skyframe
Commit message (Collapse)AuthorAge
* Don't return SkyValue when dirtying nodeGravatar Mark Schaller2015-08-11
| | | | | | | | The invalidator is no longer using the SkyValue, so there's no need to return it when dirtying a node. -- MOS_MIGRATED_REVID=100307211
* Convert invalidated tracking from per-value to per-keyGravatar Mark Schaller2015-08-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The primary user of invalidation tracking is the SkyframeBuildView, which monitored which ConfiguredTargetValues were invalidated. It did that so the SkyframeExecutor could limit its search for artifact conflicts to when the set of configured targets in the build changed. For the newly introduced set of dirtied keys, "dirtiedConfiguredTargetKeys" in SkyframeBuildView, to be as useful as the "dirtyConfiguredTargets" set it replaced, the ConfiguredTargetValueInvalidationReceiver must only remove a key from the set if it was found to be clean when it was re-evaluated. If it was rebuilt, then the key must stay in the set, to represent that the set of configured target values has truly changed. This CL introduces a semantic change that hopefully has a small effect, if any. Previously, the informInvalidationReceiver method in InvalidatingNodeVisitor only informed the invalidationReceiver when a non-null value was invalidated. (This is usually, but not always, equivalent to a non-error value. The uncommon exception is that in keep-going builds, some nodes with errors may also have values, and the invalidator would inform the receiver when such a node was invalidated.) Now, the receiver is informed that a node is invalidated regardless of whether its value is null. Because the receiver uses this information to determine whether artifact conflict search has to be rerun, and that search is expensive, it's possible this change will negatively impact performance. However, the only way an extra search could be invoked is if the invalidated configured target nodes are all in error. That seems like it would happen rarely, if at all. Further cleanup of unused SkyValues returned by markDirty to come in a subsequent CL. -- MOS_MIGRATED_REVID=100304744
* Add clarification about hash codes of 0.Gravatar Nathan Harmata2015-08-11
| | | | | -- MOS_MIGRATED_REVID=100285082
* Fix race condition in SkyKey#hashCode by using the hashCode caching strategy ↵Gravatar Nathan Harmata2015-08-11
| | | | | | | | | employed by java.lang.String. Consider the case where thread T1 calls cacheHashCode and then in the future thread T2 calls hashCode. Because the side-effects of 'cacheHashCode' were non-atomic, T2 could see a value of 'true' for 'hashCodeCached' but still see the old value (of 0) for 'hashCode' and incorrectly think the hash code is 0. -- MOS_MIGRATED_REVID=100283097
* Add threadpool injectability to invalidatorGravatar Mark Schaller2015-08-06
| | | | | -- MOS_MIGRATED_REVID=99961435
* Change return type of InMemoryNodeEntry#getReverseDeps to Collection<SkyKey>.Gravatar Janak Ramakrishnan2015-08-05
| | | | | -- MOS_MIGRATED_REVID=99943491
* Modify BuildingState to allow for alternative implementations.Gravatar Janak Ramakrishnan2015-08-04
| | | | | -- MOS_MIGRATED_REVID=99747336
* Log time spent on invalidation, and the number of nodes visited.Gravatar Eric Fellheimer2015-07-30
| | | | | -- MOS_MIGRATED_REVID=99411089
* Make some skyframe and lib/skyframe classes public.Gravatar Nathan Harmata2015-07-28
| | | | | -- MOS_MIGRATED_REVID=99197069
* Improve debugging message in case of unexpected getBatch <-> directDeps ↵Gravatar Janak Ramakrishnan2015-07-17
| | | | | | | mismatch. -- MOS_MIGRATED_REVID=98388239
* Replaced other occurrences of Objects#toStringHelper with ↵Gravatar Googler2015-07-17
| | | | | | | MoreObjects#toStringHelper -- MOS_MIGRATED_REVID=98383075
* Pass filter for what events should be stored in the Skyframe graph into the ↵Gravatar Janak Ramakrishnan2015-07-16
| | | | | | | ParallelEvaluator, to allow users to customize which events they want to store. -- MOS_MIGRATED_REVID=98299604
* Make two Skyframe nodes with the same events and values equal.Gravatar Janak2015-07-13
| | | | | | | | | | | | | | | | | | | | | | We do this by implementing equality for TaggedEvents (and all objects it transitively includes). Before this change, if a Skyframe node re-evaluated to the same value as in the previous build, but had (transitive) events, change pruning would not cut off the evaluation of its parents. This is not a big issue in practice because most nodes that would re-evaluate to the same value (like FileValues or GlobValues) never emit events, and others (like ActionExecutionValues) have secondary caches that mask this effect. Also do a drive-by fix where we were using the hash code of a nested set instead of the shallow hash code (didn't have any bad effects in practice because we never hash these values). (Minor formatting clean-ups from https://bazel-review.googlesource.com/1610 ) -- Change-Id: I751a8479627f0456993c5ec8834528aeb593d736 Reviewed-on: https://bazel-review.googlesource.com/1610 MOS_MIGRATED_REVID=98115908
* Add getter for SkyFunctionName's nameGravatar Michajlo Matijkiw2015-07-10
| | | | | -- MOS_MIGRATED_REVID=97926138
* Add debug preconditions guard for null skykeys to ↵Gravatar Michajlo Matijkiw2015-07-10
| | | | | | | InMemoryMemoizingEvaluator#delete -- MOS_MIGRATED_REVID=97908428
* Activate interleaved package and transitive target loadingGravatar Mark Schaller2015-07-08
| | | | | | | | Hooks up the recently introduced interleaved loading functions to normal graph loading. -- MOS_MIGRATED_REVID=97679451
* Batch retrieval of children when removing reverse deps.Gravatar Janak Ramakrishnan2015-06-29
| | | | | -- MOS_MIGRATED_REVID=97022077
* Remove unused SkyFunctionName isComputed.Gravatar Michajlo Matijkiw2015-06-26
| | | | | | | | | Removing since we don't appear to need it. Replaced SkyFunctionName.computed with create to simplify changing everything. Moved all constructors using new to use create for consistency. Chose create over new since it was less changes. -- MOS_MIGRATED_REVID=96914199
* Convert SkyQueryEnvironment#buildTransitiveClosure to use batch operations.Gravatar Janak Ramakrishnan2015-06-23
| | | | | -- MOS_MIGRATED_REVID=96433497
* Log SkyKeys detected changed across buildsGravatar Michajlo Matijkiw2015-06-23
| | | | | | | | Similar to previous approach, except diff-awareness agnostic. Log SkyKeys as is for simplicity- this is all for human consumption anyway. -- MOS_MIGRATED_REVID=96428248
* Clean up AllPathsFunction and get rid of getFwdDeps(Target) and ↵Gravatar Janak Ramakrishnan2015-06-19
| | | | | | | getReverseDeps(Target) from the QueryEnvironment interface, since they're no longer needed by any query functions, and also WalkableGraph#get{Direct,Reverse}Deps(SkyKey). -- MOS_MIGRATED_REVID=96361760
* Renaming ExecutorShutdownUtil to ExecutorUtil, since it doesn't just do ↵Gravatar Eric Fellheimer2015-06-19
| | | | | | | shutdown operations. -- MOS_MIGRATED_REVID=96351438
* Add batch methods to WalkableGraph and convert SkyQueryEnvironment to use them.Gravatar Janak Ramakrishnan2015-06-18
| | | | | -- MOS_MIGRATED_REVID=96214911
* Change the description of NodeEntry#markDirty to better align with the ↵Gravatar Googler2015-06-12
| | | | | | | InMemoryNodeEntry#markDirty implementation. -- MOS_MIGRATED_REVID=95758779
* Confusing method description elaborated upon a little bit.Gravatar Googler2015-06-01
| | | | | -- MOS_MIGRATED_REVID=94910185
* Allow globs to be used outside of the skyframe package.Gravatar Janak Ramakrishnan2015-05-15
| | | | | -- MOS_MIGRATED_REVID=93647914
* Ensure invariant that a no-keep-going build terminates as soon as it ↵Gravatar Janak Ramakrishnan2015-05-01
| | | | | | | | | encounters a node with an error. We were doing this in most cases, but not if the error was in a node that was already done or was revalidated during change pruning. -- MOS_MIGRATED_REVID=92521223
* Fix bug in spec of getBatch.Gravatar Nathan Harmata2015-04-30
| | | | | -- MOS_MIGRATED_REVID=92398218
* Change getBatch signature from Set to Iterable since Iterable is all that's ↵Gravatar Janak Ramakrishnan2015-04-30
| | | | | | | needed. Also clean up some lint warnings/unresolved references. -- MOS_MIGRATED_REVID=92380618
* Make SkyKey cached hash code transientGravatar Mark Schaller2015-04-27
| | | | | | | | | | | | | | | | | SkyKey argument hashcodes are not stable, because they're composed of values whose hashcodes may not be stable, such as Java enums. Therefore a SkyKey's own hashcode isn't stable. And this is fine, but if we try to serialize and then deserialize the SkyKey with its cached hashcode, the deserialized SkyKey's cached hashcode won't match a normally constructed SkyKey, despite them being equal. Because a SkyKey will deserialize with a default value of 0 for its cached hashcode, this change also introduces a transient boolean guard to note whether the correct hashcode has been calculated and cached. -- MOS_MIGRATED_REVID=91985674
* Extract boilerplate logic from ParallelEvaluator's SkyFunction.Environment ↵Gravatar Janak Ramakrishnan2015-04-13
| | | | | | | | | implementation. This slightly shortens the massive ParallelEvaluator file, and also allows alternate Environment implementations to avoid repeating the boilerplate. -- MOS_MIGRATED_REVID=90830529
* Delete useless line.Gravatar Janak Ramakrishnan2015-04-06
| | | | | -- MOS_MIGRATED_REVID=90418160
* Clean up SkyFunction interface method docsGravatar Mark Schaller2015-04-06
| | | | | | | Specifies function return values. Replaces old "builder" terminology. Removes bad advice. -- MOS_MIGRATED_REVID=90417023
* Thread-safety annotations for the various skyframe graph interfaces.Gravatar Nathan Harmata2015-04-02
| | | | | -- MOS_MIGRATED_REVID=90103351
* Clarify what "fancy" means.Gravatar Nathan Harmata2015-03-30
| | | | | -- MOS_MIGRATED_REVID=89710872
* Introduce QueryableGraph#getBatch, a batched variant of QueryableGraph#get ↵Gravatar Nathan Harmata2015-03-30
| | | | | | | and use it in the underlying implementation of SkyFunction.Environment#getValues. It's reasonable for an alternative graph implementation to have a more efficient implementation of getBatch than the naive serial implementation. -- MOS_MIGRATED_REVID=89708027
* Don't bother cleaning the graph if we are crashing anyway, since attempting ↵Gravatar Nathan Harmata2015-03-23
| | | | | | | to do so is very likely to obfuscate the original crash. -- MOS_MIGRATED_REVID=89138275
* Use a more restricted type bound on ↵Gravatar Nathan Harmata2015-03-23
| | | | | | | | | SkyFunctionException#validateExceptionType. In practice, this function is only called with subtypes of Exception. Also, this changes emphasizes that the type of an error wrapped in SkyFunctionExceptions must be a subtype of Exception. Similarly, restrict SchedulerException to only wrapping Exceptions. This is true in practice, but was missed in an earlier change. -- MOS_MIGRATED_REVID=89127540
* Mark lib.events.Event and build.skyframe.TaggedEvents as serializable.Gravatar Nathan Harmata2015-03-18
| | | | | -- MOS_MIGRATED_REVID=88758470
* Inform EvaluationProgressReceiver of nodes that are built in error.Gravatar Janak Ramakrishnan2015-03-13
| | | | | | | | | This allows the pending action counter to be decremented correctly when in --keep_going mode. As part of this, there's a small refactor in ParallelEvaluator that also fixes a potential bug, that nodes in error were signaling their parents with the graph version as opposed to their actual version. Because errors never compare equal (ErrorInfo doesn't override equality), this isn't an issue in practice. But it could be in the future. -- MOS_MIGRATED_REVID=88395500
* Revert the recent changes that made some skyframe-internal data structures ↵Gravatar Nathan Harmata2015-03-10
| | | | | | | serializable; alternative graph implementations no longer need these. -- MOS_MIGRATED_REVID=88003503
* Add the method InMemoryNodeEntry#getGroupedDirectDeps so callers can access ↵Gravatar Nathan Harmata2015-03-10
| | | | | | | the ordered list of grouped deps. -- MOS_MIGRATED_REVID=87969259
* Make the factory methods public in ValueWithMetadata. This might be needed ↵Gravatar Nathan Harmata2015-03-05
| | | | | | | for alternate graph implementations. -- MOS_MIGRATED_REVID=87755843
* Add a SkyQueryEnvironment which runs queries by examining the Skyframe graph.Gravatar Janak Ramakrishnan2015-02-26
| | | | | | | | | This environment eagerly preloads the transitive closure of a specified query "universe", and so may not be as efficient as the standard query for limited-scope queries. It is activated when the universe is specified and ordered results are not requested (since it is currently unable to order results). Tests were modified/added to exercise this environment where deemed interesting. Some ugly hacks were done to add coverage in AbstractQueryTest and friends, because currently even if the full depot is loaded (using //...), individual target patterns most likely won't be present in the graph. A better way to deal with this situation, suggested by felly, is probably to extract target pattern resolution logic to an auxiliary function so that query is able to resolve target patterns without mutating the graph, and then call into the read-only graph with the resolved patterns. That may be done in a follow-up, in which case the "scope" of every query could be //... . -- MOS_MIGRATED_REVID=87257028
* Description redacted.Gravatar Nathan Harmata2015-02-24
| | | | | -- MOS_MIGRATED_REVID=87009938
* Refactor NodeEntry to be an interface.Gravatar Nathan Harmata2015-02-10
| | | | | -- MOS_MIGRATED_REVID=85946859
* Mark some skyframe-internal data structures as being Serializable.Gravatar Nathan Harmata2015-02-10
| | | | | -- MOS_MIGRATED_REVID=85945243
* Update from Google.Gravatar Han-Wen Nienhuys2015-02-25
-- MOE_MIGRATED_REVID=85702957