123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473 |
- ACLOCAL_AMFLAGS = -I m4
- AUTOMAKE_OPTIONS = subdir-objects
- AM_CPPFLAGS = -I$(top_srcdir)/src
- if !WITH_STACK_TRACE
- AM_CPPFLAGS += -DNO_TCMALLOC_SAMPLES
- endif !WITH_STACK_TRACE
- AM_CXXFLAGS =
- NO_BUILTIN_CXXFLAGS =
- if GCC
- AM_CXXFLAGS += -Wall -Wwrite-strings -Woverloaded-virtual \
- -Wno-sign-compare \
- -fno-builtin-malloc -fno-builtin-free -fno-builtin-realloc \
- -fno-builtin-calloc -fno-builtin-cfree \
- -fno-builtin-memalign -fno-builtin-posix_memalign \
- -fno-builtin-valloc -fno-builtin-pvalloc
- NO_BUILTIN_CXXFLAGS += -fno-builtin
- if I386
- AM_CXXFLAGS += -mmmx
- AM_CXXFLAGS += -fno-omit-frame-pointer
- endif I386
- endif GCC
- if HAVE_W_NO_UNUSED_RESULT
- AM_CXXFLAGS += -Wno-unused-result
- endif HAVE_W_NO_UNUSED_RESULT
- AM_LDFLAGS = -no-undefined $(LIBSTDCXX_LA_LINKER_FLAG)
- if GCC
- NO_EXCEPTIONS = -fno-exceptions
- else !GCC
- NO_EXCEPTIONS =
- endif !GCC
- if X86_64_AND_NO_FP_BY_DEFAULT
- if ENABLE_FRAME_POINTERS
- AM_CXXFLAGS += -fno-omit-frame-pointer
- else
-
-
- AM_CXXFLAGS += -DNO_FRAME_POINTER
- endif !ENABLE_FRAME_POINTERS
- endif X86_64_AND_NO_FP_BY_DEFAULT
- TCMALLOC_FLAGS =
- if MINGW
- TCMALLOC_FLAGS += -Wl,-u__tcmalloc
- endif MINGW
- if HAVE_OBJCOPY_WEAKEN
- WEAKEN = $(OBJCOPY) -W malloc -W free -W realloc -W calloc -W cfree \
- -W memalign -W posix_memalign -W valloc -W pvalloc \
- -W malloc_stats -W mallopt -W mallinfo \
- -W _Znwm -W _ZnwmRKSt9nothrow_t -W _Znam -W _ZnamRKSt9nothrow_t \
- -W _ZdlPv -W _ZdaPv \
- -W __Znwm -W __ZnwmRKSt9nothrow_t -W __Znam -W __ZnamRKSt9nothrow_t \
- -W __ZdlPv -W __ZdaPv
- else
- WEAKEN = :
- endif !HAVE_OBJCOPY_WEAKEN
- LIBS_TO_WEAKEN =
- perftoolsincludedir = $(includedir)/gperftools
- perftoolsinclude_HEADERS =
- nodist_perftoolsinclude_HEADERS = src/gperftools/tcmalloc.h
- noinst_HEADERS = src/gperftools/tcmalloc.h.in
- googleincludedir = $(includedir)/google
- googleinclude_HEADERS = \
- src/google/heap-checker.h \
- src/google/heap-profiler.h \
- src/google/malloc_extension.h \
- src/google/malloc_extension_c.h \
- src/google/malloc_hook.h \
- src/google/malloc_hook_c.h \
- src/google/profiler.h \
- src/google/stacktrace.h \
- src/google/tcmalloc.h
- dist_doc_DATA = AUTHORS COPYING ChangeLog INSTALL NEWS README README_windows.txt \
- TODO
- lib_LTLIBRARIES =
- noinst_LTLIBRARIES =
- WINDOWS_PROJECTS = gperftools.sln
- TESTS =
- TESTS_ENVIRONMENT =
- noinst_SCRIPTS =
- noinst_PROGRAMS =
- bin_PROGRAMS =
- EXTRA_INSTALL =
- dist_doc_DATA += doc/index.html doc/designstyle.css
- LOGGING_INCLUDES = src/base/logging.h \
- src/base/commandlineflags.h \
- src/base/basictypes.h \
- src/base/dynamic_annotations.h \
- src/third_party/valgrind.h
- noinst_LTLIBRARIES += liblogging.la
- liblogging_la_SOURCES = src/base/logging.cc \
- src/base/dynamic_annotations.c \
- $(LOGGING_INCLUDES)
- SYSINFO_INCLUDES = src/base/sysinfo.h \
- src/getenv_safe.h \
- src/base/logging.h \
- src/base/commandlineflags.h \
- src/base/arm_instruction_set_select.h \
- src/base/basictypes.h
- noinst_LTLIBRARIES += libsgx_utils.la
- libsgx_utils_la_SOURCES = src/base/sgx_utils.cc
- noinst_LTLIBRARIES += libmaybe_threads.la
- libmaybe_threads_la_SOURCES = src/maybe_threads.h
- if MINGW
- WINDOWS_INCLUDES = src/windows/port.h \
- src/windows/mingw.h \
- src/windows/mini_disassembler.h \
- src/windows/mini_disassembler_types.h \
- src/windows/preamble_patcher.h
- noinst_LTLIBRARIES += libwindows.la
- libwindows_la_SOURCES = $(WINDOWS_INCLUDES) \
- src/windows/port.cc \
- src/windows/system-alloc.cc \
- src/windows/ia32_modrm_map.cc \
- src/windows/ia32_opcode_map.cc \
- src/windows/mini_disassembler.cc \
- src/windows/patch_functions.cc \
- src/windows/preamble_patcher.cc \
- src/windows/preamble_patcher_with_stub.cc
- libwindows_la_LIBADD = -lpsapi
- SPINLOCK_INCLUDES = src/base/spinlock.h \
- src/base/spinlock_internal.h \
- src/base/spinlock_win32-inl.h \
- src/base/spinlock_linux-inl.h \
- src/base/spinlock_posix-inl.h \
- src/base/atomicops-internals-macosx.h \
- src/base/atomicops-internals-linuxppc.h \
- src/base/atomicops-internals-arm-generic.h \
- src/base/atomicops-internals-arm-v6plus.h \
- src/base/atomicops-internals-mips.h \
- src/base/atomicops-internals-windows.h \
- src/base/atomicops-internals-gcc.h \
- src/base/atomicops-internals-x86.h
- noinst_LTLIBRARIES += libspinlock.la
- libspinlock_la_SOURCES = src/base/spinlock.cc \
- src/base/atomicops-internals-x86.cc \
- $(SPINLOCK_INCLUDES)
- LIBSPINLOCK = libwindows.la libspinlock.la libsgx_utils.la liblogging.la
- libsysinfo_la_LIBADD += -lshlwapi
- TCMALLOC_CC =
- if HAVE_PTHREAD_DESPITE_ASKING_FOR
- libmaybe_threads_la_SOURCES += src/maybe_threads.cc
- endif
- SYSTEM_ALLOC_CC =
- else !MINGW
- SPINLOCK_INCLUDES = src/base/spinlock.h \
- src/base/spinlock_internal.h \
- src/base/atomicops.h \
- src/base/atomicops-internals-macosx.h \
- src/base/atomicops-internals-linuxppc.h \
- src/base/atomicops-internals-windows.h \
- src/base/atomicops-internals-x86.h
- noinst_LTLIBRARIES += libspinlock.la
- libspinlock_la_SOURCES = src/base/spinlock.cc \
- src/base/atomicops-internals-x86.cc \
- $(SPINLOCK_INCLUDES)
- libspinlock_la_LIBADD = $(NANOSLEEP_LIBS)
- LIBSPINLOCK = libspinlock.la libsgx_utils.la liblogging.la
- TCMALLOC_CC = src/tcmalloc.cc
- libmaybe_threads_la_SOURCES += src/maybe_threads.cc
- SYSTEM_ALLOC_CC = src/system-alloc.cc
- endif !MINGW
- WINDOWS_PROJECTS += vsprojects/preamble_patcher_test/preamble_patcher_test.vcproj
- WINDOWS_PROJECTS += src/windows/preamble_patcher_test.cc \
- src/windows/shortproc.asm \
- src/windows/auto_testing_hook.h
- TESTS += low_level_alloc_unittest
- WINDOWS_PROJECTS += vsprojects/low_level_alloc_unittest/low_level_alloc_unittest.vcproj
- LOW_LEVEL_ALLOC_UNITTEST_INCLUDES = src/base/low_level_alloc.h \
- src/base/basictypes.h \
- src/gperftools/malloc_hook.h \
- src/gperftools/malloc_hook_c.h \
- src/malloc_hook-inl.h \
- src/malloc_hook_mmap_linux.h \
- src/malloc_hook_mmap_freebsd.h \
- $(SPINLOCK_INCLUDES) \
- $(LOGGING_INCLUDES)
- low_level_alloc_unittest_SOURCES = src/base/low_level_alloc.cc \
- src/malloc_hook.cc \
- src/tests/low_level_alloc_unittest.cc \
- $(LOW_LEVEL_ALLOC_UNITTEST_INCLUDES)
- low_level_alloc_unittest_CXXFLAGS = -DNO_TCMALLOC_SAMPLES
- low_level_alloc_unittest_LDADD = $(LIBSPINLOCK) libmaybe_threads.la
- TESTS += atomicops_unittest
- ATOMICOPS_UNITTEST_INCLUDES = src/base/atomicops.h \
- src/base/atomicops-internals-macosx.h \
- src/base/atomicops-internals-windows.h \
- src/base/atomicops-internals-x86.h \
- $(LOGGING_INCLUDES)
- atomicops_unittest_SOURCES = src/tests/atomicops_unittest.cc \
- $(ATOMICOPS_UNITTEST_INCLUDES)
- atomicops_unittest_LDADD = $(LIBSPINLOCK)
- if WITH_STACK_TRACE
- S_STACKTRACE_INCLUDES = src/stacktrace_impl_setup-inl.h \
- src/stacktrace_generic-inl.h \
- src/stacktrace_libgcc-inl.h \
- src/stacktrace_libunwind-inl.h \
- src/stacktrace_arm-inl.h \
- src/stacktrace_powerpc-inl.h \
- src/stacktrace_powerpc-darwin-inl.h \
- src/stacktrace_powerpc-linux-inl.h \
- src/stacktrace_x86-inl.h \
- src/stacktrace_win32-inl.h \
- src/stacktrace_instrument-inl.h \
- src/base/elf_mem_image.h \
- src/base/vdso_support.h
- SG_STACKTRACE_INCLUDES = src/gperftools/stacktrace.h
- STACKTRACE_INCLUDES = $(S_STACKTRACE_INCLUDES) $(SG_STACKTRACE_INCLUDES)
- perftoolsinclude_HEADERS += $(SG_STACKTRACE_INCLUDES)
- noinst_LTLIBRARIES += libstacktrace.la
- libstacktrace_la_SOURCES = src/stacktrace.cc \
- src/base/elf_mem_image.cc \
- src/base/vdso_support.cc \
- $(STACKTRACE_INCLUDES)
- libstacktrace_la_LIBADD = $(UNWIND_LIBS) $(LIBSPINLOCK)
- STACKTRACE_SYMBOLS = '(GetStackTrace|GetStackFrames|GetStackTraceWithContext|GetStackFramesWithContext)'
- libstacktrace_la_LDFLAGS = -export-symbols-regex $(STACKTRACE_SYMBOLS) $(AM_LDFLAGS)
- noinst_LTLIBRARIES += libfake_stacktrace_scope.la
- libfake_stacktrace_scope_la_SOURCES = src/fake_stacktrace_scope.cc
- TESTS += stacktrace_unittest
- STACKTRACE_UNITTEST_INCLUDES = src/config_for_unittests.h \
- src/base/commandlineflags.h \
- $(STACKTRACE_INCLUDES) \
- $(LOGGING_INCLUDES)
- stacktrace_unittest_SOURCES = src/tests/stacktrace_unittest.cc \
- $(STACKTRACE_UNITTEST_INCLUDES)
- stacktrace_unittest_LDADD = libstacktrace.la liblogging.la libfake_stacktrace_scope.la
- dist_doc_DATA +=
- endif WITH_STACK_TRACE
- if WITH_STACK_TRACE
- bin_SCRIPTS = src/pprof
- check_SCRIPTS = pprof_unittest
- pprof_unittest: $(top_srcdir)/src/pprof
- $(top_srcdir)/src/pprof -test
- TESTS_ENVIRONMENT += PPROF_PATH=$(top_srcdir)/src/pprof
- dist_man_MANS = doc/pprof.1
- dist_doc_DATA += doc/pprof_remote_servers.html
- WINDOWS_PROJECTS += vsprojects/nm-pdb/nm-pdb.vcproj
- WINDOWS_PROJECTS += vsprojects/addr2line-pdb/addr2line-pdb.vcproj
- WINDOWS_PROJECTS += src/windows/nm-pdb.c \
- src/windows/addr2line-pdb.c
- endif WITH_STACK_TRACE
- S_TCMALLOC_MINIMAL_INCLUDES = src/common.h \
- src/internal_logging.h \
- src/system-alloc.h \
- src/packed-cache-inl.h \
- $(SPINLOCK_INCLUDES) \
- src/tcmalloc_guard.h \
- src/base/commandlineflags.h \
- src/base/basictypes.h \
- src/pagemap.h \
- src/sampler.h \
- src/central_freelist.h \
- src/linked_list.h \
- src/libc_override.h \
- src/libc_override_gcc_and_weak.h \
- src/libc_override_glibc.h \
- src/libc_override_osx.h \
- src/libc_override_redefine.h \
- src/page_heap.h \
- src/page_heap_allocator.h \
- src/span.h \
- src/static_vars.h \
- src/symbolize.h \
- src/thread_cache.h \
- src/stack_trace_table.h \
- src/base/thread_annotations.h \
- src/malloc_hook-inl.h \
- src/malloc_hook_mmap_linux.h \
- src/malloc_hook_mmap_freebsd.h
- SG_TCMALLOC_MINIMAL_INCLUDES = src/gperftools/malloc_hook.h \
- src/gperftools/malloc_hook_c.h \
- src/gperftools/malloc_extension.h \
- src/gperftools/malloc_extension_c.h
- TCMALLOC_MINIMAL_INCLUDES = $(S_TCMALLOC_MINIMAL_INCLUDES) $(SG_TCMALLOC_MINIMAL_INCLUDES) $(SG_STACKTRACE_INCLUDES)
- perftoolsinclude_HEADERS += $(SG_TCMALLOC_MINIMAL_INCLUDES)
- noinst_LTLIBRARIES += libtcmalloc_minimal_internal.la
- libtcmalloc_minimal_internal_la_SOURCES = src/common.cc \
- src/internal_logging.cc \
- $(SYSTEM_ALLOC_CC) \
- src/central_freelist.cc \
- src/page_heap.cc \
- src/sampler.cc \
- src/span.cc \
- src/stack_trace_table.cc \
- src/static_vars.cc \
- src/symbolize.cc \
- src/thread_cache.cc \
- src/malloc_hook.cc \
- src/malloc_extension.cc \
- $(TCMALLOC_MINIMAL_INCLUDES)
- libtcmalloc_minimal_internal_la_CXXFLAGS = -DNO_TCMALLOC_SAMPLES \
- -DNO_HEAP_CHECK \
- -DNDEBUG \
- $(AM_CXXFLAGS) $(NO_EXCEPTIONS)
- libtcmalloc_minimal_internal_la_LDFLAGS = $(AM_LDFLAGS)
- libtcmalloc_minimal_internal_la_LIBADD = $(LIBSPINLOCK) libmaybe_threads.la
- lib_LTLIBRARIES += libtcmalloc_minimal.la
- WINDOWS_PROJECTS += vsprojects/libtcmalloc_minimal/libtcmalloc_minimal.vcproj
- libtcmalloc_minimal_la_SOURCES = $(TCMALLOC_CC) $(TCMALLOC_MINIMAL_INCLUDES)
- libtcmalloc_minimal_la_CXXFLAGS = -DNO_TCMALLOC_SAMPLES \
- $(PTHREAD_CFLAGS) -DNDEBUG $(AM_CXXFLAGS)
- libtcmalloc_minimal_la_LDFLAGS = -version-info @TCMALLOC_SO_VERSION@ $(AM_LDFLAGS)
- libtcmalloc_minimal_la_LIBADD = libtcmalloc_minimal_internal.la
- if MINGW
- LIBTCMALLOC_MINIMAL = libtcmalloc_minimal.la libstacktrace.la
- else !MINGW
- LIBTCMALLOC_MINIMAL = libtcmalloc_minimal.la
- endif !MINGW
- LIBS_TO_WEAKEN += libtcmalloc_minimal.la
- TESTS += tcmalloc_minimal_unittest
- WINDOWS_PROJECTS += vsprojects/tcmalloc_minimal_unittest/tcmalloc_minimal_unittest.vcproj
- WINDOWS_PROJECTS += vsprojects/tmu-static/tmu-static.vcproj
- tcmalloc_minimal_unittest_SOURCES = src/tests/tcmalloc_unittest.cc \
- src/tests/testutil.h src/tests/testutil.cc \
- $(TCMALLOC_UNITTEST_INCLUDES)
- tcmalloc_minimal_unittest_CXXFLAGS = $(PTHREAD_CFLAGS) $(AM_CXXFLAGS) $(NO_BUILTIN_CXXFLAGS)
- tcmalloc_minimal_unittest_LDFLAGS = $(PTHREAD_CFLAGS) $(TCMALLOC_FLAGS)
- tcmalloc_minimal_unittest_LDADD = $(LIBTCMALLOC_MINIMAL) \
- liblogging.la $(PTHREAD_LIBS)
- TESTS += tcmalloc_minimal_large_unittest
- WINDOWS_PROJECTS += vsprojects/tcmalloc_minimal_large/tcmalloc_minimal_large_unittest.vcproj
- tcmalloc_minimal_large_unittest_SOURCES = src/tests/tcmalloc_large_unittest.cc
- tcmalloc_minimal_large_unittest_CXXFLAGS = $(PTHREAD_CFLAGS) $(AM_CXXFLAGS) $(NO_BUILTIN_CXXFLAGS)
- tcmalloc_minimal_large_unittest_LDFLAGS = $(PTHREAD_CFLAGS) $(TCMALLOC_FLAGS)
- tcmalloc_minimal_large_unittest_LDADD = $(LIBTCMALLOC_MINIMAL) $(PTHREAD_LIBS)
- TESTS += tcmalloc_minimal_large_heap_fragmentation_unittest
- tcmalloc_minimal_large_heap_fragmentation_unittest_SOURCES = src/tests/large_heap_fragmentation_unittest.cc
- tcmalloc_minimal_large_heap_fragmentation_unittest_CXXFLAGS = $(PTHREAD_CFLAGS) $(AM_CXXFLAGS) $(NO_BUILTIN_CXXFLAGS)
- tcmalloc_minimal_large_heap_fragmentation_unittest_LDFLAGS = $(PTHREAD_CFLAGS) $(TCMALLOC_FLAGS)
- tcmalloc_minimal_large_heap_fragmentation_unittest_LDADD = $(LIBTCMALLOC_MINIMAL) $(PTHREAD_LIBS)
- if !MINGW
- if !ENABLE_STATIC
- TESTS += maybe_threads_unittest.sh$(EXEEXT)
- maybe_threads_unittest_sh_SOURCES = src/tests/maybe_threads_unittest.sh
- noinst_SCRIPTS += $(maybe_threads_unittest_sh_SOURCES)
- maybe_threads_unittest.sh$(EXEEXT): $(top_srcdir)/$(maybe_threads_unittest_sh_SOURCES) \
- $(LIBTCMALLOC_MINIMAL) \
- low_level_alloc_unittest
- rm -f $@
- cp -p $(top_srcdir)/$(maybe_threads_unittest_sh_SOURCES) $@
- endif !ENABLE_STATIC
- endif !MINGW
- TESTS += addressmap_unittest
- WINDOWS_PROJECTS += vsprojects/addressmap_unittest/addressmap_unittest.vcproj
- ADDRESSMAP_UNITTEST_INCLUDES = src/addressmap-inl.h \
- src/base/commandlineflags.h \
- $(LOGGING_INCLUDES)
- addressmap_unittest_SOURCES = src/tests/addressmap_unittest.cc \
- $(ADDRESSMAP_UNITTEST_INCLUDES)
- if MINGW
- addressmap_unittest_SOURCES += src/windows/port.h src/windows/port.cc
- endif MINGW
- addressmap_unittest_CXXFLAGS = -g $(AM_CXXFLAGS)
- addressmap_unittest_LDADD = liblogging.la
- WINDOWS_PROJECTS += vsprojects/system-alloc_unittest/system-alloc_unittest.vcproj
- if !MINGW
- TESTS += system_alloc_unittest
- system_alloc_unittest_SOURCES = src/config_for_unittests.h \
- src/tests/system-alloc_unittest.cc
- system_alloc_unittest_CXXFLAGS = $(PTHREAD_CFLAGS) $(AM_CXXFLAGS) $(NO_BUILTIN_CXXFLAGS)
- system_alloc_unittest_LDFLAGS = $(PTHREAD_CFLAGS) $(TCMALLOC_FLAGS)
- system_alloc_unittest_LDADD = $(LIBTCMALLOC_MINIMAL) $(PTHREAD_LIBS)
- endif !MINGW
- TESTS += packed_cache_test
- WINDOWS_PROJECTS += vsprojects/packed-cache_test/packed-cache_test.vcproj
- packed_cache_test_SOURCES = src/tests/packed-cache_test.cc
- packed_cache_test_CXXFLAGS = $(PTHREAD_CFLAGS) $(AM_CXXFLAGS)
- packed_cache_test_LDFLAGS = $(PTHREAD_CFLAGS) $(TCMALLOC_FLAGS)
- packed_cache_test_LDADD = $(LIBTCMALLOC_MINIMAL) $(PTHREAD_LIBS)
- TESTS += frag_unittest
- WINDOWS_PROJECTS += vsprojects/frag_unittest/frag_unittest.vcproj
- frag_unittest_SOURCES = src/tests/frag_unittest.cc src/config_for_unittests.h
- frag_unittest_CXXFLAGS = $(PTHREAD_CFLAGS) $(AM_CXXFLAGS) $(NO_BUILTIN_CXXFLAGS)
- frag_unittest_LDFLAGS = $(PTHREAD_CFLAGS) $(TCMALLOC_FLAGS)
- frag_unittest_LDADD = $(LIBTCMALLOC_MINIMAL) $(PTHREAD_LIBS)
- TESTS += markidle_unittest
- WINDOWS_PROJECTS += vsprojects/markidle_unittest/markidle_unittest.vcproj
- markidle_unittest_SOURCES = src/tests/markidle_unittest.cc \
- src/config_for_unittests.h \
- src/tests/testutil.h src/tests/testutil.cc
- markidle_unittest_CXXFLAGS = $(PTHREAD_CFLAGS) $(AM_CXXFLAGS) $(NO_BUILTIN_CXXFLAGS)
- markidle_unittest_LDFLAGS = $(PTHREAD_CFLAGS) $(TCMALLOC_FLAGS)
- markidle_unittest_LDADD = $(LIBTCMALLOC_MINIMAL) $(PTHREAD_LIBS)
- TESTS += current_allocated_bytes_test
- WINDOWS_PROJECTS += vsprojects/current_allocated_bytes_test/current_allocated_bytes_test.vcproj
- current_allocated_bytes_test_SOURCES = src/tests/current_allocated_bytes_test.cc \
- src/config_for_unittests.h
- current_allocated_bytes_test_CXXFLAGS = $(PTHREAD_CFLAGS) $(AM_CXXFLAGS)
- current_allocated_bytes_test_LDFLAGS = $(PTHREAD_CFLAGS) $(TCMALLOC_FLAGS)
- current_allocated_bytes_test_LDADD = $(LIBTCMALLOC_MINIMAL) $(PTHREAD_LIBS)
- TESTS += malloc_hook_test
- WINDOWS_PROJECTS += vsprojects/malloc_hook_test/malloc_hook_test.vcproj
- malloc_hook_test_SOURCES = src/tests/malloc_hook_test.cc \
- src/config_for_unittests.h \
- src/base/logging.h \
- src/gperftools/malloc_hook.h \
- src/tests/testutil.h src/tests/testutil.cc
- malloc_hook_test_CXXFLAGS = $(PTHREAD_CFLAGS) $(AM_CXXFLAGS)
- malloc_hook_test_LDFLAGS = $(PTHREAD_CFLAGS) $(TCMALLOC_FLAGS)
- malloc_hook_test_LDADD = $(LIBTCMALLOC_MINIMAL) $(PTHREAD_LIBS)
- TESTS += malloc_extension_test
- WINDOWS_PROJECTS += vsprojects/malloc_extension_test/malloc_extension_test.vcproj
- malloc_extension_test_SOURCES = src/tests/malloc_extension_test.cc \
- src/config_for_unittests.h \
- src/base/logging.h \
- src/gperftools/malloc_extension.h \
- src/gperftools/malloc_extension_c.h
- malloc_extension_test_CXXFLAGS = $(PTHREAD_CFLAGS) $(AM_CXXFLAGS)
- malloc_extension_test_LDFLAGS = $(PTHREAD_CFLAGS) $(TCMALLOC_FLAGS)
- malloc_extension_test_LDADD = $(LIBTCMALLOC_MINIMAL) $(PTHREAD_LIBS)
- if !MINGW
- TESTS += malloc_extension_c_test
- malloc_extension_c_test_SOURCES = src/tests/malloc_extension_c_test.c \
- src/gperftools/malloc_extension.h \
- src/gperftools/malloc_extension_c.h
- malloc_extension_c_test_CFLAGS = $(PTHREAD_CFLAGS) $(AM_CFLAGS)
- if GCC
- malloc_extension_c_test_CFLAGS += -ansi
- endif GCC
- malloc_extension_c_test_LDFLAGS = $(PTHREAD_CFLAGS) $(TCMALLOC_FLAGS)
- malloc_extension_c_test_LDADD = $(LIBTCMALLOC_MINIMAL) $(PTHREAD_LIBS) -lstdc++ -lm
- endif !MINGW
- if !MINGW
- if !OSX
- TESTS += memalign_unittest
- memalign_unittest_SOURCES = src/tests/memalign_unittest.cc \
- src/tcmalloc.h \
- src/config_for_unittests.h \
- src/tests/testutil.h src/tests/testutil.cc
- memalign_unittest_CXXFLAGS = $(PTHREAD_CFLAGS) $(AM_CXXFLAGS) $(NO_BUILTIN_CXXFLAGS)
- memalign_unittest_LDFLAGS = $(PTHREAD_CFLAGS) $(TCMALLOC_FLAGS)
- memalign_unittest_LDADD = $(LIBTCMALLOC_MINIMAL) $(PTHREAD_LIBS)
- endif !OSX
- endif !MINGW
- TESTS += page_heap_test
- WINDOWS_PROJECTS += vsprojects/page_heap_test/page_heap_test.vcproj
- page_heap_test_SOURCES = src/tests/page_heap_test.cc \
- src/config_for_unittests.h \
- src/base/logging.h \
- src/common.h \
- src/page_heap.h
- page_heap_test_CXXFLAGS = $(PTHREAD_CFLAGS) $(AM_CXXFLAGS)
- page_heap_test_LDFLAGS = $(PTHREAD_CFLAGS) $(TCMALLOC_FLAGS)
- page_heap_test_LDADD = $(LIBTCMALLOC_MINIMAL) $(PTHREAD_LIBS)
- TESTS += pagemap_unittest
- WINDOWS_PROJECTS += vsprojects/pagemap_unittest/pagemap_unittest.vcproj
- pagemap_unittest_SOURCES = src/tests/pagemap_unittest.cc \
- src/config_for_unittests.h \
- src/base/logging.h \
- src/pagemap.h
- pagemap_unittest_CXXFLAGS = $(PTHREAD_CFLAGS) $(AM_CXXFLAGS) $(NO_BUILTIN_CXXFLAGS)
- pagemap_unittest_LDFLAGS = $(PTHREAD_CFLAGS) $(TCMALLOC_FLAGS)
- pagemap_unittest_LDADD = $(LIBTCMALLOC_MINIMAL) $(PTHREAD_LIBS)
- TESTS += realloc_unittest
- WINDOWS_PROJECTS += vsprojects/realloc_unittest/realloc_unittest.vcproj
- realloc_unittest_SOURCES = src/tests/realloc_unittest.cc \
- src/config_for_unittests.h \
- src/base/logging.h
- realloc_unittest_CXXFLAGS = $(PTHREAD_CFLAGS) $(AM_CXXFLAGS) $(NO_BUILTIN_CXXFLAGS)
- realloc_unittest_LDFLAGS = $(PTHREAD_CFLAGS) $(TCMALLOC_FLAGS)
- realloc_unittest_LDADD = $(LIBTCMALLOC_MINIMAL) $(PTHREAD_LIBS)
- TESTS += stack_trace_table_test
- WINDOWS_PROJECTS += vsprojects/stack_trace_table_test/stack_trace_table_test.vcproj
- stack_trace_table_test_SOURCES = src/tests/stack_trace_table_test.cc \
- src/config_for_unittests.h
- stack_trace_table_test_CXXFLAGS = $(PTHREAD_CFLAGS) $(AM_CXXFLAGS)
- stack_trace_table_test_LDFLAGS = $(PTHREAD_CFLAGS) $(TCMALLOC_FLAGS)
- stack_trace_table_test_LDADD = $(LIBTCMALLOC_MINIMAL) $(PTHREAD_LIBS)
- TESTS += thread_dealloc_unittest
- WINDOWS_PROJECTS += vsprojects/thread_dealloc_unittest/thread_dealloc_unittest.vcproj
- thread_dealloc_unittest_SOURCES = src/tests/thread_dealloc_unittest.cc \
- src/config_for_unittests.h \
- src/tests/testutil.h src/tests/testutil.cc
- thread_dealloc_unittest_CXXFLAGS = $(PTHREAD_CFLAGS) $(AM_CXXFLAGS) $(NO_BUILTIN_CXXFLAGS)
- thread_dealloc_unittest_LDFLAGS = $(PTHREAD_CFLAGS) $(TCMALLOC_FLAGS)
- thread_dealloc_unittest_LDADD = $(LIBTCMALLOC_MINIMAL) $(PTHREAD_LIBS)
- dist_doc_DATA += doc/tcmalloc.html \
- doc/overview.gif \
- doc/pageheap.gif \
- doc/spanmap.gif \
- doc/threadheap.gif \
- doc/t-test1.times.txt \
- doc/tcmalloc-opspercpusec.vs.threads.1024.bytes.png \
- doc/tcmalloc-opspercpusec.vs.threads.128.bytes.png \
- doc/tcmalloc-opspercpusec.vs.threads.131072.bytes.png \
- doc/tcmalloc-opspercpusec.vs.threads.16384.bytes.png \
- doc/tcmalloc-opspercpusec.vs.threads.2048.bytes.png \
- doc/tcmalloc-opspercpusec.vs.threads.256.bytes.png \
- doc/tcmalloc-opspercpusec.vs.threads.32768.bytes.png \
- doc/tcmalloc-opspercpusec.vs.threads.4096.bytes.png \
- doc/tcmalloc-opspercpusec.vs.threads.512.bytes.png \
- doc/tcmalloc-opspercpusec.vs.threads.64.bytes.png \
- doc/tcmalloc-opspercpusec.vs.threads.65536.bytes.png \
- doc/tcmalloc-opspercpusec.vs.threads.8192.bytes.png \
- doc/tcmalloc-opspersec.vs.size.1.threads.png \
- doc/tcmalloc-opspersec.vs.size.12.threads.png \
- doc/tcmalloc-opspersec.vs.size.16.threads.png \
- doc/tcmalloc-opspersec.vs.size.2.threads.png \
- doc/tcmalloc-opspersec.vs.size.20.threads.png \
- doc/tcmalloc-opspersec.vs.size.3.threads.png \
- doc/tcmalloc-opspersec.vs.size.4.threads.png \
- doc/tcmalloc-opspersec.vs.size.5.threads.png \
- doc/tcmalloc-opspersec.vs.size.8.threads.png
- dist_doc_DATA += doc/overview.dot \
- doc/pageheap.dot \
- doc/spanmap.dot \
- doc/threadheap.dot
- if WITH_DEBUGALLOC
- lib_LTLIBRARIES += libtcmalloc_minimal_debug.la
- libtcmalloc_minimal_debug_la_SOURCES = src/debugallocation.cc \
- $(TCMALLOC_MINIMAL_INCLUDES)
- libtcmalloc_minimal_debug_la_CXXFLAGS = $(libtcmalloc_minimal_la_CXXFLAGS) \
- -DTCMALLOC_FOR_DEBUGALLOCATION
- libtcmalloc_minimal_debug_la_LDFLAGS = $(libtcmalloc_minimal_la_LDFLAGS) \
- -version-info @TCMALLOC_SO_VERSION@
- libtcmalloc_minimal_debug_la_LIBADD = $(libtcmalloc_minimal_la_LIBADD)
- LIBS_TO_WEAKEN += libtcmalloc_minimal_debug.la
- TESTS += tcmalloc_minimal_debug_unittest
- tcmalloc_minimal_debug_unittest_SOURCES = $(tcmalloc_minimal_unittest_SOURCES)
- tcmalloc_minimal_debug_unittest_CXXFLAGS = $(tcmalloc_minimal_unittest_CXXFLAGS) \
- -DDEBUGALLOCATION
- tcmalloc_minimal_debug_unittest_LDFLAGS = $(tcmalloc_minimal_unittest_LDFLAGS)
- tcmalloc_minimal_debug_unittest_LDADD = libtcmalloc_minimal_debug.la $(PTHREAD_LIBS)
- TESTS += malloc_extension_debug_test
- malloc_extension_debug_test_SOURCES = $(malloc_extension_test_SOURCES)
- malloc_extension_debug_test_CXXFLAGS = $(malloc_extension_test_CXXFLAGS)
- malloc_extension_debug_test_LDFLAGS = $(malloc_extension_test_LDFLAGS)
- malloc_extension_debug_test_LDADD = libtcmalloc_minimal_debug.la $(PTHREAD_LIBS)
- if !MINGW
- if !OSX
- TESTS += memalign_debug_unittest
- memalign_debug_unittest_SOURCES = $(memalign_unittest_SOURCES)
- memalign_debug_unittest_CXXFLAGS = $(memalign_unittest_CXXFLAGS)
- memalign_debug_unittest_LDFLAGS = $(memalign_unittest_LDFLAGS)
- memalign_debug_unittest_LDADD = libtcmalloc_minimal_debug.la $(PTHREAD_LIBS)
- endif !OSX
- endif !MINGW
- TESTS += realloc_debug_unittest
- realloc_debug_unittest_SOURCES = $(realloc_unittest_SOURCES)
- realloc_debug_unittest_CXXFLAGS = $(realloc_unittest_CXXFLAGS)
- realloc_debug_unittest_LDFLAGS = $(realloc_unittest_LDFLAGS)
- realloc_debug_unittest_LDADD = libtcmalloc_minimal_debug.la $(PTHREAD_LIBS)
- if WITH_STACK_TRACE
- TESTS += debugallocation_test.sh$(EXEEXT)
- debugallocation_test_sh_SOURCES = src/tests/debugallocation_test.sh
- noinst_SCRIPTS += $(debugallocation_test_sh_SOURCES)
- debugallocation_test.sh$(EXEEXT): $(top_srcdir)/$(debugallocation_test_sh_SOURCES) \
- debugallocation_test
- rm -f $@
- cp -p $(top_srcdir)/$(debugallocation_test_sh_SOURCES) $@
- noinst_PROGRAMS += debugallocation_test
- debugallocation_test_SOURCES = src/tests/debugallocation_test.cc
- debugallocation_test_CXXFLAGS = $(PTHREAD_CFLAGS) $(AM_CXXFLAGS) $(NO_BUILTIN_CXXFLAGS)
- debugallocation_test_LDFLAGS = $(PTHREAD_CFLAGS) $(TCMALLOC_FLAGS)
- debugallocation_test_LDADD = libtcmalloc_debug.la $(PTHREAD_LIBS)
- endif WITH_STACK_TRACE
- endif WITH_DEBUGALLOC
- if !MINGW
- noinst_LTLIBRARIES += librun_benchmark.la
- librun_benchmark_la_SOURCES = \
- benchmark/run_benchmark.c benchmark/run_benchmark.h
- noinst_PROGRAMS += malloc_bench malloc_bench_shared \
- malloc_bench_shared_full \
- binary_trees binary_trees_shared
- malloc_bench_SOURCES = benchmark/malloc_bench.cc
- malloc_bench_CXXFLAGS = $(PTHREAD_CFLAGS) $(AM_CXXFLAGS) $(NO_BUILTIN_CXXFLAGS)
- malloc_bench_LDFLAGS = $(PTHREAD_CFLAGS) $(TCMALLOC_FLAGS) -static
- malloc_bench_LDADD = librun_benchmark.la libtcmalloc_minimal.la $(PTHREAD_LIBS)
- malloc_bench_shared_SOURCES = benchmark/malloc_bench.cc
- malloc_bench_shared_CXXFLAGS = $(PTHREAD_CFLAGS) $(AM_CXXFLAGS) $(NO_BUILTIN_CXXFLAGS)
- malloc_bench_shared_LDFLAGS = $(PTHREAD_CFLAGS) $(TCMALLOC_FLAGS)
- malloc_bench_shared_LDADD = librun_benchmark.la libtcmalloc_minimal.la $(PTHREAD_LIBS)
- malloc_bench_shared_full_SOURCES = benchmark/malloc_bench.cc
- malloc_bench_shared_full_CXXFLAGS = $(PTHREAD_CFLAGS) $(AM_CXXFLAGS) $(NO_BUILTIN_CXXFLAGS)
- malloc_bench_shared_full_LDFLAGS = $(PTHREAD_CFLAGS) $(TCMALLOC_FLAGS)
- malloc_bench_shared_full_LDADD = librun_benchmark.la libtcmalloc.la $(PTHREAD_LIBS)
- binary_trees_SOURCES = benchmark/binary_trees.cc
- binary_trees_CXXFLAGS = $(PTHREAD_CFLAGS) $(AM_CXXFLAGS) $(NO_BUILTIN_CXXFLAGS)
- binary_trees_LDFLAGS = $(PTHREAD_CFLAGS) $(TCMALLOC_FLAGS) -static
- binary_trees_LDADD = libtcmalloc_minimal.la $(PTHREAD_LIBS)
- binary_trees_shared_SOURCES = benchmark/binary_trees.cc
- binary_trees_shared_CXXFLAGS = $(PTHREAD_CFLAGS) $(AM_CXXFLAGS) $(NO_BUILTIN_CXXFLAGS)
- binary_trees_shared_LDFLAGS = $(PTHREAD_CFLAGS) $(TCMALLOC_FLAGS)
- binary_trees_shared_LDADD = libtcmalloc_minimal.la $(PTHREAD_LIBS)
- endif !MINGW
- if WITH_HEAP_PROFILER_OR_CHECKER
- S_TCMALLOC_INCLUDES = $(S_TCMALLOC_MINIMAL_INCLUDES) \
- $(LOGGING_INCLUDES) \
- src/addressmap-inl.h \
- src/raw_printer.h \
- src/base/elfcore.h \
- src/base/googleinit.h \
- src/base/linux_syscall_support.h \
- src/base/linuxthreads.h \
- src/base/stl_allocator.h \
- src/base/sysinfo.h \
- src/base/thread_lister.h \
- src/heap-profile-table.h \
- src/heap-profile-stats.h \
- src/maybe_emergency_malloc.h \
- src/emergency_malloc.h
- SG_TCMALLOC_INCLUDES = src/gperftools/heap-profiler.h \
- src/gperftools/heap-checker.h
- TCMALLOC_INCLUDES = $(S_TCMALLOC_INCLUDES) $(SG_TCMALLOC_MINIMAL_INCLUDES) \
- $(SG_TCMALLOC_INCLUDES) $(SG_STACKTRACE_INCLUDES)
- perftoolsinclude_HEADERS += $(SG_TCMALLOC_INCLUDES)
- if BUILD_EMERGENCY_MALLOC
- EMERGENCY_MALLOC_CC = src/emergency_malloc.cc src/emergency_malloc_for_stacktrace.cc
- EMERGENCY_MALLOC_DEFINE = -DENABLE_EMERGENCY_MALLOC
- else !BUILD_EMERGENCY_MALLOC
- EMERGENCY_MALLOC_CC = src/fake_stacktrace_scope.cc
- EMERGENCY_MALLOC_DEFINE =
- endif !BUILD_EMERGENCY_MALLOC
- noinst_LTLIBRARIES += libtcmalloc_internal.la
- libtcmalloc_internal_la_SOURCES = $(libtcmalloc_minimal_internal_la_SOURCES) \
- $(TCMALLOC_INCLUDES) \
- src/base/low_level_alloc.cc \
- src/heap-profile-table.cc \
- src/heap-profiler.cc \
- src/raw_printer.cc \
- $(EMERGENCY_MALLOC_CC) \
- src/memory_region_map.cc
- libtcmalloc_internal_la_CXXFLAGS = $(PTHREAD_CFLAGS) -DNDEBUG \
- $(AM_CXXFLAGS) $(NO_EXCEPTIONS) $(EMERGENCY_MALLOC_DEFINE)
- libtcmalloc_internal_la_LDFLAGS = $(PTHREAD_CFLAGS)
- libtcmalloc_internal_la_LIBADD = libstacktrace.la $(PTHREAD_LIBS)
- lib_LTLIBRARIES += libtcmalloc.la
- libtcmalloc_la_SOURCES = $(TCMALLOC_CC) $(TCMALLOC_INCLUDES)
- libtcmalloc_la_CXXFLAGS = $(PTHREAD_CFLAGS) -DNDEBUG $(AM_CXXFLAGS) $(EMERGENCY_MALLOC_DEFINE)
- libtcmalloc_la_LDFLAGS = $(PTHREAD_CFLAGS) -version-info @TCMALLOC_SO_VERSION@
- libtcmalloc_la_LIBADD = libtcmalloc_internal.la libmaybe_threads.la $(PTHREAD_LIBS)
- if WITH_HEAP_CHECKER
- HEAP_CHECKER_SOURCES = src/base/thread_lister.c \
- src/base/linuxthreads.cc \
- src/heap-checker.cc \
- src/heap-checker-bcad.cc
- libtcmalloc_la_SOURCES += $(HEAP_CHECKER_SOURCES)
- else !WITH_HEAP_CHECKER
- HEAP_CHECKER_SOURCES =
- libtcmalloc_internal_la_CXXFLAGS += -DNO_HEAP_CHECK
- libtcmalloc_la_CXXFLAGS += -DNO_HEAP_CHECK
- endif !WITH_HEAP_CHECKER
- LIBTCMALLOC = libtcmalloc.la
- LIBS_TO_WEAKEN += libtcmalloc.la
- TESTS += tcmalloc_unittest.sh$(EXEEXT)
- tcmalloc_unittest_sh_SOURCES = src/tests/tcmalloc_unittest.sh
- noinst_SCRIPTS += $(tcmalloc_unittest_sh_SOURCES)
- tcmalloc_unittest.sh$(EXEEXT): $(top_srcdir)/$(tcmalloc_unittest_sh_SOURCES) \
- tcmalloc_unittest
- rm -f $@
- cp -p $(top_srcdir)/$(tcmalloc_unittest_sh_SOURCES) $@
- noinst_PROGRAMS += tcmalloc_unittest
- tcmalloc_unittest_INCLUDES = src/config_for_unittests.h \
- src/gperftools/malloc_extension.h
- tcmalloc_unittest_SOURCES = src/tests/tcmalloc_unittest.cc \
- src/tcmalloc.h \
- src/tests/testutil.h src/tests/testutil.cc \
- $(TCMALLOC_UNITTEST_INCLUDES)
- tcmalloc_unittest_CXXFLAGS = $(PTHREAD_CFLAGS) $(AM_CXXFLAGS) $(NO_BUILTIN_CXXFLAGS)
- tcmalloc_unittest_LDFLAGS = $(PTHREAD_CFLAGS) $(TCMALLOC_FLAGS)
- tcmalloc_unittest_LDADD = $(LIBTCMALLOC) liblogging.la $(PTHREAD_LIBS)
- tcmalloc_both_unittest_srcs = src/tests/tcmalloc_unittest.cc \
- src/tests/testutil.h src/tests/testutil.cc \
- $(TCMALLOC_UNITTEST_INCLUDES)
- tcmalloc_both_unittest_cflags = $(PTHREAD_CFLAGS) $(AM_CXXFLAGS) $(NO_BUILTIN_CXXFLAGS)
- tcmalloc_both_unittest_lflags = $(PTHREAD_CFLAGS) $(TCMALLOC_FLAGS)
- if WITH_CPU_PROFILER
- tcmalloc_both_unittest_ladd = $(LIBTCMALLOC) $(LIBTCMALLOC_MINIMAL) \
- libprofiler.la liblogging.la $(PTHREAD_LIBS)
- else
- tcmalloc_both_unittest_ladd = $(LIBTCMALLOC) $(LIBTCMALLOC_MINIMAL) \
- liblogging.la $(PTHREAD_LIBS)
- endif !WITH_CPU_PROFILER
- if !OSX
- TESTS += tcmalloc_both_unittest
- tcmalloc_both_unittest_SOURCES = $(tcmalloc_both_unittest_srcs)
- tcmalloc_both_unittest_CXXFLAGS = $(tcmalloc_both_unittest_cflags)
- tcmalloc_both_unittest_LDFLAGS = $(tcmalloc_both_unittest_lflags)
- tcmalloc_both_unittest_LDADD = $(tcmalloc_both_unittest_ladd)
- endif !OSX
- TESTS += tcmalloc_large_unittest
- tcmalloc_large_unittest_SOURCES = src/tests/tcmalloc_large_unittest.cc
- tcmalloc_large_unittest_CXXFLAGS = $(PTHREAD_CFLAGS) $(AM_CXXFLAGS) $(NO_BUILTIN_CXXFLAGS)
- tcmalloc_large_unittest_LDFLAGS = $(PTHREAD_CFLAGS) $(TCMALLOC_FLAGS)
- tcmalloc_large_unittest_LDADD = $(LIBTCMALLOC) $(PTHREAD_LIBS)
- TESTS += tcmalloc_large_heap_fragmentation_unittest
- tcmalloc_large_heap_fragmentation_unittest_SOURCES = src/tests/large_heap_fragmentation_unittest.cc
- tcmalloc_large_heap_fragmentation_unittest_CXXFLAGS = $(PTHREAD_CFLAGS) $(AM_CXXFLAGS) $(NO_BUILTIN_CXXFLAGS)
- tcmalloc_large_heap_fragmentation_unittest_LDFLAGS = $(PTHREAD_CFLAGS) $(TCMALLOC_FLAGS)
- tcmalloc_large_heap_fragmentation_unittest_LDADD = $(LIBTCMALLOC) $(PTHREAD_LIBS)
- TESTS += raw_printer_test
- raw_printer_test_SOURCES = src/tests/raw_printer_test.cc
- raw_printer_test_CXXFLAGS = $(PTHREAD_CFLAGS) $(AM_CXXFLAGS)
- raw_printer_test_LDFLAGS = $(PTHREAD_CFLAGS) $(TCMALLOC_FLAGS)
- raw_printer_test_LDADD = $(LIBTCMALLOC) $(PTHREAD_LIBS)
- TESTS_ENVIRONMENT += TCMALLOC_SAMPLE_PARAMETER=524288
- TESTS += sampler_test
- WINDOWS_PROJECTS += vsprojects/sampler_test/sampler_test.vcproj
- sampler_test_SOURCES = src/tests/sampler_test.cc \
- src/config_for_unittests.h
- sampler_test_CXXFLAGS = $(PTHREAD_CFLAGS) $(AM_CXXFLAGS)
- sampler_test_LDFLAGS = $(PTHREAD_CFLAGS) $(TCMALLOC_FLAGS)
- sampler_test_LDADD = $(LIBTCMALLOC) $(PTHREAD_LIBS) -lm
- TESTS_ENVIRONMENT += BINDIR=.
- TESTS_ENVIRONMENT += TMPDIR=/tmp/perftools
- TESTS += sampling_test.sh$(EXEEXT)
- sampling_test_sh_SOURCES = src/tests/sampling_test.sh
- noinst_SCRIPTS += $(sampling_test_sh_SOURCES)
- sampling_test.sh$(EXEEXT): $(top_srcdir)/$(sampling_test_sh_SOURCES) \
- sampling_test
- rm -f $@
- cp -p $(top_srcdir)/$(sampling_test_sh_SOURCES) $@
- noinst_PROGRAMS += sampling_test
- SAMPLING_TEST_INCLUDES = src/config_for_unittests.h \
- src/base/logging.h \
- src/gperftools/malloc_extension.h
- sampling_test_SOURCES = src/tests/sampling_test.cc \
- $(SAMPLING_TEST_INCLUDES)
- sampling_test_CXXFLAGS = -g $(PTHREAD_CFLAGS) $(AM_CXXFLAGS)
- sampling_test_LDFLAGS = -g $(PTHREAD_CFLAGS) $(TCMALLOC_FLAGS)
- sampling_test_LDADD = $(LIBTCMALLOC) $(PTHREAD_LIBS)
- endif WITH_HEAP_PROFILER_OR_CHECKER
- if WITH_HEAP_PROFILER
- TESTS += heap-profiler_unittest.sh$(EXEEXT)
- heap_profiler_unittest_sh_SOURCES = src/tests/heap-profiler_unittest.sh
- noinst_SCRIPTS += $(heap_profiler_unittest_sh_SOURCES)
- heap-profiler_unittest.sh$(EXEEXT): $(top_srcdir)/$(heap_profiler_unittest_sh_SOURCES) \
- heap-profiler_unittest
- rm -f $@
- cp -p $(top_srcdir)/$(heap_profiler_unittest_sh_SOURCES) $@
- noinst_PROGRAMS += heap-profiler_unittest
- HEAP_PROFILER_UNITTEST_INCLUDES = src/config_for_unittests.h \
- src/gperftools/heap-profiler.h
- heap_profiler_unittest_SOURCES = src/tests/heap-profiler_unittest.cc \
- $(HEAP_PROFILER_UNITTEST_INCLUDES)
- heap_profiler_unittest_CXXFLAGS = -g $(PTHREAD_CFLAGS) $(AM_CXXFLAGS) $(NO_BUILTIN_CXXFLAGS)
- heap_profiler_unittest_LDFLAGS = -g $(PTHREAD_CFLAGS) $(TCMALLOC_FLAGS)
- heap_profiler_unittest_LDADD = $(LIBTCMALLOC) $(PTHREAD_LIBS)
- TESTS += simple_compat_test
- simple_compat_test_SOURCES = src/tests/simple_compat_test.cc \
- $(googleinclude_HEADERS)
- simple_compat_test_LDFLAGS = $(TCMALLOC_FLAGS)
- simple_compat_test_LDADD = $(LIBTCMALLOC)
- endif WITH_HEAP_PROFILER
- if WITH_HEAP_CHECKER
- TESTS += heap-checker_unittest.sh$(EXEEXT)
- heap_checker_unittest_sh_SOURCES = src/tests/heap-checker_unittest.sh
- noinst_SCRIPTS += $(heap_checker_unittest_sh_SOURCES)
- heap-checker_unittest.sh$(EXEEXT): $(top_srcdir)/$(heap_checker_unittest_sh_SOURCES) \
- heap-checker_unittest
- rm -f $@
- cp -p $(top_srcdir)/$(heap_checker_unittest_sh_SOURCES) $@
- TESTS += heap-checker-death_unittest.sh$(EXEEXT)
- heap_checker_death_unittest_sh_SOURCES = src/tests/heap-checker-death_unittest.sh
- noinst_SCRIPTS += $(top_srcdir)/$(heap_checker_death_unittest_sh_SOURCES)
- heap-checker-death_unittest.sh$(EXEEXT): $(heap_checker_death_unittest_sh_SOURCES) \
- heap-checker_unittest
- rm -f $@
- cp -p $(top_srcdir)/$(heap_checker_death_unittest_sh_SOURCES) $@
- noinst_PROGRAMS += heap-checker_unittest
- HEAP_CHECKER_UNITTEST_INCLUDES = src/config_for_unittests.h \
- src/memory_region_map.h \
- src/base/commandlineflags.h \
- src/base/googleinit.h \
- src/gperftools/heap-checker.h \
- $(LOGGING_INCLUDES)
- heap_checker_unittest_SOURCES = src/tests/heap-checker_unittest.cc \
- $(HEAP_CHECKER_UNITTEST_INCLUDES)
- heap_checker_unittest_CXXFLAGS = -g $(PTHREAD_CFLAGS) $(AM_CXXFLAGS) $(NO_BUILTIN_CXXFLAGS)
- heap_checker_unittest_LDFLAGS = -g $(PTHREAD_CFLAGS) $(TCMALLOC_FLAGS)
- heap_checker_unittest_LDADD = $(LIBTCMALLOC) liblogging.la $(PTHREAD_LIBS)
- endif WITH_HEAP_CHECKER
- if WITH_HEAP_PROFILER
- dist_doc_DATA += doc/heapprofile.html doc/heap-example1.png
- endif WITH_HEAP_PROFILER
- if WITH_HEAP_CHECKER
- dist_doc_DATA += doc/heap_checker.html
- endif WITH_HEAP_CHECKER
- if WITH_DEBUGALLOC
- if WITH_HEAP_PROFILER_OR_CHECKER
- lib_LTLIBRARIES += libtcmalloc_debug.la
- libtcmalloc_debug_la_SOURCES = src/debugallocation.cc $(HEAP_CHECKER_SOURCES) \
- $(TCMALLOC_INCLUDES)
- libtcmalloc_debug_la_CXXFLAGS = $(libtcmalloc_la_CXXFLAGS) \
- -DTCMALLOC_FOR_DEBUGALLOCATION
- libtcmalloc_debug_la_LDFLAGS = $(libtcmalloc_la_LDFLAGS) \
- -version-info @TCMALLOC_SO_VERSION@
- libtcmalloc_debug_la_LIBADD = $(libtcmalloc_la_LIBADD)
- LIBS_TO_WEAKEN += libtcmalloc_debug.la
- TESTS += tcmalloc_debug_unittest
- tcmalloc_debug_unittest_SOURCES = $(tcmalloc_unittest_SOURCES)
- tcmalloc_debug_unittest_CXXFLAGS = $(tcmalloc_unittest_CXXFLAGS) \
- -DDEBUGALLOCATION
- tcmalloc_debug_unittest_LDFLAGS = $(tcmalloc_unittest_LDFLAGS)
- tcmalloc_debug_unittest_LDADD = libtcmalloc_debug.la $(PTHREAD_LIBS)
- TESTS += sampler_debug_test
- sampler_debug_test_SOURCES = $(sampler_test_SOURCES)
- sampler_debug_test_CXXFLAGS = $(samples_test_CXXFLAGS)
- sampler_debug_test_LDFLAGS = $(sampler_test_LDFLAGS)
- sampler_debug_test_LDADD = libtcmalloc_debug.la $(PTHREAD_LIBS) -lm
- TESTS += sampling_debug_test.sh$(EXEEXT)
- sampling_debug_test_sh_SOURCES = src/tests/sampling_test.sh
- sampling_debug_test.sh$(EXEEXT): $(top_srcdir)/$(sampling_test_sh_SOURCES) \
- sampling_debug_test
- rm -f $@
- cp -p $(top_srcdir)/$(sampling_test_sh_SOURCES) $@
- noinst_PROGRAMS += sampling_debug_test
- sampling_debug_test_SOURCES = $(sampling_test_SOURCES)
- sampling_debug_test_CXXFLAGS = $(sampling_test_CXXFLAGS)
- sampling_debug_test_LDFLAGS = $(sampling_test_LDFLAGS)
- sampling_debug_test_LDADD = libtcmalloc_debug.la $(PTHREAD_LIBS)
- endif WITH_HEAP_PROFILER_OR_CHECKER
- if WITH_HEAP_PROFILER
- TESTS += heap-profiler_debug_unittest.sh$(EXEEXT)
- heap_profiler_debug_unittest_sh_SOURCES = src/tests/heap-profiler_unittest.sh
- heap-profiler_debug_unittest.sh$(EXEEXT): $(top_srcdir)/$(heap_profiler_unittest_sh_SOURCES) \
- heap-profiler_debug_unittest
- rm -f $@
- cp -p $(top_srcdir)/$(heap_profiler_unittest_sh_SOURCES) $@
- noinst_PROGRAMS += heap-profiler_debug_unittest
- heap_profiler_debug_unittest_SOURCES = $(heap_profiler_unittest_SOURCES)
- heap_profiler_debug_unittest_CXXFLAGS = $(heap_profiler_unittest_CXXFLAGS)
- heap_profiler_debug_unittest_LDFLAGS = $(heap_profiler_unittest_LDFLAGS)
- heap_profiler_debug_unittest_LDADD = libtcmalloc_debug.la $(PTHREAD_LIBS)
- endif WITH_HEAP_PROFILER
- if WITH_HEAP_CHECKER
- TESTS += heap-checker_debug_unittest.sh$(EXEEXT)
- heap_checker_debug_unittest_sh_SOURCES = src/tests/heap-checker_unittest.sh
- heap-checker_debug_unittest.sh$(EXEEXT): $(top_srcdir)/$(heap_checker_unittest_sh_SOURCES) \
- heap-checker_debug_unittest
- rm -f $@
- cp -p $(top_srcdir)/$(heap_checker_unittest_sh_SOURCES) $@
- noinst_PROGRAMS += heap-checker_debug_unittest
- heap_checker_debug_unittest_SOURCES = $(heap_checker_unittest_SOURCES)
- heap_checker_debug_unittest_CXXFLAGS = $(heap_checker_unittest_CXXFLAGS)
- heap_checker_debug_unittest_LDFLAGS = $(heap_checker_unittest_LDFLAGS)
- heap_checker_debug_unittest_LDADD = libtcmalloc_debug.la liblogging.la \
- $(PTHREAD_LIBS)
- endif WITH_HEAP_CHECKER
- endif WITH_DEBUGALLOC
- if WITH_CPU_PROFILER
- S_CPU_PROFILER_INCLUDES = src/profiledata.h \
- src/profile-handler.h \
- src/getpc.h \
- src/base/basictypes.h \
- src/base/commandlineflags.h \
- src/base/googleinit.h \
- src/base/logging.h \
- src/base/simple_mutex.h \
- src/base/sysinfo.h \
- $(SPINLOCK_INCLUDES) \
- $(LOGGING_INCLUDES)
- SG_CPU_PROFILER_INCLUDES = src/gperftools/profiler.h
- CPU_PROFILER_INCLUDES = $(S_CPU_PROFILER_INCLUDES) $(SG_CPU_PROFILER_INCLUDES) \
- $(SG_STACKTRACE_INCLUDES)
- perftoolsinclude_HEADERS += $(SG_CPU_PROFILER_INCLUDES)
- lib_LTLIBRARIES += libprofiler.la
- libprofiler_la_SOURCES = src/profiler.cc \
- src/profile-handler.cc \
- src/profiledata.cc \
- $(CPU_PROFILER_INCLUDES)
- libprofiler_la_LIBADD = libstacktrace.la libmaybe_threads.la libfake_stacktrace_scope.la
- CPU_PROFILER_SYMBOLS = '(ProfilerStart|ProfilerStartWithOptions|ProfilerStop|ProfilerFlush|ProfilerEnable|ProfilerDisable|ProfilingIsEnabledForAllThreads|ProfilerRegisterThread|ProfilerGetCurrentState|ProfilerState|ProfileData|ProfileHandler)'
- libprofiler_la_LDFLAGS = -export-symbols-regex $(CPU_PROFILER_SYMBOLS) \
- -version-info @PROFILER_SO_VERSION@
- LIBPROFILER = libstacktrace.la libprofiler.la
- TESTS += getpc_test
- getpc_test_SOURCES = src/tests/getpc_test.cc src/getpc.h
- TESTS += profiledata_unittest
- profiledata_unittest_SOURCES = src/tests/profiledata_unittest.cc \
- src/profiledata.h \
- src/base/commandlineflags.h \
- src/base/logging.h \
- src/base/basictypes.h
- profiledata_unittest_LDADD = $(LIBPROFILER)
- TESTS += profile_handler_unittest
- profile_handler_unittest_SOURCES = src/tests/profile-handler_unittest.cc \
- src/profile-handler.h
- profile_handler_unittest_CXXFLAGS = $(PTHREAD_CFLAGS)
- profile_handler_unittest_LDFLAGS = $(PTHREAD_CFLAGS)
- profile_handler_unittest_LDADD = $(LIBPROFILER) $(PTHREAD_LIBS)
- TESTS += profiler_unittest.sh$(EXEEXT)
- profiler_unittest_sh_SOURCES = src/tests/profiler_unittest.sh
- noinst_SCRIPTS += $(profiler_unittest_sh_SOURCES)
- profiler_unittest.sh$(EXEEXT): $(top_srcdir)/$(profiler_unittest_sh_SOURCES) \
- profiler1_unittest profiler2_unittest \
- profiler3_unittest profiler4_unittest
- rm -f $@
- cp -p $(top_srcdir)/$(profiler_unittest_sh_SOURCES) $@
- noinst_PROGRAMS += profiler1_unittest profiler2_unittest profiler3_unittest \
- profiler4_unittest
- PROFILER_UNITTEST_INCLUDES = src/config_for_unittests.h \
- src/gperftools/profiler.h
- PROFILER_UNITTEST_SRCS = src/tests/profiler_unittest.cc \
- src/tests/testutil.h src/tests/testutil.cc \
- $(PROFILER_UNITTEST_INCLUDES)
- profiler1_unittest_SOURCES = $(PROFILER_UNITTEST_SRCS)
- profiler1_unittest_CXXFLAGS = -g -DNO_THREADS $(AM_CXXFLAGS)
- profiler1_unittest_LDADD = $(LIBPROFILER)
- profiler2_unittest_SOURCES = $(PROFILER_UNITTEST_SRCS)
- profiler2_unittest_CXXFLAGS = -g -DNO_THREADS $(AM_CXXFLAGS)
- profiler2_unittest_LDADD = -lstacktrace -lprofiler
- profiler2_unittest_DEPENDENCIES = $(LIBPROFILER)
- profiler3_unittest_SOURCES = $(PROFILER_UNITTEST_SRCS)
- profiler3_unittest_CXXFLAGS = -g $(PTHREAD_CFLAGS) $(AM_CXXFLAGS)
- profiler3_unittest_LDFLAGS = $(PTHREAD_CFLAGS)
- profiler3_unittest_LDADD = $(LIBPROFILER) $(PTHREAD_LIBS)
- profiler4_unittest_SOURCES = $(PROFILER_UNITTEST_SRCS)
- profiler4_unittest_CXXFLAGS = -g $(PTHREAD_CFLAGS) $(AM_CXXFLAGS)
- profiler4_unittest_LDFLAGS = $(PTHREAD_CFLAGS)
- profiler4_unittest_LDADD = -lstacktrace -lprofiler $(PTHREAD_LIBS)
- profiler4_unittest_DEPENDENCIES = $(LIBPROFILER)
- dist_doc_DATA += doc/cpuprofile.html \
- doc/cpuprofile-fileformat.html \
- doc/pprof-test-big.gif \
- doc/pprof-test.gif \
- doc/pprof-vsnprintf-big.gif \
- doc/pprof-vsnprintf.gif
- endif WITH_CPU_PROFILER
- if WITH_HEAP_PROFILER_OR_CHECKER
- if WITH_CPU_PROFILER
- lib_LTLIBRARIES += libtcmalloc_and_profiler.la
- libtcmalloc_and_profiler_la_SOURCES = $(libtcmalloc_la_SOURCES) $(libprofiler_la_SOURCES)
- libtcmalloc_and_profiler_la_CXXFLAGS = $(libtcmalloc_la_CXXFLAGS) $(libprofiler_la_CXXFLAGS)
- libtcmalloc_and_profiler_la_LDFLAGS = $(PTHREAD_CFLAGS) \
- -version-info @TCMALLOC_SO_VERSION@
- libtcmalloc_and_profiler_la_LIBADD = $(libtcmalloc_la_LIBADD)
- TESTS += tcmalloc_and_profiler_unittest
- tcmalloc_and_profiler_unittest_SOURCES = $(tcmalloc_both_unittest_srcs)
- tcmalloc_and_profiler_unittest_CXXFLAGS = $(tcmalloc_both_unittest_cflags)
- tcmalloc_and_profiler_unittest_LDFLAGS = $(tcmalloc_both_unittest_lflags)
- tcmalloc_and_profiler_unittest_LDADD = libtcmalloc_and_profiler.la
- LIBS_TO_WEAKEN += libtcmalloc_and_profiler.la
- endif WITH_CPU_PROFILER
- endif WITH_HEAP_PROFILER_OR_CHECKER
- install-exec-local: all-local
- all-local: $(LIBS_TO_WEAKEN)
- for la in $(LIBS_TO_WEAKEN); do lib=".libs/`basename $$la .la`.a"; [ ! -f "$$lib" ] || $(WEAKEN) "$$lib"; done
- noinst_PROGRAMS += $(TESTS)
- rpm: dist-gzip packages/rpm.sh packages/rpm/rpm.spec
- @cd packages && ./rpm.sh ${PACKAGE} ${VERSION}
- deb: dist-gzip packages/deb.sh packages/deb/*
- @cd packages && ./deb.sh ${PACKAGE} ${VERSION}
- pkgconfigdir = $(libdir)/pkgconfig
- pkgconfig_DATA = libtcmalloc.pc libtcmalloc_minimal.pc \
- libtcmalloc_debug.pc libtcmalloc_minimal_debug.pc \
- libprofiler.pc
- CLEANFILES = $(pkgconfig_DATA)
- libtcmalloc.pc: Makefile packages/rpm/rpm.spec
- echo 'prefix=$(prefix)' > "$@".tmp
- echo 'exec_prefix='`echo '$(exec_prefix)' | sed 's@^$(prefix)@$${prefix}@'` >> "$@".tmp
- echo 'libdir='`echo '$(libdir)' | sed 's@^$(exec_prefix)@$${exec_prefix}@'` >> "$@".tmp
- echo 'includedir='`echo '$(includedir)' | sed 's@^$(prefix)@$${prefix}@'` >> "$@".tmp
- echo '' >> "$@".tmp
- echo 'Name: $(PACKAGE)' >> "$@".tmp
- echo 'Version: $(VERSION)' >> "$@".tmp
- -grep '^Summary:' $(top_srcdir)/packages/rpm/rpm.spec | sed s/^Summary:/Description:/ | head -n1 >> "$@".tmp
- -grep '^URL: ' $(top_srcdir)/packages/rpm/rpm.spec >> "$@".tmp
- echo 'Requires:' >> "$@".tmp
- echo 'Libs: -L$${libdir} -ltcmalloc' >> "$@".tmp
- echo 'Libs.private: $(PTHREAD_CFLAGS) $(PTHREAD_LIBS)' >> "$@".tmp
- echo 'Cflags: -I$${includedir}' >> "$@".tmp
- mv -f "$@".tmp "$@"
- libtcmalloc_minimal.pc: libtcmalloc.pc
- cat libtcmalloc.pc | sed s/-ltcmalloc/-ltcmalloc_minimal/ > "$@"
- libtcmalloc_debug.pc: libtcmalloc.pc
- cat libtcmalloc.pc | sed s/-ltcmalloc/-ltcmalloc_debug/ > "$@"
- libtcmalloc_minimal_debug.pc: libtcmalloc.pc
- cat libtcmalloc.pc | sed s/-ltcmalloc/-ltcmalloc_minimal_debug/ > "$@"
- libprofiler.pc: libtcmalloc.pc
- cat libtcmalloc.pc | sed s/-ltcmalloc/-lprofiler/ > "$@"
- libtool: $(LIBTOOL_DEPS)
- $(SHELL) ./config.status --recheck
- dist-hook:
- test -e "$(distdir)/vsprojects" \
- && chmod -R u+w $(distdir)/*.sln $(distdir)/vsprojects/
- EXTRA_DIST = packages/rpm.sh packages/rpm/rpm.spec packages/deb.sh packages/deb \
- $(SCRIPTS) libtool \
- src/windows/get_mangled_names.cc src/windows/override_functions.cc \
- src/windows/config.h src/windows/gperftools/tcmalloc.h \
- doc/pprof.see_also src/windows/TODO \
- $(WINDOWS_PROJECTS) \
- src/solaris/libstdc++.la
|