diff --git a/3party/gperftools/src/base/googleinit.h b/3party/gperftools/src/base/googleinit.h index fcbd253..d66971e 100644 --- a/3party/gperftools/src/base/googleinit.h +++ b/3party/gperftools/src/base/googleinit.h @@ -63,7 +63,7 @@ private: namespace { \ static void google_init_module_##name() { body; } \ GoogleInitializer google_initializer_module_##name(#name, google_init_module_##name, NULL); \ - __attribute__((constructor)) static void EnsureConstructorRunsBeforeMain() \ + __attribute__((constructor)) void EnsureConstructorRunsBeforeMain() \ { \ google_initializer_module_##name.module_name(); \ } \ diff --git a/3party/gperftools/src/heap-profiler.cc b/3party/gperftools/src/heap-profiler.cc index 49e9cd7..8733f8c 100644 --- a/3party/gperftools/src/heap-profiler.cc +++ b/3party/gperftools/src/heap-profiler.cc @@ -423,7 +423,7 @@ LogMappingEvent(const tcmalloc::MappingEvent &evt) extern "C" void HeapProfilerStart(const char *prefix) { - SpinLockHolder l(&heap_lock); + SpinLockHolder lock(&heap_lock); if (is_on) return;