Deleted Added
full compact
prof.h (288090) prof.h (296221)
1/******************************************************************************/
2#ifdef JEMALLOC_H_TYPES
3
4typedef struct prof_bt_s prof_bt_t;
5typedef struct prof_cnt_s prof_cnt_t;
6typedef struct prof_tctx_s prof_tctx_t;
7typedef struct prof_gctx_s prof_gctx_t;
8typedef struct prof_tdata_s prof_tdata_t;

--- 422 unchanged lines hidden (view full) ---

431prof_sample_accum_update(tsd_t *tsd, size_t usize, bool update,
432 prof_tdata_t **tdata_out)
433{
434 prof_tdata_t *tdata;
435
436 cassert(config_prof);
437
438 tdata = prof_tdata_get(tsd, true);
1/******************************************************************************/
2#ifdef JEMALLOC_H_TYPES
3
4typedef struct prof_bt_s prof_bt_t;
5typedef struct prof_cnt_s prof_cnt_t;
6typedef struct prof_tctx_s prof_tctx_t;
7typedef struct prof_gctx_s prof_gctx_t;
8typedef struct prof_tdata_s prof_tdata_t;

--- 422 unchanged lines hidden (view full) ---

431prof_sample_accum_update(tsd_t *tsd, size_t usize, bool update,
432 prof_tdata_t **tdata_out)
433{
434 prof_tdata_t *tdata;
435
436 cassert(config_prof);
437
438 tdata = prof_tdata_get(tsd, true);
439 if ((uintptr_t)tdata <= (uintptr_t)PROF_TDATA_STATE_MAX)
439 if (unlikely((uintptr_t)tdata <= (uintptr_t)PROF_TDATA_STATE_MAX))
440 tdata = NULL;
441
442 if (tdata_out != NULL)
443 *tdata_out = tdata;
444
440 tdata = NULL;
441
442 if (tdata_out != NULL)
443 *tdata_out = tdata;
444
445 if (tdata == NULL)
445 if (unlikely(tdata == NULL))
446 return (true);
447
446 return (true);
447
448 if (tdata->bytes_until_sample >= usize) {
448 if (likely(tdata->bytes_until_sample >= usize)) {
449 if (update)
450 tdata->bytes_until_sample -= usize;
451 return (true);
452 } else {
453 /* Compute new sample threshold. */
454 if (update)
455 prof_sample_threshold_update(tdata);
456 return (!tdata->active);

--- 89 unchanged lines hidden ---
449 if (update)
450 tdata->bytes_until_sample -= usize;
451 return (true);
452 } else {
453 /* Compute new sample threshold. */
454 if (update)
455 prof_sample_threshold_update(tdata);
456 return (!tdata->active);

--- 89 unchanged lines hidden ---