aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/skyframe/SkyKey.java
Commit message (Collapse)AuthorAge
* 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
* Use Bazel Preconditions variant which avoids varargs array creationGravatar Mark Schaller2015-12-10
| | | | | | | Reduces garbage. -- MOS_MIGRATED_REVID=109914243
* 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
* 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
* Only perform one read of the hashCode field in our benign-data-racy ↵Gravatar Nathan Harmata2015-08-26
| | | | | | | hashCode() implementation. See http://jeremymanson.blogspot.com/2008/12/benign-data-races-in-java.html. -- MOS_MIGRATED_REVID=101490349
* 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
* 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
* Update from Google.Gravatar Han-Wen Nienhuys2015-02-25
-- MOE_MIGRATED_REVID=85702957