Refactor and optimize prof sampling initialization.

Makes the prof sample prng use the tsd prng_state.  This allows us to properly
initialize the sample interval event, without having to create tdata.  As a
result, tdata will be created on demand (when a thread reaches the sample
interval bytes allocated), instead of on the first allocation.
This commit is contained in:
Qi Wang
2019-11-04 17:22:25 -08:00
committed by Qi Wang
parent bc774a3519
commit da50d8ce87
7 changed files with 16 additions and 59 deletions
-3
View File
@@ -167,9 +167,6 @@ struct prof_tdata_s {
*/
ckh_t bt2tctx;
/* Sampling state. */
uint64_t prng_state;
/* State used to avoid dumping while operating on prof internals. */
bool enq;
bool enq_idump;