2024-01-26 20:12:43 +00:00
|
|
|
#ifndef GPERFTOOLS_CONFIG_H_
|
2017-11-03 13:10:27 +00:00
|
|
|
#define GPERFTOOLS_CONFIG_H_
|
|
|
|
|
2020-09-11 18:43:56 +00:00
|
|
|
/* Enable aggressive decommit by default */
|
|
|
|
#cmakedefine ENABLE_AGGRESSIVE_DECOMMIT_BY_DEFAULT
|
|
|
|
|
|
|
|
/* Build runtime detection for sized delete */
|
|
|
|
#cmakedefine ENABLE_DYNAMIC_SIZED_DELETE
|
2017-11-03 13:10:27 +00:00
|
|
|
|
2020-09-11 18:43:56 +00:00
|
|
|
/* Report large allocation */
|
|
|
|
#cmakedefine ENABLE_LARGE_ALLOC_REPORT
|
|
|
|
|
|
|
|
/* Build sized deletion operators */
|
|
|
|
#cmakedefine ENABLE_SIZED_DELETE
|
|
|
|
|
|
|
|
/* Define to 1 if you have the <asm/ptrace.h> header file. */
|
2023-09-04 12:40:27 +00:00
|
|
|
#cmakedefine HAVE_ASM_PTRACE_H
|
2020-09-11 18:43:56 +00:00
|
|
|
|
|
|
|
/* Define to 1 if you have the <cygwin/signal.h> header file. */
|
2023-09-04 12:40:27 +00:00
|
|
|
#cmakedefine HAVE_CYGWIN_SIGNAL_H
|
2017-11-03 13:10:27 +00:00
|
|
|
|
2020-09-11 18:43:56 +00:00
|
|
|
/* Define to 1 if you have the declaration of `backtrace', and to 0 if you
|
|
|
|
don't. */
|
|
|
|
#cmakedefine01 HAVE_DECL_BACKTRACE
|
|
|
|
|
|
|
|
/* Define to 1 if you have the declaration of `cfree', and to 0 if you don't.
|
|
|
|
*/
|
2017-11-05 17:53:07 +00:00
|
|
|
#cmakedefine01 HAVE_DECL_CFREE
|
2017-11-03 13:10:27 +00:00
|
|
|
|
2020-09-11 18:43:56 +00:00
|
|
|
/* Define to 1 if you have the declaration of `memalign', and to 0 if you
|
|
|
|
don't. */
|
2017-11-05 17:53:07 +00:00
|
|
|
#cmakedefine01 HAVE_DECL_MEMALIGN
|
2017-11-03 13:10:27 +00:00
|
|
|
|
2020-09-11 18:43:56 +00:00
|
|
|
/* Define to 1 if you have the declaration of `nanosleep', and to 0 if you
|
|
|
|
don't. */
|
|
|
|
#cmakedefine01 HAVE_DECL_NANOSLEEP
|
|
|
|
|
|
|
|
/* Define to 1 if you have the declaration of `posix_memalign', and to 0 if
|
|
|
|
you don't. */
|
2017-11-05 17:53:07 +00:00
|
|
|
#cmakedefine01 HAVE_DECL_POSIX_MEMALIGN
|
2017-11-03 13:10:27 +00:00
|
|
|
|
2020-09-11 18:43:56 +00:00
|
|
|
/* Define to 1 if you have the declaration of `pvalloc', and to 0 if you
|
|
|
|
don't. */
|
2017-11-05 17:53:07 +00:00
|
|
|
#cmakedefine01 HAVE_DECL_PVALLOC
|
2017-11-03 13:10:27 +00:00
|
|
|
|
2020-09-11 18:43:56 +00:00
|
|
|
/* Define to 1 if you have the declaration of `sleep', and to 0 if you don't.
|
|
|
|
*/
|
|
|
|
#cmakedefine01 HAVE_DECL_SLEEP
|
|
|
|
|
|
|
|
/* Define to 1 if you have the declaration of `valloc', and to 0 if you don't.
|
|
|
|
*/
|
2017-11-05 17:53:07 +00:00
|
|
|
#cmakedefine01 HAVE_DECL_VALLOC
|
2017-11-03 13:10:27 +00:00
|
|
|
|
2020-09-11 18:43:56 +00:00
|
|
|
/* Define to 1 if you have the <execinfo.h> header file. */
|
2023-09-04 12:40:27 +00:00
|
|
|
#cmakedefine HAVE_EXECINFO_H
|
2017-11-03 13:10:27 +00:00
|
|
|
|
2020-09-11 18:43:56 +00:00
|
|
|
/* Define to 1 if you have the <fcntl.h> header file. */
|
2023-09-04 12:40:27 +00:00
|
|
|
#cmakedefine HAVE_FCNTL_H
|
2017-11-03 13:10:27 +00:00
|
|
|
|
2020-09-11 18:43:56 +00:00
|
|
|
/* Define to 1 if you have the <features.h> header file. */
|
2023-09-04 12:40:27 +00:00
|
|
|
#cmakedefine HAVE_FEATURES_H
|
2017-11-03 13:10:27 +00:00
|
|
|
|
2020-09-11 18:43:56 +00:00
|
|
|
/* Define to 1 if you have the `geteuid' function. */
|
2023-09-04 12:40:27 +00:00
|
|
|
#cmakedefine HAVE_GETEUID
|
2017-11-03 13:10:27 +00:00
|
|
|
|
2020-09-11 18:43:56 +00:00
|
|
|
/* Define to 1 if you have the <glob.h> header file. */
|
2023-09-04 12:40:27 +00:00
|
|
|
#cmakedefine HAVE_GLOB_H
|
2017-11-03 13:10:27 +00:00
|
|
|
|
2020-09-11 18:43:56 +00:00
|
|
|
/* Define to 1 if you have the <grp.h> header file. */
|
2023-09-04 12:40:27 +00:00
|
|
|
#cmakedefine HAVE_GRP_H
|
2017-11-03 13:10:27 +00:00
|
|
|
|
2020-09-11 18:43:56 +00:00
|
|
|
/* Define to 1 if you have the <libunwind.h> header file. */
|
2023-07-02 22:11:51 +00:00
|
|
|
#cmakedefine01 HAVE_LIBUNWIND_H
|
2017-11-03 13:10:27 +00:00
|
|
|
|
2023-06-21 14:38:31 +00:00
|
|
|
#cmakedefine USE_LIBUNWIND
|
|
|
|
|
2020-09-11 18:43:56 +00:00
|
|
|
/* Define if this is Linux that has SIGEV_THREAD_ID */
|
|
|
|
#cmakedefine01 HAVE_LINUX_SIGEV_THREAD_ID
|
|
|
|
|
|
|
|
/* Define to 1 if you have the <malloc.h> header file. */
|
2023-09-04 12:40:27 +00:00
|
|
|
#cmakedefine HAVE_MALLOC_H
|
2017-11-03 13:10:27 +00:00
|
|
|
|
2020-09-11 18:43:56 +00:00
|
|
|
/* Define to 1 if you have the <malloc/malloc.h> header file. */
|
2023-09-04 12:40:27 +00:00
|
|
|
#cmakedefine HAVE_MALLOC_MALLOC_H
|
2017-11-03 13:10:27 +00:00
|
|
|
|
2020-09-11 18:43:56 +00:00
|
|
|
/* Define to 1 if you have a working `mmap' system call. */
|
2023-09-04 12:40:27 +00:00
|
|
|
#cmakedefine HAVE_MMAP
|
2017-11-03 13:10:27 +00:00
|
|
|
|
2020-09-11 18:43:56 +00:00
|
|
|
/* Define to 1 if you have the <poll.h> header file. */
|
2023-09-04 12:40:27 +00:00
|
|
|
#cmakedefine HAVE_POLL_H
|
2017-11-03 13:10:27 +00:00
|
|
|
|
2020-09-11 18:43:56 +00:00
|
|
|
/* define if libc has program_invocation_name */
|
2023-09-04 12:40:27 +00:00
|
|
|
#cmakedefine HAVE_PROGRAM_INVOCATION_NAME
|
2017-11-03 13:10:27 +00:00
|
|
|
|
2020-09-11 18:43:56 +00:00
|
|
|
/* Define to 1 if you have the <pwd.h> header file. */
|
2023-09-04 12:40:27 +00:00
|
|
|
#cmakedefine HAVE_PWD_H
|
2017-11-03 13:10:27 +00:00
|
|
|
|
2020-09-11 18:43:56 +00:00
|
|
|
/* Define to 1 if you have the `sbrk' function. */
|
2023-09-04 12:40:27 +00:00
|
|
|
#cmakedefine HAVE_SBRK
|
2017-11-03 13:10:27 +00:00
|
|
|
|
2020-09-11 18:43:56 +00:00
|
|
|
/* Define to 1 if you have the <sched.h> header file. */
|
2023-09-04 12:40:27 +00:00
|
|
|
#cmakedefine HAVE_SCHED_H
|
2017-11-03 13:10:27 +00:00
|
|
|
|
2020-09-11 18:43:56 +00:00
|
|
|
/* Define to 1 if the system has the type `struct mallinfo'. */
|
2023-09-04 12:40:27 +00:00
|
|
|
#cmakedefine HAVE_STRUCT_MALLINFO
|
2017-11-03 13:10:27 +00:00
|
|
|
|
2023-12-07 13:10:51 +00:00
|
|
|
/* Define to 1 if the system has the type `struct mallinfo2'. */
|
|
|
|
#cmakedefine HAVE_STRUCT_MALLINFO2
|
|
|
|
|
2020-09-11 18:43:56 +00:00
|
|
|
/* Define to 1 if you have the <sys/cdefs.h> header file. */
|
2023-09-04 12:40:27 +00:00
|
|
|
#cmakedefine HAVE_SYS_CDEFS_H
|
2017-11-03 13:10:27 +00:00
|
|
|
|
2020-09-11 18:43:56 +00:00
|
|
|
/* Define to 1 if you have the <sys/malloc.h> header file. */
|
2023-09-04 12:40:27 +00:00
|
|
|
#cmakedefine HAVE_SYS_MALLOC_H
|
2017-11-03 13:10:27 +00:00
|
|
|
|
2020-09-11 18:43:56 +00:00
|
|
|
/* Define to 1 if you have the <sys/socket.h> header file. */
|
2023-09-04 12:40:27 +00:00
|
|
|
#cmakedefine HAVE_SYS_SOCKET_H
|
2017-11-03 13:10:27 +00:00
|
|
|
|
2020-09-11 18:43:56 +00:00
|
|
|
/* Define to 1 if you have the <sys/syscall.h> header file. */
|
2023-07-02 22:11:51 +00:00
|
|
|
#cmakedefine01 HAVE_SYS_SYSCALL_H
|
2017-11-03 13:10:27 +00:00
|
|
|
|
2020-09-11 18:43:56 +00:00
|
|
|
/* Define to 1 if you have the <sys/types.h> header file. */
|
2023-09-04 12:40:27 +00:00
|
|
|
#cmakedefine HAVE_SYS_TYPES_H
|
2017-11-03 13:10:27 +00:00
|
|
|
|
2020-09-11 18:43:56 +00:00
|
|
|
/* Define to 1 if you have the <sys/ucontext.h> header file. */
|
2023-07-02 22:11:51 +00:00
|
|
|
#cmakedefine01 HAVE_SYS_UCONTEXT_H
|
2017-11-03 13:10:27 +00:00
|
|
|
|
2020-09-11 18:43:56 +00:00
|
|
|
/* Define to 1 if you have the <sys/wait.h> header file. */
|
2023-09-04 12:40:27 +00:00
|
|
|
#cmakedefine HAVE_SYS_WAIT_H
|
2017-11-03 13:10:27 +00:00
|
|
|
|
2020-09-11 18:43:56 +00:00
|
|
|
/* Define to 1 if you have the <ucontext.h> header file. */
|
2023-07-02 22:11:51 +00:00
|
|
|
#cmakedefine01 HAVE_UCONTEXT_H
|
2017-11-03 13:10:27 +00:00
|
|
|
|
2020-09-11 18:43:56 +00:00
|
|
|
/* Define to 1 if you have the <unistd.h> header file. */
|
2023-09-04 12:40:27 +00:00
|
|
|
#cmakedefine HAVE_UNISTD_H
|
2017-11-03 13:10:27 +00:00
|
|
|
|
2020-09-11 18:43:56 +00:00
|
|
|
/* Whether <unwind.h> contains _Unwind_Backtrace */
|
|
|
|
#cmakedefine HAVE_UNWIND_BACKTRACE
|
|
|
|
|
|
|
|
/* Define to 1 if you have the <unwind.h> header file. */
|
2023-09-04 12:40:27 +00:00
|
|
|
#cmakedefine HAVE_UNWIND_H
|
2017-11-03 13:10:27 +00:00
|
|
|
|
2020-09-11 18:43:56 +00:00
|
|
|
/* define if your compiler has __attribute__ */
|
2017-11-03 13:10:27 +00:00
|
|
|
#cmakedefine HAVE___ATTRIBUTE__
|
|
|
|
|
2020-09-11 18:43:56 +00:00
|
|
|
/* define if your compiler supports alignment of functions */
|
|
|
|
#cmakedefine HAVE___ATTRIBUTE__ALIGNED_FN
|
|
|
|
|
|
|
|
/* Define to 1 if compiler supports __environ */
|
2023-09-04 12:40:27 +00:00
|
|
|
#cmakedefine HAVE___ENVIRON
|
2017-11-03 13:10:27 +00:00
|
|
|
|
2020-09-11 18:43:56 +00:00
|
|
|
/* Define to 1 if you have the `__sbrk' function. */
|
2023-07-02 22:11:51 +00:00
|
|
|
#cmakedefine01 HAVE___SBRK
|
2020-09-11 18:43:56 +00:00
|
|
|
|
|
|
|
/* prefix where we look for installed files */
|
2017-11-03 13:10:27 +00:00
|
|
|
#cmakedefine INSTALL_PREFIX
|
|
|
|
|
2020-09-11 18:43:56 +00:00
|
|
|
/* Define to the sub-directory where libtool stores uninstalled libraries. */
|
2017-11-03 13:10:27 +00:00
|
|
|
#cmakedefine LT_OBJDIR
|
|
|
|
|
2020-09-11 18:43:56 +00:00
|
|
|
/* Always the empty-string on non-windows systems. On windows, should be
|
|
|
|
"__declspec(dllexport)". This way, when we compile the dll, we export our
|
|
|
|
functions/classes. It's safe to define this here because config.h is only
|
|
|
|
used internally, to compile the DLL, and every DLL source file #includes
|
|
|
|
"config.h" before anything else. */
|
2017-11-03 13:10:27 +00:00
|
|
|
#if defined(WIN32)
|
|
|
|
#ifndef PERFTOOLS_DLL_DECL
|
2020-09-11 18:43:56 +00:00
|
|
|
# define PERFTOOLS_IS_A_DLL 1
|
|
|
|
# define PERFTOOLS_DLL_DECL __declspec(dllexport)
|
2017-11-03 13:10:27 +00:00
|
|
|
# define PERFTOOLS_DLL_DECL_FOR_UNITTESTS __declspec(dllimport)
|
|
|
|
#endif
|
2017-11-05 17:23:42 +00:00
|
|
|
#else
|
|
|
|
#ifndef PERFTOOLS_DLL_DECL
|
|
|
|
# define PERFTOOLS_DLL_DECL
|
|
|
|
# define PERFTOOLS_DLL_DECL_FOR_UNITTESTS
|
|
|
|
#endif
|
2017-11-03 13:10:27 +00:00
|
|
|
#endif
|
|
|
|
|
2023-12-24 01:38:59 +00:00
|
|
|
/* if libgcc stacktrace method should be default */
|
|
|
|
#cmakedefine PREFER_LIBGCC_UNWINDER
|
|
|
|
|
2020-09-11 18:43:56 +00:00
|
|
|
/* Define 8 bytes of allocation alignment for tcmalloc */
|
|
|
|
#cmakedefine TCMALLOC_ALIGN_8BYTES
|
|
|
|
|
|
|
|
/* Define internal page size for tcmalloc as number of left bitshift */
|
2023-12-24 00:51:00 +00:00
|
|
|
#cmakedefine TCMALLOC_PAGE_SIZE_SHIFT @TCMALLOC_PAGE_SIZE_SHIFT@
|
2020-09-11 18:43:56 +00:00
|
|
|
|
|
|
|
/* C99 says: define this to get the PRI... macros from stdint.h */
|
2017-11-03 13:10:27 +00:00
|
|
|
#ifndef __STDC_FORMAT_MACROS
|
|
|
|
# define __STDC_FORMAT_MACROS 1
|
|
|
|
#endif
|
|
|
|
|
2024-01-26 20:12:43 +00:00
|
|
|
#ifdef WIN32
|
2020-09-11 18:43:56 +00:00
|
|
|
// TODO(csilvers): include windows/port.h in every relevant source file instead?
|
2017-11-03 13:10:27 +00:00
|
|
|
#include "windows/port.h"
|
2024-01-26 20:12:43 +00:00
|
|
|
#endif /* WIN32 */
|
2017-11-03 13:10:27 +00:00
|
|
|
|
2024-01-30 01:31:21 +00:00
|
|
|
#endif /* GPERFTOOLS_CONFIG_H_ */
|