1 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
2 // vim: ts=8 sw=2 smarttab
4 * Ceph - scalable distributed file system
6 * Copyright (C) 2011 New Dream Network/Sage Weil <sage@newdream.net>
8 * This is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License version 2.1, as published by the Free Software
11 * Foundation. See file COPYING.
13 #ifndef HEAP_PROFILER_H_
14 #define HEAP_PROFILER_H_
18 #include "common/config.h"
23 * Ceph glue for the Google perftools heap profiler, included
24 * as part of tcmalloc. This replaces ugly function pointers
27 bool ceph_using_tcmalloc();
30 * Configure the heap profiler
32 void ceph_heap_profiler_init();
34 void ceph_heap_profiler_stats(char *buf, int length);
36 void ceph_heap_release_free_memory();
38 bool ceph_heap_profiler_running();
40 void ceph_heap_profiler_start();
42 void ceph_heap_profiler_stop();
44 void ceph_heap_profiler_dump(const char *reason);
46 bool ceph_heap_get_numeric_property(const char *property, size_t *value);
48 bool ceph_heap_set_numeric_property(const char *property, size_t value);
50 void ceph_heap_profiler_handle_command(const std::vector<std::string> &cmd,
53 #endif /* HEAP_PROFILER_H_ */