summaryrefslogtreecommitdiffstats
path: root/third_party/tcmalloc/chromium/src/google/heap-profiler.h
diff options
context:
space:
mode:
authordmikurube@chromium.org <dmikurube@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-13 17:13:00 +0000
committerdmikurube@chromium.org <dmikurube@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-13 17:13:00 +0000
commit451c89d68b41da87c3a549f5d3f84f9146018492 (patch)
tree72bc5a00adac67d9cd11ba4a286c164a941a5005 /third_party/tcmalloc/chromium/src/google/heap-profiler.h
parentf159a4505dd98e22951b293c7fe377a1e634866e (diff)
downloadchromium_src-451c89d68b41da87c3a549f5d3f84f9146018492.zip
chromium_src-451c89d68b41da87c3a549f5d3f84f9146018492.tar.gz
chromium_src-451c89d68b41da87c3a549f5d3f84f9146018492.tar.bz2
Update the tcmalloc chromium branch to r144 (gperftools 2.0), and merge chromium-specific changes.
This change is retry of r124832. The original review discussion is at http://codereview.chromium.org/9311003/. The major reason for us is to enable a fix for HEAP_PROFILE_MMAP. The change is created by 3-way merge from 1) the original google-perftools r109 ( = vendor base), 2) the original gperftools 2.0 r144 ( = branch), and 3) the chromium branch ( = another branch) with the following additional changes : * base/allocator/allocator.gyp is modified. * Many [#include "third_party/tcmalloc/chromium/src/google/..."] are replaced with "gperftools/". (Many files in Chromium) * gperftools/tcmalloc.h (formerly google/tcmalloc.h) is replaced with the original (generated) one. * windows/gperftools/tcmalloc.h (formerly windows/google/tcmalloc.h) is replaced with the original (generated) one. * malloc_hook-like functions are moved to libc_override*.h in gperftools 2.0. Some changes due to it. * MALLOC_HOOK_MAYBE_VOLATILE is redefined using __MALLOC_HOOK_VOLATILE. (config.h, tcmalloc.cc and libc_override_glibc.h) * The macro "CRASH(...)" is replaced with "Log(kCrash, __FILE__, __LINE__, ...)". (Many files) * LARGE_PAGE-related parameters (which may affect performance?) are merged. (common.h) * RAW_VLOG() calls are removed. (base/googleinit.h) * sys_{mmap|munmap|mremap}(...) calls are tentatively replaced with syscall(SYS_{mmap|munmap|mremap}, ...). (malloc_hook_mmap_linux.h) * tc_mallinfo is declared only when HAVE_STRUCT_MALLINFO is defined. (gperftools/tcmalloc.h) * "libc_override_redefine.h" is not included in Windows. (libc_override.h) * Chromium-original "sys_alloc" is not declared. (windows/port.cc) * base/spinlock_win32-inl.h is reverted from r144 because 64-bit atomicops are not implemented on Windows. (base/atomicops-internals-windows.h) The vendor branch is updated in another change. BUG=114302 TEST=run all existing tests. Review URL: https://chromiumcodereview.appspot.com/9584046 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@126412 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'third_party/tcmalloc/chromium/src/google/heap-profiler.h')
-rw-r--r--third_party/tcmalloc/chromium/src/google/heap-profiler.h76
1 files changed, 3 insertions, 73 deletions
diff --git a/third_party/tcmalloc/chromium/src/google/heap-profiler.h b/third_party/tcmalloc/chromium/src/google/heap-profiler.h
index 57cb97a..be43959 100644
--- a/third_party/tcmalloc/chromium/src/google/heap-profiler.h
+++ b/third_party/tcmalloc/chromium/src/google/heap-profiler.h
@@ -26,79 +26,9 @@
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * ---
- * Author: Sanjay Ghemawat
- *
- * Module for heap-profiling.
- *
- * For full(er) information, see doc/heapprofile.html
- *
- * This module can be linked into your program with
- * no slowdown caused by this unless you activate the profiler
- * using one of the following methods:
- *
- * 1. Before starting the program, set the environment variable
- * "HEAPPROFILE" to be the name of the file to which the profile
- * data should be written.
- *
- * 2. Programmatically, start and stop the profiler using the
- * routines "HeapProfilerStart(filename)" and "HeapProfilerStop()".
- *
*/
-#ifndef BASE_HEAP_PROFILER_H_
-#define BASE_HEAP_PROFILER_H_
-
-#include <stddef.h>
-
-/* Annoying stuff for windows; makes sure clients can import these functions */
-#ifndef PERFTOOLS_DLL_DECL
-# ifdef _WIN32
-# define PERFTOOLS_DLL_DECL __declspec(dllimport)
-# else
-# define PERFTOOLS_DLL_DECL
-# endif
-#endif
-
-/* All this code should be usable from within C apps. */
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* Start profiling and arrange to write profile data to file names
- * of the form: "prefix.0000", "prefix.0001", ...
- */
-PERFTOOLS_DLL_DECL void HeapProfilerStart(const char* prefix);
-
-/* Returns non-zero if we are currently profiling the heap. (Returns
- * an int rather than a bool so it's usable from C.) This is true
- * between calls to HeapProfilerStart() and HeapProfilerStop(), and
- * also if the program has been run with HEAPPROFILER, or some other
- * way to turn on whole-program profiling.
- */
-int IsHeapProfilerRunning();
-
-/* Stop heap profiling. Can be restarted again with HeapProfilerStart(),
- * but the currently accumulated profiling information will be cleared.
- */
-PERFTOOLS_DLL_DECL void HeapProfilerStop();
-
-/* Dump a profile now - can be used for dumping at a hopefully
- * quiescent state in your program, in order to more easily track down
- * memory leaks. Will include the reason in the logged message
+/* The code has moved to gperftools/. Use that include-directory for
+ * new code.
*/
-PERFTOOLS_DLL_DECL void HeapProfilerDump(const char *reason);
-
-/* Generate current heap profiling information.
- * Returns an empty string when heap profiling is not active.
- * The returned pointer is a '\0'-terminated string allocated using malloc()
- * and should be free()-ed as soon as the caller does not need it anymore.
- */
-PERFTOOLS_DLL_DECL char* GetHeapProfile();
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
-
-#endif /* BASE_HEAP_PROFILER_H_ */
+#include <gperftools/heap-profiler.h>