Changeset View
Changeset View
Standalone View
Standalone View
sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c
- This file is larger than 256 KB, so syntax highlighting is disabled by default.
Show First 20 Lines • Show All 14,676 Lines • ▼ Show 20 Lines | #endif | ||||
state->dts_buffer = kmem_zalloc(bufsize, KM_SLEEP); | state->dts_buffer = kmem_zalloc(bufsize, KM_SLEEP); | ||||
state->dts_aggbuffer = kmem_zalloc(bufsize, KM_SLEEP); | state->dts_aggbuffer = kmem_zalloc(bufsize, KM_SLEEP); | ||||
/* | /* | ||||
* Allocate and initialise the per-process per-CPU random state. | * Allocate and initialise the per-process per-CPU random state. | ||||
* SI_SUB_RANDOM < SI_SUB_DTRACE_ANON therefore entropy device is | * SI_SUB_RANDOM < SI_SUB_DTRACE_ANON therefore entropy device is | ||||
* assumed to be seeded at this point (if from Fortuna seed file). | * assumed to be seeded at this point (if from Fortuna seed file). | ||||
*/ | */ | ||||
(void) read_random(&state->dts_rstate[0], 2 * sizeof(uint64_t)); | arc4random_buf(&state->dts_rstate[0], 2 * sizeof(uint64_t)); | ||||
for (cpu_it = 1; cpu_it < NCPU; cpu_it++) { | for (cpu_it = 1; cpu_it < NCPU; cpu_it++) { | ||||
/* | /* | ||||
* Each CPU is assigned a 2^64 period, non-overlapping | * Each CPU is assigned a 2^64 period, non-overlapping | ||||
* subsequence. | * subsequence. | ||||
*/ | */ | ||||
dtrace_xoroshiro128_plus_jump(state->dts_rstate[cpu_it-1], | dtrace_xoroshiro128_plus_jump(state->dts_rstate[cpu_it-1], | ||||
state->dts_rstate[cpu_it]); | state->dts_rstate[cpu_it]); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 3,782 Lines • Show Last 20 Lines |