Blame jemalloc/include/jemalloc/internal/prof_types.h

Packit Service 724aca
#ifndef JEMALLOC_INTERNAL_PROF_TYPES_H
Packit Service 724aca
#define JEMALLOC_INTERNAL_PROF_TYPES_H
Packit Service 724aca
Packit Service 724aca
typedef struct prof_bt_s prof_bt_t;
Packit Service 724aca
typedef struct prof_accum_s prof_accum_t;
Packit Service 724aca
typedef struct prof_cnt_s prof_cnt_t;
Packit Service 724aca
typedef struct prof_tctx_s prof_tctx_t;
Packit Service 724aca
typedef struct prof_gctx_s prof_gctx_t;
Packit Service 724aca
typedef struct prof_tdata_s prof_tdata_t;
Packit Service 724aca
Packit Service 724aca
/* Option defaults. */
Packit Service 724aca
#ifdef JEMALLOC_PROF
Packit Service 724aca
#  define PROF_PREFIX_DEFAULT		"jeprof"
Packit Service 724aca
#else
Packit Service 724aca
#  define PROF_PREFIX_DEFAULT		""
Packit Service 724aca
#endif
Packit Service 724aca
#define LG_PROF_SAMPLE_DEFAULT		19
Packit Service 724aca
#define LG_PROF_INTERVAL_DEFAULT	-1
Packit Service 724aca
Packit Service 724aca
/*
Packit Service 724aca
 * Hard limit on stack backtrace depth.  The version of prof_backtrace() that
Packit Service 724aca
 * is based on __builtin_return_address() necessarily has a hard-coded number
Packit Service 724aca
 * of backtrace frame handlers, and should be kept in sync with this setting.
Packit Service 724aca
 */
Packit Service 724aca
#define PROF_BT_MAX			128
Packit Service 724aca
Packit Service 724aca
/* Initial hash table size. */
Packit Service 724aca
#define PROF_CKH_MINITEMS		64
Packit Service 724aca
Packit Service 724aca
/* Size of memory buffer to use when writing dump files. */
Packit Service 724aca
#define PROF_DUMP_BUFSIZE		65536
Packit Service 724aca
Packit Service 724aca
/* Size of stack-allocated buffer used by prof_printf(). */
Packit Service 724aca
#define PROF_PRINTF_BUFSIZE		128
Packit Service 724aca
Packit Service 724aca
/*
Packit Service 724aca
 * Number of mutexes shared among all gctx's.  No space is allocated for these
Packit Service 724aca
 * unless profiling is enabled, so it's okay to over-provision.
Packit Service 724aca
 */
Packit Service 724aca
#define PROF_NCTX_LOCKS			1024
Packit Service 724aca
Packit Service 724aca
/*
Packit Service 724aca
 * Number of mutexes shared among all tdata's.  No space is allocated for these
Packit Service 724aca
 * unless profiling is enabled, so it's okay to over-provision.
Packit Service 724aca
 */
Packit Service 724aca
#define PROF_NTDATA_LOCKS		256
Packit Service 724aca
Packit Service 724aca
/*
Packit Service 724aca
 * prof_tdata pointers close to NULL are used to encode state information that
Packit Service 724aca
 * is used for cleaning up during thread shutdown.
Packit Service 724aca
 */
Packit Service 724aca
#define PROF_TDATA_STATE_REINCARNATED	((prof_tdata_t *)(uintptr_t)1)
Packit Service 724aca
#define PROF_TDATA_STATE_PURGATORY	((prof_tdata_t *)(uintptr_t)2)
Packit Service 724aca
#define PROF_TDATA_STATE_MAX		PROF_TDATA_STATE_PURGATORY
Packit Service 724aca
Packit Service 724aca
#endif /* JEMALLOC_INTERNAL_PROF_TYPES_H */