Go to file
bmeurer@chromium.org eb381b9444 Introduce a RandonNumberGenerator class. Refactor the random/private_random uses in Isolate/Context.
The RandomNumberGenerator is a pseudorandom number generator
with 48-bit state. It is properly seeded using either

(1) the --random-seed if specified, or
(2) the entropy_source function if configured, or
(3) /dev/urandom if available, or
(4) falls back to Time and TimeTicks based seeding.

Each Isolate now contains a RandomNumberGenerator, which replaces
the previous private_random_seed.

Every native context still has its own random_seed. But this random
seed is now properly initialized during bootstrapping,
instead of on-demand initialization. This will allow us to cleanup
and speedup the HRandom implementation quite a lot (this is delayed
for a followup CL)!

Also stop messing with the system rand()/random(), which should
not be done from a library anyway! We probably re-seeded the
libc rand()/random() after the application (i.e. Chrome) already
seeded it (with better entropy than what we used).

Another followup CL will replace the use of the per-isolate
random number generator for the address randomization and
thereby get rid of the Isolate::UncheckedCurrent() usage in
the platform code.

TEST=cctest/test-random-number-generator,cctest/test-random
R=mstarzinger@chromium.org

Review URL: https://codereview.chromium.org/23548024

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16612 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-09-10 11:13:55 +00:00
benchmarks More fixes for V8 benchmark version 7. 2012-03-15 17:13:50 +00:00
build Avoid -O3 in nacl as it does not play well with -W. 2013-08-20 08:12:19 +00:00
include HeapProfiler: very slow ~4min "take snapshot time" for 80MB gmail heap. 2013-09-10 11:12:35 +00:00
preparser Factor out toolset definitions in a separate gypi file 2013-07-10 11:15:16 +00:00
samples Deprecate Persistent functions which were marked to be deprecated. 2013-09-03 07:34:34 +00:00
src Introduce a RandonNumberGenerator class. Refactor the random/private_random uses in Isolate/Context. 2013-09-10 11:13:55 +00:00
test Introduce a RandonNumberGenerator class. Refactor the random/private_random uses in Isolate/Context. 2013-09-10 11:13:55 +00:00
tools Introduce a RandonNumberGenerator class. Refactor the random/private_random uses in Isolate/Context. 2013-09-10 11:13:55 +00:00
.gitignore Add "benchmarks" test suite 2013-08-05 14:54:09 +00:00
AUTHORS Fix a crash when generating forward jumps to labels at very high assembly offsets 2013-08-01 08:13:08 +00:00
ChangeLog Prepare push to trunk. Now working on version 3.21.13. 2013-09-09 11:50:28 +00:00
DEPS Update V8's dependencies: 2013-07-31 13:41:12 +00:00
LICENSE Update LICENSE file 2012-01-03 16:38:42 +00:00
LICENSE.strongtalk Add LICENSE.v8, LICENSE.strongtalk and LICENSE.valgrind to the v8 2011-02-03 07:10:06 +00:00
LICENSE.v8 Add LICENSE.v8, LICENSE.strongtalk and LICENSE.valgrind to the v8 2011-02-03 07:10:06 +00:00
LICENSE.valgrind Add LICENSE.v8, LICENSE.strongtalk and LICENSE.valgrind to the v8 2011-02-03 07:10:06 +00:00
Makefile Generate grokdump constants with 'make grokdump' now. 2013-08-02 09:02:02 +00:00
Makefile.android Enable building for android on x86_64 machines. 2013-07-17 08:37:48 +00:00
Makefile.nacl Fix gyp_v8 to work with use_system_icu=1 2013-07-15 15:41:21 +00:00
OWNERS Add myself to OWNERS. 2013-06-27 11:37:47 +00:00
PRESUBMIT.py Add gate keeper logic to presubmit commit check. 2013-07-31 09:16:31 +00:00