aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/skyframe/InMemoryNodeEntry.java
Commit message (Collapse)AuthorAge
* Intern IntVersions.Gravatar Janak Ramakrishnan2016-01-28
| | | | | -- MOS_MIGRATED_REVID=113197641
* Use Bazel Preconditions variant which avoids varargs array creationGravatar Mark Schaller2015-12-10
| | | | | | | Reduces garbage. -- MOS_MIGRATED_REVID=109914243
* 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
* Avoid extra rdeps copy when finishing nodeGravatar Mark Schaller2015-11-24
| | | | | | | Reduces garbage and wasted work -- MOS_MIGRATED_REVID=108566164
* Extract ReverseDepsUtil interface so that InMemoryNodeEntry can be partially ↵Gravatar Janak Ramakrishnan2015-11-24
| | | | | | | isolated from implementation details. -- MOS_MIGRATED_REVID=108523104
* 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
* 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
* Delay additions as well as removals of reverse deps. Now that removals are ↵Gravatar Janak Ramakrishnan2015-10-12
| | | | | | | | | | | not all done during invalidation, repeated adding/removing means that we are consolidating more often, negating the benefit of delayed removals. To work around this, delay adds as well until we consolidate and verify the integrity of our data. Since there is no well-defined point that a consolidation should trigger for a done node, we delay until our pending list is as large as the done list. We can tweak this if necessary for a memory/performance tradeoff. The alternative to this that I could think of is giving up our strong integrity checks, which I'm not a fan of. -- MOS_MIGRATED_REVID=105095886
* Be more specific about InMemoryNodeEntry.getGroupedDirectDepsGravatar Mark Schaller2015-10-09
| | | | | -- MOS_MIGRATED_REVID=104983790
* Increase visibility of an InMemoryNodeEntry methodGravatar Mark Schaller2015-10-08
| | | | | | | | | | For use in alternate graph implementations. Also adds some user-friendly methods to StringValue, a SkyValue implementation used in tests. -- MOS_MIGRATED_REVID=104899226
* Simplify buildingState check in markCleanGravatar Mark Schaller2015-09-30
| | | | | | | The value getting checked was the same as the value it was compared to. -- MOS_MIGRATED_REVID=104144544
* Rationalize copyright headersGravatar Damien Martin-Guillerez2015-09-25
| | | | | | | | | | | The headers were modified with `find . -type f -exec 'sed' '-Ei' 's|Copyright 201([45]) Google|Copyright 201\1 The Bazel Authors|' '{}' ';'` And manual edit for not Google owned copyright. Because of the nature of ijar, I did not modified the header of file owned by Alan Donovan. The list of authors were extracted from the git log. It is missing older Google contributors that can be added on-demand. -- MOS_MIGRATED_REVID=103938715
* Don't remove reverse deps until node is known to be changed. This helps ↵Gravatar Janak Ramakrishnan2015-09-23
| | | | | | | avoid mutating the deps of nodes that are still going to be deps after evaluation is finished. -- MOS_MIGRATED_REVID=103659429
* Strictly enforce reverse deps removals.Gravatar Janak Ramakrishnan2015-09-11
| | | | | | | Now that we don't clean the graph during catastrophes, we should be crashing hard in these cases. -- MOS_MIGRATED_REVID=102785226
* Delay cleaning of in-flight nodes until the following build. This allows us ↵Gravatar Janak Ramakrishnan2015-09-11
| | | | | | | | | to interrupt evaluation in constant time. Some ParallelEvaluator tests that implicitly relied on cleaning happening before the next evaluation were moved into MemoizingEvaluatorTest as a result. -- MOS_MIGRATED_REVID=102696653
* Return raw SkyValue instead of wrapped ValueWithMetadata.Gravatar Janak Ramakrishnan2015-08-25
| | | | | -- MOS_MIGRATED_REVID=101377320
* Fix some nits and allow alternate evaluators to use MemoizingEvaluatorTest.Gravatar Janak Ramakrishnan2015-08-21
| | | | | -- MOS_MIGRATED_REVID=101150250
* 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
* 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
* Replaced other occurrences of Objects#toStringHelper with ↵Gravatar Googler2015-07-17
| | | | | | | MoreObjects#toStringHelper -- MOS_MIGRATED_REVID=98383075
* 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
* Refactor NodeEntry to be an interface.Gravatar Nathan Harmata2015-02-10
-- MOS_MIGRATED_REVID=85946859