]> git.proxmox.com Git - ceph.git/blame - ceph/src/perfglue/heap_profiler.h
update sources to ceph Nautilus 14.2.1
[ceph.git] / ceph / src / perfglue / heap_profiler.h
CommitLineData
7c673cae
FG
1// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
2// vim: ts=8 sw=2 smarttab
3/*
4 * Ceph - scalable distributed file system
5 *
6 * Copyright (C) 2011 New Dream Network/Sage Weil <sage@newdream.net>
7 *
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.
12 */
13#ifndef HEAP_PROFILER_H_
14#define HEAP_PROFILER_H_
15
16#include <string>
17#include <vector>
18#include "common/config.h"
19
20class LogClient;
21
22/*
23 * Ceph glue for the Google perftools heap profiler, included
24 * as part of tcmalloc. This replaces ugly function pointers
25 * and #ifdef hacks!
26 */
27bool ceph_using_tcmalloc();
28
29/*
30 * Configure the heap profiler
31 */
32void ceph_heap_profiler_init();
33
34void ceph_heap_profiler_stats(char *buf, int length);
35
36void ceph_heap_release_free_memory();
37
11fdf7f2
TL
38double ceph_heap_get_release_rate();
39
40void ceph_heap_get_release_rate(double value);
41
7c673cae
FG
42bool ceph_heap_profiler_running();
43
44void ceph_heap_profiler_start();
45
46void ceph_heap_profiler_stop();
47
48void ceph_heap_profiler_dump(const char *reason);
49
50bool ceph_heap_get_numeric_property(const char *property, size_t *value);
51
52bool ceph_heap_set_numeric_property(const char *property, size_t value);
53
54void ceph_heap_profiler_handle_command(const std::vector<std::string> &cmd,
55 ostream& out);
56
57#endif /* HEAP_PROFILER_H_ */