diff --git a/Makefile.am b/Makefile.am index ce540b7..a6e39eb 100644 --- a/Makefile.am +++ b/Makefile.am @@ -143,29 +143,14 @@ dist_doc_DATA += docs/index.html docs/designstyle.css ### ------- library routines, in src/base # This is a 'convenience library' -- it's not actually installed or anything -LOGGING_INCLUDES = src/base/logging.h \ - src/base/commandlineflags.h \ - src/base/threading.h \ - src/base/basictypes.h \ - src/base/generic_writer.h \ - src/base/dynamic_annotations.h noinst_LTLIBRARIES += liblogging.la liblogging_la_SOURCES = src/base/logging.cc \ - src/base/generic_writer.cc \ - $(LOGGING_INCLUDES) + src/base/generic_writer.cc -SYSINFO_INCLUDES = src/base/sysinfo.h \ - src/getenv_safe.h \ - src/base/logging.h \ - src/base/commandlineflags.h \ - src/base/threading.h \ - src/base/proc_maps_iterator.h \ - src/base/basictypes.h noinst_LTLIBRARIES += libsysinfo.la libsysinfo_la_SOURCES = src/base/sysinfo.cc \ src/base/proc_maps_iterator.cc \ - src/base/dynamic_annotations.cc \ - $(SYSINFO_INCLUDES) + src/base/dynamic_annotations.cc libsysinfo_la_LIBADD = $(NANOSLEEP_LIBS) # For MinGW, we use also have to use libwindows Luckily, we need the @@ -175,13 +160,8 @@ libsysinfo_la_LIBADD = $(NANOSLEEP_LIBS) # files we know aren't used on windows. libwindows also obsoletes the # need for other files like system_alloc.cc. if MINGW -WINDOWS_INCLUDES = src/windows/port.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 \ +libwindows_la_SOURCES = src/windows/port.cc \ src/windows/system-alloc.cc \ src/windows/ia32_modrm_map.cc \ src/windows/ia32_opcode_map.cc \ @@ -192,15 +172,9 @@ libwindows_la_SOURCES = $(WINDOWS_INCLUDES) \ # patch_functions.cc uses Psapi.lib. MSVC has a #pragma for that, but not us. 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 noinst_LTLIBRARIES += libspinlock.la libspinlock_la_SOURCES = src/base/spinlock.cc \ - src/base/spinlock_internal.cc \ - $(SPINLOCK_INCLUDES) + src/base/spinlock_internal.cc libspinlock_la_LIBADD = -lsynchronization LIBSPINLOCK = libwindows.la libspinlock.la libsysinfo.la liblogging.la @@ -225,13 +199,9 @@ libsysinfo_la_LIBADD += -lshlwapi TCMALLOC_CC = SYSTEM_ALLOC_CC = else !MINGW -SPINLOCK_INCLUDES = src/base/spinlock.h \ - src/base/spinlock_internal.h - noinst_LTLIBRARIES += libspinlock.la libspinlock_la_SOURCES = src/base/spinlock.cc \ - src/base/spinlock_internal.cc \ - $(SPINLOCK_INCLUDES) + src/base/spinlock_internal.cc libspinlock_la_LIBADD = $(NANOSLEEP_LIBS) # spinlock also needs NumCPUs, from libsysinfo, which in turn needs liblogging LIBSPINLOCK = libspinlock.la libsysinfo.la liblogging.la @@ -254,20 +224,10 @@ WINDOWS_PROJECTS += src/windows/preamble_patcher_test.cc \ if WITH_HEAP_PROFILER_OR_CHECKER WINDOWS_PROJECTS += vsprojects/low_level_alloc_unittest/low_level_alloc_unittest.vcxproj TESTS += low_level_alloc_unittest -LOW_LEVEL_ALLOC_UNITTEST_INCLUDES = src/base/low_level_alloc.h \ - src/base/basictypes.h \ - src/base/threading.h \ - src/gperftools/malloc_hook.h \ - src/gperftools/malloc_hook_c.h \ - src/malloc_hook-inl.h \ - src/mmap_hook.h \ - $(SPINLOCK_INCLUDES) \ - $(LOGGING_INCLUDES) low_level_alloc_unittest_SOURCES = src/base/low_level_alloc.cc \ src/malloc_hook.cc \ src/mmap_hook.cc \ - src/tests/low_level_alloc_unittest.cc \ - $(LOW_LEVEL_ALLOC_UNITTEST_INCLUDES) + src/tests/low_level_alloc_unittest.cc # By default, MallocHook takes stack traces for use by the heap-checker. # We don't need that functionality here, so we turn it off to reduce deps. low_level_alloc_unittest_CXXFLAGS = -DNO_TCMALLOC_SAMPLES @@ -279,31 +239,14 @@ endif WITH_HEAP_PROFILER_OR_CHECKER if WITH_STACK_TRACE ### The header files we use. We divide into categories based on directory -S_STACKTRACE_INCLUDES = src/stacktrace_impl_setup-inl.h \ - src/stacktrace_generic-inl.h \ - src/stacktrace_generic_fp-inl.h \ - src/check_address-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_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) +perftoolsinclude_HEADERS += src/gperftools/stacktrace.h ### Making the library noinst_LTLIBRARIES += libstacktrace.la libstacktrace_la_SOURCES = src/stacktrace.cc \ src/base/elf_mem_image.cc \ - src/base/vdso_support.cc \ - $(STACKTRACE_INCLUDES) + src/base/vdso_support.cc libstacktrace_la_LIBADD = $(UNWIND_LIBS) $(LIBSPINLOCK) STACKTRACE_SYMBOLS = '(GetStackTrace|GetStackFrames|GetStackTraceWithContext|GetStackFramesWithContext)' libstacktrace_la_LDFLAGS = -export-symbols-regex $(STACKTRACE_SYMBOLS) $(AM_LDFLAGS) @@ -313,13 +256,8 @@ libfake_stacktrace_scope_la_SOURCES = src/fake_stacktrace_scope.cc ### Unittests 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 \ - $(libstacktrace_la_SOURCES) \ - $(STACKTRACE_UNITTEST_INCLUDES) + $(libstacktrace_la_SOURCES) stacktrace_unittest_CXXFLAGS = $(AM_CXXFLAGS) -DSTACKTRACE_IS_TESTED stacktrace_unittest_LDADD = $(libstacktrace_la_LIBADD) liblogging.la libfake_stacktrace_scope.la $(STACKTRACE_UNITTEST_LIBS) # nice to have. Allows glibc's backtrace_symbols to work. @@ -372,44 +310,11 @@ endif WITH_STACK_TRACE ### ------- tcmalloc_minimal (thread-caching malloc) -### The header files we use. We divide into categories based on directory -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/threading.h \ - src/base/basictypes.h \ - src/safe_strerror.h \ - src/pagemap.h \ - src/sampler.h \ - src/central_freelist.h \ - src/linked_list.h \ - src/libc_override.h \ - src/libc_override_aix.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/thread_cache_ptr.h \ - src/stack_trace_table.h \ - src/base/thread_annotations.h \ - src/malloc_hook-inl.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 \ - src/gperftools/nallocx.h -TCMALLOC_MINIMAL_INCLUDES = $(S_TCMALLOC_MINIMAL_INCLUDES) $(SG_TCMALLOC_MINIMAL_INCLUDES) $(SG_STACKTRACE_INCLUDES) -perftoolsinclude_HEADERS += $(SG_TCMALLOC_MINIMAL_INCLUDES) +perftoolsinclude_HEADERS += src/gperftools/malloc_hook.h \ + src/gperftools/malloc_hook_c.h \ + src/gperftools/malloc_extension.h \ + src/gperftools/malloc_extension_c.h \ + src/gperftools/nallocx.h ### Making the library @@ -429,8 +334,7 @@ libtcmalloc_minimal_internal_la_SOURCES = src/common.cc \ src/thread_cache.cc \ src/thread_cache_ptr.cc \ src/malloc_hook.cc \ - src/malloc_extension.cc \ - $(TCMALLOC_MINIMAL_INCLUDES) + src/malloc_extension.cc # We #define NO_TCMALLOC_SAMPLES, since sampling is turned off for _minimal. libtcmalloc_minimal_internal_la_CXXFLAGS = -DNO_TCMALLOC_SAMPLES \ -DNO_HEAP_CHECK \ @@ -441,7 +345,7 @@ libtcmalloc_minimal_internal_la_LIBADD = $(LIBSPINLOCK) lib_LTLIBRARIES += libtcmalloc_minimal.la WINDOWS_PROJECTS += vsprojects/libtcmalloc_minimal/libtcmalloc_minimal.vcxproj -libtcmalloc_minimal_la_SOURCES = $(TCMALLOC_CC) $(TCMALLOC_MINIMAL_INCLUDES) +libtcmalloc_minimal_la_SOURCES = $(TCMALLOC_CC) libtcmalloc_minimal_la_CXXFLAGS = -DNO_TCMALLOC_SAMPLES \ $(PTHREAD_CFLAGS) -DNDEBUG $(AM_CXXFLAGS) # -version-info gets passed to libtool @@ -452,27 +356,10 @@ LIBS_TO_WEAKEN += libtcmalloc_minimal.la ### Unittests -# Commented out for the moment because malloc(very_big_num) is broken in -# standard libc! At least, in some situations, some of the time. -## TESTS += malloc_unittest -## MALLOC_UNITEST_INCLUDES = src/gperftools/malloc_extension.h \ -## src/gperftools/malloc_hook.h \ -## src/gperftools/malloc_hook_c.h \ -## src/malloc_hook-inl.h \ -## src/base/basictypes.h \ -## malloc_unittest_SOURCES = src/tests/tcmalloc_unittest.cc \ -## src/malloc_hook.cc \ -## src/malloc_extension.cc \ -## $(MALLOC_UNITTEST_INCLUDES) -## malloc_unittest_CXXFLAGS = $(PTHREAD_CFLAGS) $(AM_CXXFLAGS) -## malloc_unittest_LDFLAGS = $(PTHREAD_CFLAGS) -## malloc_unittest_LDADD = $(PTHREAD_LIBS) - TESTS += tcmalloc_minimal_unittest WINDOWS_PROJECTS += vsprojects/tcmalloc_minimal_unittest/tcmalloc_minimal_unittest.vcxproj tcmalloc_minimal_unittest_SOURCES = src/tests/tcmalloc_unittest.cc \ - src/tests/testutil.h src/tests/testutil.cc \ - $(TCMALLOC_UNITTEST_INCLUDES) + src/tests/testutil.cc tcmalloc_minimal_unittest_CXXFLAGS = $(PTHREAD_CFLAGS) $(AM_CXXFLAGS) tcmalloc_minimal_unittest_LDFLAGS = $(PTHREAD_CFLAGS) $(TCMALLOC_FLAGS) # We want libtcmalloc last on the link line, but due to a bug in @@ -489,10 +376,9 @@ tcmalloc_minimal_unittest_LDADD = libtcmalloc_minimal.la \ # configuration TESTS += tcm_min_asserts_unittest tcm_min_asserts_unittest_SOURCES = src/tests/tcmalloc_unittest.cc \ - src/tests/testutil.h src/tests/testutil.cc \ + src/tests/testutil.cc \ $(libtcmalloc_minimal_internal_la_SOURCES) \ - $(libtcmalloc_minimal_la_SOURCES) \ - $(TCMALLOC_UNITTEST_INCLUDES) + $(libtcmalloc_minimal_la_SOURCES) tcm_min_asserts_unittest_CXXFLAGS = -DNO_TCMALLOC_SAMPLES -DNO_HEAP_CHECK \ $(PTHREAD_CFLAGS) $(AM_CXXFLAGS) tcm_min_asserts_unittest_LDFLAGS = $(PTHREAD_CFLAGS) $(TCMALLOC_FLAGS) @@ -516,11 +402,7 @@ tcmalloc_minimal_large_heap_fragmentation_unittest_LDADD = libtcmalloc_minimal.l TESTS += addressmap_unittest WINDOWS_PROJECTS += vsprojects/addressmap_unittest/addressmap_unittest.vcxproj -ADDRESSMAP_UNITTEST_INCLUDES = src/addressmap-inl.h \ - src/base/commandlineflags.h \ - $(LOGGING_INCLUDES) -addressmap_unittest_SOURCES = src/tests/addressmap_unittest.cc \ - $(ADDRESSMAP_UNITTEST_INCLUDES) +addressmap_unittest_SOURCES = src/tests/addressmap_unittest.cc if MINGW addressmap_unittest_SOURCES += src/windows/port.h src/windows/port.cc endif MINGW @@ -737,8 +619,7 @@ dist_doc_DATA += docs/overview.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_SOURCES = src/debugallocation.cc libtcmalloc_minimal_debug_la_CXXFLAGS = $(libtcmalloc_minimal_la_CXXFLAGS) \ -DTCMALLOC_FOR_DEBUGALLOCATION # version_info gets passed to libtool @@ -855,26 +736,8 @@ endif !MINGW if WITH_HEAP_PROFILER_OR_CHECKER -### The header files we use. We divide into categories based on directory -S_TCMALLOC_INCLUDES = $(S_TCMALLOC_MINIMAL_INCLUDES) \ - $(LOGGING_INCLUDES) \ - src/addressmap-inl.h \ - src/raw_printer.h \ - src/base/googleinit.h \ - src/base/linuxthreads.h \ - src/base/stl_allocator.h \ - src/base/sysinfo.h \ - src/heap-profile-table.h \ - src/heap-profile-stats.h \ - src/maybe_emergency_malloc.h \ - src/emergency_malloc.h \ - src/mmap_hook.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) +perftoolsinclude_HEADERS += src/gperftools/heap-profiler.h \ + src/gperftools/heap-checker.h if BUILD_EMERGENCY_MALLOC EMERGENCY_MALLOC_CC = src/emergency_malloc.cc src/emergency_malloc_for_stacktrace.cc @@ -902,7 +765,6 @@ endif !WITH_HEAP_CHECKER 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 \ @@ -917,7 +779,7 @@ 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_SOURCES = $(TCMALLOC_CC) \ $(HEAP_CHECKER_SOURCES) libtcmalloc_la_CXXFLAGS = $(PTHREAD_CFLAGS) -DNDEBUG $(AM_CXXFLAGS) \ $(MAYBE_NO_HEAP_CHECK) $(EMERGENCY_MALLOC_DEFINE) @@ -955,12 +817,9 @@ tcmalloc_unittest.sh$(EXEEXT): $(top_srcdir)/$(tcmalloc_unittest_sh_SOURCES) \ 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_internal.h \ - src/tests/testutil.h src/tests/testutil.cc \ - $(TCMALLOC_UNITTEST_INCLUDES) + src/tests/testutil.h src/tests/testutil.cc tcmalloc_unittest_CXXFLAGS = $(PTHREAD_CFLAGS) $(AM_CXXFLAGS) tcmalloc_unittest_LDFLAGS = $(PTHREAD_CFLAGS) $(TCMALLOC_FLAGS) # We want libtcmalloc last on the link line, but due to a bug in @@ -973,12 +832,9 @@ tcmalloc_unittest_LDFLAGS = $(PTHREAD_CFLAGS) $(TCMALLOC_FLAGS) tcmalloc_unittest_LDADD = $(LIBTCMALLOC) liblogging.la $(PTHREAD_LIBS) TESTS += tcm_asserts_unittest -tcm_asserts_unittest_INCLUDES = src/config_for_unittests.h \ - src/gperftools/malloc_extension.h tcm_asserts_unittest_SOURCES = src/tests/tcmalloc_unittest.cc \ src/tcmalloc_internal.h \ - src/tests/testutil.h src/tests/testutil.cc \ - $(TCMALLOC_UNITTEST_INCLUDES) + src/tests/testutil.h src/tests/testutil.cc tcm_asserts_unittest_CXXFLAGS = $(PTHREAD_CFLAGS) $(AM_CXXFLAGS) tcm_asserts_unittest_LDFLAGS = $(PTHREAD_CFLAGS) $(TCMALLOC_FLAGS) tcm_asserts_unittest_LDADD = libtcmalloc_with_asserts.la liblogging.la $(PTHREAD_LIBS) @@ -991,8 +847,7 @@ tcm_asserts_unittest_LDADD = libtcmalloc_with_asserts.la liblogging.la $(PTHREAD # the code tends to pick one arbitrarily), so don't run the test there. # (We define these outside the 'if' because they're reused below.) tcmalloc_both_unittest_srcs = src/tests/tcmalloc_unittest.cc \ - src/tests/testutil.h src/tests/testutil.cc \ - $(TCMALLOC_UNITTEST_INCLUDES) + src/tests/testutil.h src/tests/testutil.cc tcmalloc_both_unittest_cflags = $(PTHREAD_CFLAGS) $(AM_CXXFLAGS) tcmalloc_both_unittest_lflags = $(PTHREAD_CFLAGS) $(TCMALLOC_FLAGS) if WITH_CPU_PROFILER @@ -1063,11 +918,7 @@ sampling_test.sh$(EXEEXT): $(top_srcdir)/$(sampling_test_sh_SOURCES) \ # This is the sub-program used by sampling_test.sh # The -g is so pprof can get symbol information. 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_SOURCES = src/tests/sampling_test.cc sampling_test_CXXFLAGS = -g $(PTHREAD_CFLAGS) $(AM_CXXFLAGS) sampling_test_LDFLAGS = -g $(PTHREAD_CFLAGS) $(TCMALLOC_FLAGS) sampling_test_LDADD = $(LIBTCMALLOC) $(PTHREAD_LIBS) @@ -1086,10 +937,7 @@ heap-profiler_unittest.sh$(EXEEXT): $(top_srcdir)/$(heap_profiler_unittest_sh_SO # These are sub-programs used by heap-profiler_unittest.sh 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_SOURCES = src/tests/heap-profiler_unittest.cc heap_profiler_unittest_CXXFLAGS = -g $(PTHREAD_CFLAGS) $(AM_CXXFLAGS) heap_profiler_unittest_LDFLAGS = -g $(PTHREAD_CFLAGS) $(TCMALLOC_FLAGS) heap_profiler_unittest_LDADD = $(LIBTCMALLOC) $(PTHREAD_LIBS) @@ -1108,14 +956,7 @@ heap-checker-death_unittest.sh$(EXEEXT): $(heap_checker_death_unittest_sh_SOURCE # These are sub-programs used by heap-checker_unittest.sh TESTS += 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_SOURCES = src/tests/heap-checker_unittest.cc heap_checker_unittest_CXXFLAGS = -g $(PTHREAD_CFLAGS) $(AM_CXXFLAGS) heap_checker_unittest_LDFLAGS = -g $(PTHREAD_CFLAGS) $(TCMALLOC_FLAGS) # We want libtcmalloc last on the link line, but due to a bug in @@ -1145,8 +986,7 @@ 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_SOURCES = src/debugallocation.cc $(HEAP_CHECKER_SOURCES) libtcmalloc_debug_la_CXXFLAGS = $(libtcmalloc_la_CXXFLAGS) \ -DTCMALLOC_FOR_DEBUGALLOCATION libtcmalloc_debug_la_LDFLAGS = $(libtcmalloc_la_LDFLAGS) \ @@ -1227,30 +1067,13 @@ endif WITH_DEBUGALLOC if WITH_CPU_PROFILER -### The header files we use. We divide into categories based on directory -S_CPU_PROFILER_INCLUDES = src/profiledata.h \ - src/profile-handler.h \ - src/getpc.h \ - src/getpc-inl.h \ - src/base/basictypes.h \ - src/base/threading.h \ - src/base/commandlineflags.h \ - src/base/googleinit.h \ - src/base/logging.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) +perftoolsinclude_HEADERS += src/gperftools/profiler.h ### Making the library lib_LTLIBRARIES += libprofiler.la libprofiler_la_SOURCES = src/profiler.cc \ src/profile-handler.cc \ - src/profiledata.cc \ - $(CPU_PROFILER_INCLUDES) + src/profiledata.cc libprofiler_la_LIBADD = libstacktrace.la libfake_stacktrace_scope.la $(PTHREAD_LIBS) libprofiler_la_CXXFLAGS = $(PTHREAD_CFLAGS) $(AM_CXXFLAGS) # We have to include ProfileData for profiledata_unittest @@ -1292,11 +1115,8 @@ profiler_unittest.sh$(EXEEXT): $(top_srcdir)/$(profiler_unittest_sh_SOURCES) \ # These are sub-programs used by profiler_unittest.sh 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) + src/tests/testutil.h src/tests/testutil.cc profiler1_unittest_SOURCES = $(PROFILER_UNITTEST_SRCS) profiler1_unittest_CXXFLAGS = -g -DNO_THREADS $(AM_CXXFLAGS) profiler1_unittest_LDADD = libprofiler.la @@ -1436,13 +1256,16 @@ $(top_distdir)/ChangeLog: | fmt --split-only >$(top_distdir)/ChangeLog; \ else cp $(top_srcdir)/ChangeLog $(top_distdir)/ChangeLog; fi -# Windows wants write permission to .vcxproj files and maybe even sln files. -dist-hook: $(top_distdir)/ChangeLog - test -e "$(distdir)/vsprojects" \ - && chmod -R u+w $(distdir)/*.sln $(distdir)/vsprojects/ - EXTRA_DIST = $(SCRIPTS) \ src/windows/get_mangled_names.cc src/windows/override_functions.cc \ docs/pprof.see_also src/windows/TODO \ $(WINDOWS_PROJECTS) \ + $(top_srcdir)/src/*h $(top_srcdir)/src/base/*h \ + $(top_srcdir)/src/windows/*h $(top_srcdir)/src/gperftools/*h \ CMakeLists.txt cmake + +# Windows wants write permission to .vcxproj files and maybe even sln files. +dist-hook: $(top_distdir)/ChangeLog + test -e "$(distdir)/vsprojects" \ + && chmod -R u+w $(distdir)/*.sln $(distdir)/vsprojects/ + rm -f $(distdir)/src/config.h $(distdir)/src/gperftools/tcmalloc.h