Eelco Dolstra
2995f9c48f
Garbage-collect strings
2019-04-29 16:27:56 +02:00
Eelco Dolstra
9b822de4ef
Inline allocValue()
2019-04-29 16:27:56 +02:00
Eelco Dolstra
14f7a60755
Keep some stats
2019-04-24 13:46:34 +02:00
Eelco Dolstra
80accdcebe
Remove Boehm GC dependency
2019-04-24 00:07:42 +02:00
Eelco Dolstra
69adbf5c77
Rename
2019-04-23 22:50:01 +02:00
Eelco Dolstra
35b76b21ee
Size -> size_t
2019-04-23 22:47:30 +02:00
Eelco Dolstra
ba36d43d46
Freelist improvements
2019-04-23 22:44:17 +02:00
Eelco Dolstra
93b3d25bbb
Move parseSize() to libutil
2019-04-23 22:33:10 +02:00
Eelco Dolstra
f7f73cf5ae
Allow disabling some GC debug checks
2019-04-23 13:56:38 +02:00
Eelco Dolstra
a38a7b495c
Use Value::misc to store strings
...
This allows strings < 23 characters (up from 16) to be stored directly
in Value. On a NixOS 19.03 system configuration evaluation, this
allows 1060588 out of 1189295 (89%) strings to be stored in Value.
2019-04-23 12:54:12 +02:00
Eelco Dolstra
742a8046de
Store short strings in Values
...
The vast majority of strings are < 16 bytes, and so can be stored
directly in a Value. This saves a heap allocation and an indirection.
2019-04-23 12:20:27 +02:00
Eelco Dolstra
2160258cc4
Store contexts as symbols
...
This provides some deduplication since most contexts are used multiple
times.
Also, store singleton contexts directly in the Value object. This
saves a 16-byte Context object. This is useful because the vast
majority of contexts are singletons, e.g. 23723 out of 26138 in a
NixOS 19.03 system configuration.
2019-04-23 11:07:47 +02:00
Eelco Dolstra
e392ff53e9
Remove a word from Env
2019-04-23 01:11:50 +02:00
Eelco Dolstra
ae5b76a5a4
Checkpoint
2019-04-23 00:39:14 +02:00
Eelco Dolstra
7c716b4c49
Checkpoint
2019-04-22 23:25:47 +02:00
Eelco Dolstra
4237414f4d
Checkpoint
2019-04-15 18:40:35 +02:00
Eelco Dolstra
bb6e6923f2
Add environment variable NIX_SHOW_SYMBOLS for dumping the symbol table
2019-04-11 23:04:13 +02:00
Eelco Dolstra
41ba5135e0
primeCache(): Barf if builds are needed but not allowed
...
Fixes #2753 .
2019-04-01 21:09:49 +02:00
Eelco Dolstra
2bc6304793
getMachines(): Cache result
2019-04-01 21:09:35 +02:00
Eelco Dolstra
f32fbf952d
Fix Bison 3.3 warning
2019-03-27 21:09:31 +01:00
Eelco Dolstra
5c05c238e6
Merge pull request #1828 from zimbatm/isPath
...
Add isPath primop
2019-03-25 19:58:11 +01:00
Will Dietz
42e2d5e7b7
store-api.hh: add missing include for unordered_map
2019-03-25 09:18:30 +01:00
zimbatm
514b3c7f83
Add isPath primop
...
this is added for completeness' sake since all the other possible
`builtins.typeOf` results have a corresponding `builtins.is<Type>`
2019-03-24 11:36:49 +01:00
Linus Heckemann
2aa89daab3
eval: improve type description for primops and applied primops
...
This can make type errors a little easier to understand.
2019-03-21 15:31:46 +01:00
Chaker Benhamed
81a23fa7e2
Add a 5 seconds of timeouts to connect to S3.
...
The default is 1000ms, but we can hit it a lot of we don't have direct
link to AWS (e.g. using VPN).
2019-03-15 13:23:58 +01:00
Eelco Dolstra
1f64f4c7c8
pkg-config files: Use c++17
2019-03-14 14:11:12 +01:00
Eelco Dolstra
ef52ccf035
experimental/optional -> optional
2019-03-14 14:10:52 +01:00
Eelco Dolstra
86f3b94c8c
nix-store --gc --print-roots: Sort output
2019-03-14 13:59:10 +01:00
Eelco Dolstra
578ed7a259
findRoots(): Don't censor for trusted users
...
They're pretty much root anyway.
2019-03-14 13:53:34 +01:00
Eelco Dolstra
53522cb6ac
findRoots(): Add 'censor' parameter
...
This is less brittle than filtering paths after the fact in
nix-daemon.
2019-03-14 13:53:34 +01:00
Eelco Dolstra
a3f37d87ea
findRuntimeRoots: Simplify/fix handling of /proc files
...
Scanning of /proc/<pid>/{exe,cwd} was broken because '{memory:' was
prepended twice. Also, get rid of the whole '{memory:...}' thing
because it's unnecessary, we can just list the file in /proc directly.
2019-03-14 13:30:25 +01:00
Guillaume Maudoux
4f4391193c
Fix warning about unused variable
2019-03-10 00:56:09 +01:00
Guillaume Maudoux
38ee16ae9c
Unify internal findRootsXxx() api
2019-03-10 00:56:09 +01:00
Guillaume Maudoux
9d7221183a
unify naming of roots as links & targets
2019-03-10 00:56:09 +01:00
Guillaume Maudoux
5c56570726
Also obfuscate the number of memory roots
2019-03-10 00:56:09 +01:00
Guillaume Maudoux
fc02b1b3ee
Also print rooted path in nix-store -q --roots
2019-03-10 00:56:09 +01:00
Guillaume Maudoux
8574b70342
fixup! Make roots a map of store paths to pinning links
2019-03-10 00:56:09 +01:00
Guillaume Maudoux
ebc86550f9
Make roots a map of store paths to pinning links
...
This new structure makes more sense as there may be many sources rooting
the same store path. Many profiles can reference the same path but this
is even more true with /proc/<pid>/maps where distinct pids can and
often do map the same store path.
This implementation is also more efficient as the `Roots` map contains
only one entry per rooted store path.
2019-03-10 00:56:09 +01:00
Guillaume Maudoux
a17f86ce3a
Obfuscate memory roots for non-root users
2019-03-10 00:56:09 +01:00
Guillaume Maudoux
43331d6344
detail memory roots
2019-03-10 00:56:09 +01:00
volth
fff8db205c
canBuildLocally: check for features
...
It could happen that the local builder match the system but lacks some features.
Now it results a failure.
The fix gracefully excludes the local builder from the set of available builders for derivation which requires the feature, so the derivation is built on remote builders only (as though it has incompatible system, like ```aarch64-linux``` when local is x86)
2019-03-06 05:03:25 +00:00
Will Dietz
0963479741
archive.cc: ignore more posix_fallocate "not supported" error codes
...
Fixes w/musl.
2019-03-01 10:31:17 +08:00
Dzmitry Zaitsau
06d6335987
fix indentation
2019-02-26 11:07:37 +01:00
Dzmitry Zaitsau
ac200c3678
Apply param values on S3Helper initialization
2019-02-25 18:06:19 +01:00
Dzmitry Zaitsau
56c18c67d9
Extend S3 URL parsing with parameters extraction
2019-02-25 18:00:55 +01:00
Dzmitry Zaitsau
07f992a74b
Extract and expose splitUriAndParams function
...
which splits a URL into localtor and parameter parts
2019-02-25 17:59:26 +01:00
Eelco Dolstra
d8fe447139
Merge pull request #2579 from catern/dumpdb
...
nix-store: make --dump-db take a list of paths to dump
2019-02-14 13:08:02 +01:00
Eelco Dolstra
7a7ec22298
Merge pull request #2628 from shlevy/context-introspection
...
Context introspection
2019-02-12 17:57:35 +01:00
Eelco Dolstra
01d07b1e92
Revert "Restore parent mount namespace before executing a child process"
...
This reverts commit a0ef21262f . This
doesn't work in 'nix run' and nix-shell because setns() fails in
multithreaded programs, and Boehm GC mark threads are uncancellable.
Fixes #2646 .
2019-02-05 10:49:19 +01:00
Shea Levy
b30be6b450
Add builtins.appendContext.
...
A partner of builtins.getContext, useful for the same reasons.
2019-01-31 08:52:23 -05:00