aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/skyframe/serialization
Commit message (Collapse)AuthorAge
* Allow deserialization futures as NestedSet contents, with unrolling blocking ↵Gravatar cpeyser2018-06-13
| | | | | | | | on that future. This allows NestedSet deserialization not to block on storage reads - in-progress deserializations are simply made a member of the NestedSets they produce. PiperOrigin-RevId: 200440131
* Add codec for Long (needed by TargetCompleteEvent).Gravatar janakr2018-06-10
| | | | PiperOrigin-RevId: 199965139
* Use unsafe String operations when writing parameter files.Gravatar tomlu2018-06-08
| | | | | | | | | When a LATIN-1 parameter file is requested, we can take advantage of the fact that JDK9 strings are (usually) stored as LATIN-1. For UTF-8, we can still optimize for the common case where a LATIN-1 string contains only ASCII characters, as these are bit-identical between UTF-8 and LATIN-1. This would still be expected to be the vast majority of parameter file contents. RELNOTES: None PiperOrigin-RevId: 199816430
* Add functionality to SerializationContext and @AutoCodec to check that a ↵Gravatar janakr2018-06-05
| | | | | | | | class is allowed to be serialized in the current context. A codec can now add an explicitly allowed class that can be serialized underneath it (via SerializationContext#addExplicitlyAllowedClass), and that class's codec can check that it is explicitly allowed (via SerializationContext#checkClassExplicitlyAllowed). It is a runtime crash if a codec checks that it was explicitly allowed and finds that it wasn't. Thus, if PackageCodec is invoked without it having been explicitly allowed, we will crash, preventing Package from sneaking into a value it shouldn't be in. This is only enabled if the codec is memoizing. PiperOrigin-RevId: 199317936
* Add events and get rid of ErrorInfoEncoder. Clean up some signatures and ↵Gravatar janakr2018-05-22
| | | | | | visibility in Skyframe classes. PiperOrigin-RevId: 197665817
* Cache superclass traversal to find proper codec in ObjectCodecRegistry.Gravatar janakr2018-05-21
| | | | PiperOrigin-RevId: 197508159
* Remove string prefix optimization. With new UnsafeJdk9StringCodec, it's no ↵Gravatar janakr2018-05-21
| | | | | | longer worth it. PiperOrigin-RevId: 197477783
* Remove ValueConstants. They're not pulling their weight in CPU overhead.Gravatar janakr2018-05-21
| | | | PiperOrigin-RevId: 197465288
* When using JDK9, replace naive StringCodec with an optimized codec that uses ↵Gravatar janakr2018-05-21
| | | | | | the String's underlying raw bytes. This avoids byte copying and UTF interpretation. Experiments show it is approximately 15(!) times faster than the naive StringCodec for serialization and 2 times faster for deserialization (10 times faster for non-ASCII strings). PiperOrigin-RevId: 197441758
* DynamicCodec tweaks to make it into a super fast String serializer.Gravatar shahan2018-05-14
| | | | | | (3-8x faster than StringCodec). PiperOrigin-RevId: 196615858
* Permit serialization arising from ErrorInfo#encode to wait on a future. ThisGravatar cpeyser2018-05-14
| | | | | | | | prevents Bazel from crashing on an ErrorInfo with an exception from ActionExecutionFunction, which can contain an action, and therefore contain a NestedSet. PiperOrigin-RevId: 196533301
* Use the local JDK as the default target javabaseGravatar cushon2018-05-14
| | | | | | and continue to use the embedded JDK as the default host_javabase. PiperOrigin-RevId: 196471714
* Add an IdentityHashMap to the BuildOptions.OptionsDiffForReconstruction codec.Gravatar mjhalupka2018-05-11
| | | | PiperOrigin-RevId: 196310244
* Codec for FluentIterable - needed to serialize results of Iterables.concat.Gravatar shahan2018-05-10
| | | | PiperOrigin-RevId: 196127040
* Serialization of NestedSet<NestedSet> with NestedSetCodecWithStore waits onGravatar cpeyser2018-05-03
| | | | | | backend writes for inner NestedSet serialization. PiperOrigin-RevId: 195294676
* Add ArtifactFactory to the AutoRegistry blacklist.Gravatar mjhalupka2018-05-02
| | | | PiperOrigin-RevId: 195110169
* Clean up code that directly imports nested classes like Builder, Entry, etc.Gravatar jcater2018-05-01
| | | | PiperOrigin-RevId: 195040539
* Add a codec for LinkedHashSet.Gravatar mjhalupka2018-05-01
| | | | PiperOrigin-RevId: 195002908
* Wire up future to wait for in NestedSetCodecWithStore.Gravatar janakr2018-04-30
| | | | PiperOrigin-RevId: 194895469
* Add ability for serialization to inform the SerializationContext that any ↵Gravatar janakr2018-04-30
| | | | | | remote write should block on the provided future. PiperOrigin-RevId: 194836516
* Refactor NestedSet to permit alternate NestedSetStore implementations.Gravatar cpeyser2018-04-30
| | | | PiperOrigin-RevId: 194787067
* Allow class prefix names to be blacklisted from DynamicCodec use.Gravatar janakr2018-04-26
| | | | PiperOrigin-RevId: 194487570
* SourceArtifacts are interned on deserialization using an ArtifactFactory. ↵Gravatar cpeyser2018-04-24
| | | | | | This should reduce memory consumption in NestedSet deserialization, which currently does not recycle Artifact instances. PiperOrigin-RevId: 194083901
* Introduce NestedSetStore, which persists information used for NestedSet ↵Gravatar cpeyser2018-04-19
| | | | | | serialization. PiperOrigin-RevId: 193536486
* Automated rollback of commit 559ffb7dd6578c961e775ba4901917ab8bffcb9d.Gravatar janakr2018-04-18
| | | | | | | | | | | | *** Reason for rollback *** Looks like this is using more cpu than I realized. Doesn't seem fixable short-term. This may need to be cherrypicked into the next canary if it shows up in profiling. See bug for details. *** Original change description *** Add ValueConstants helper to handle the increasingly complex logic for value-equality-tested constants. Main hurdle is efficiently testing to see if a Collection is a value constant without trying to do work on Collections that can't possibly be value constants. PiperOrigin-RevId: 193403226
* PiperOrigin-RevId: 193371485Gravatar carmi2018-04-18
|
* Automated rollback of commit 3643afad04be41caa4b247d327230e8a1e32bb6a.Gravatar carmi2018-04-17
| | | | | | | | | | | *** Reason for rollback *** Breaks //third_party/java_src/copybara/java/com/google/copybara/config:parser: [] *** Original change description *** PiperOrigin-RevId: 193292991
* PiperOrigin-RevId: 193274137Gravatar carmi2018-04-17
|
* Add ValueConstants helper to handle the increasingly complex logic for ↵Gravatar janakr2018-04-16
| | | | | | value-equality-tested constants. Main hurdle is efficiently testing to see if a Collection is a value constant without trying to do work on Collections that can't possibly be value constants. PiperOrigin-RevId: 193085625
* Introduce NestedSetCodecWithStore, which serializes NestedSet using a ↵Gravatar cpeyser2018-04-16
| | | | | | process-global bimap of fingerprints to NestedSet contents. PiperOrigin-RevId: 193063717
* PiperOrigin-RevId: 192832950Gravatar carmi2018-04-13
|
* Add DurationCodecGravatar Googler2018-04-13
| | | | | | This is required for moving --test_timeout from ExecutionOptions to BuildConfiguration.Options PiperOrigin-RevId: 192815911
* Prefix-compress strings during memoizing serialization.Gravatar janakr2018-04-12
| | | | PiperOrigin-RevId: 192662977
* Add value constants to ObjectCodecRegistry. Value constants are to be used ↵Gravatar janakr2018-04-10
| | | | | | when there may not be a canonical instance of the object we want (or the canonical instance isn't available at registry construction time), but we can reasonably cheaply do value equality comparisons. Strings are a good example. PiperOrigin-RevId: 192354865
* Make some objects frequently encountered during serialization into ↵Gravatar janakr2018-04-10
| | | | | | | | constants. A lot of care is needed here because we're using reference equality. I plan to add value-equality constants in a follow-up. Add ImmutableSortedSet marshaller because I think it might have been needed, and hey, why not. PiperOrigin-RevId: 192326359
* Makes BlazeDirectories a serialization constant.Gravatar shahan2018-04-10
| | | | PiperOrigin-RevId: 192325937
* Allow codecs in ObjectCodecRegistry.Builder to be swapped out.Gravatar cpeyser2018-04-10
| | | | PiperOrigin-RevId: 192298198
* Makes the decision to memoize at the SkyValue level.Gravatar shahan2018-04-09
| | | | PiperOrigin-RevId: 192158825
* Deletes KryoGravatar shahan2018-04-09
| | | | PiperOrigin-RevId: 192155942
* Adds more debug logging to ArtifactFactory validation.Gravatar shahan2018-04-06
| | | | | | Blacklists vfs for DynamicCodec PiperOrigin-RevId: 191951230
* DynamicCodec emits a trail of type names when it encounters ↵Gravatar shahan2018-04-06
| | | | | | | | NoSuchCodecException. This will make it easier to trace down missing codecs. PiperOrigin-RevId: 191920743
* Make DynamicCodec always memoize. Since it replaces Java serialization, ↵Gravatar janakr2018-04-05
| | | | | | which memoizes, we should too. PiperOrigin-RevId: 191813677
* Transform StackOverflowError thrown in ArrayCodec into ↵Gravatar janakr2018-04-05
| | | | | | SerializationException. This can happen with deep nested sets. PiperOrigin-RevId: 191790431
* Add codec for Object[]. This may be useful for NestedSetCodec, pushing up so ↵Gravatar janakr2018-04-04
| | | | | | | | that my uncommitted change chain is a little more manageable. Unfortunately we can't get rid of the array marshaller because this only handles Object[], not any other type of array. PiperOrigin-RevId: 191662535
* Save the lookup and write of the codec index when the object is memoized, as ↵Gravatar janakr2018-04-04
| | | | | | well as the NEW_VALUE/BACKREF enum write. Probably doesn't actually take much space/time, but free optimization. PiperOrigin-RevId: 191633484
* Add ObjectCodec for AtomicReference.Gravatar janakr2018-04-04
| | | | PiperOrigin-RevId: 191615301
* Replaces JavaSerializableCodec with DynamicCodec as the defaultGravatar shahan2018-04-04
| | | | | | | | | * Skylark serialization was previously dropping location in error, which this fixes. * Deletes a lot of codecs with fidelity issues (DynamicCodec has full fidelity). * Deletes EnumRuntimeCodec which can now be replaced with the superior EnumCodec. * This should eventually allow us to delete Serializable from all Blaze. The remaining blocker is NoSuchPackageExceptionCodec. PiperOrigin-RevId: 191603929
* Don't hold on to full byte array when deserializing protocol buffers.Gravatar janakr2018-04-03
| | | | PiperOrigin-RevId: 191483825
* Moves the decision to enable memoization from codecs to the top-level ↵Gravatar shahan2018-04-02
| | | | | | | | invocation. Also, makes it benign to registerInitialValue when memoization is disabled. PiperOrigin-RevId: 191338253
* Add codec for ImmutableMultimap.Gravatar cpeyser2018-04-02
| | | | PiperOrigin-RevId: 191323243