| Commit message (Collapse) | Author | Age |
|
|
|
|
|
|
| |
Instead, deduplicate when the helper is actually added to a GroupedList.
--
MOS_MIGRATED_REVID=136145321
|
|
|
|
|
|
|
| |
The only place we now don't handle InterruptedException is in the action graph created after analysis, since I'm not sure that will be around for that much longer.
--
MOS_MIGRATED_REVID=130327770
|
|
|
|
|
|
|
|
|
| |
Collapse the "evaluating" boolean into the "signaledDeps" int field, since signaledDeps is always 0 if evaluating is false, so we can use the sentinel value -1 to indicate that evaluation has not yet started. This leads to a slightly less tolerant node entry: it must "start evaluating" before you can do things like set its value. Places that wasn't being done have been fixed, at least as far as we have test coverage for.
Also, factor the "dirty" parts of BuildingState out into a subclass. It would probably be cleaner to use composition here, but I don't want to pay the price of another object.
--
MOS_MIGRATED_REVID=126729331
|
|
|
|
|
|
|
| |
The biggest savings here is that we were not eagerly discarding the InMemoryNodeEntry#directDeps field after an entry was marked dirty, even though we would never read its value again. But rather than just fix that, by getting rid of the field in BuildingState, we can potentially save memory with smaller BuildingState objects as well.
--
MOS_MIGRATED_REVID=126709632
|
|
|
|
|
|
|
| |
InvalidatedNodeEntry.
--
MOS_MIGRATED_REVID=126139179
|
|
|
|
|
|
|
| |
lastEvaluated/lastChanged version fields, we lost memory alignment, so this boolean was costing us 8 bytes per instance.
--
MOS_MIGRATED_REVID=125998857
|
|
|
|
|
|
|
|
|
|
|
| |
discover that it no longer has certain deps.
In the common case, where a node's deps do not change in the end, this reduces lock contention and CPU.
The downside of this is that we now create a set of the previous reverse deps during each evaluation of a node. We don't store this set in order to conserve memory, so we pay for it in CPU. We will probably only construct it two or three times (most SkyFunctions don't have so many groups), so the cost shouldn't be so high, but we can try to mitigate if it shows up in profiling.
--
MOS_MIGRATED_REVID=122566267
|
|
|
|
|
|
|
| |
conversion is unnecessary and wasteful. In the remaining cases, the set conversion can be explicit.
--
MOS_MIGRATED_REVID=122294939
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=113197641
|
|
|
|
|
|
|
| |
Reduces garbage.
--
MOS_MIGRATED_REVID=109914243
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
Reduces garbage and wasted work
--
MOS_MIGRATED_REVID=108566164
|
|
|
|
|
|
|
| |
isolated from implementation details.
--
MOS_MIGRATED_REVID=108523104
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=104983790
|
|
|
|
|
|
|
|
|
|
| |
For use in alternate graph implementations.
Also adds some user-friendly methods to StringValue, a SkyValue
implementation used in tests.
--
MOS_MIGRATED_REVID=104899226
|
|
|
|
|
|
|
| |
The value getting checked was the same as the value it was compared to.
--
MOS_MIGRATED_REVID=104144544
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
avoid mutating the deps of nodes that are still going to be deps after evaluation is finished.
--
MOS_MIGRATED_REVID=103659429
|
|
|
|
|
|
|
| |
Now that we don't clean the graph during catastrophes, we should be crashing hard in these cases.
--
MOS_MIGRATED_REVID=102785226
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=101377320
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=101150250
|
|
|
|
|
|
|
|
| |
The invalidator is no longer using the SkyValue, so there's no need
to return it when dirtying a node.
--
MOS_MIGRATED_REVID=100307211
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=99943491
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=99747336
|
|
|
|
|
|
|
| |
MoreObjects#toStringHelper
--
MOS_MIGRATED_REVID=98383075
|
|
|
|
|
|
|
| |
serializable; alternative graph implementations no longer need these.
--
MOS_MIGRATED_REVID=88003503
|
|
|
|
|
|
|
| |
the ordered list of grouped deps.
--
MOS_MIGRATED_REVID=87969259
|
|
--
MOS_MIGRATED_REVID=85946859
|