15 #ifndef IMPALA_UTIL_MEM_METRICS_H
16 #define IMPALA_UTIL_MEM_METRICS_H
20 #include <boost/thread/mutex.hpp>
21 #include <boost/bind.hpp>
22 #include <google/malloc_extension.h>
25 #include "gen-cpp/Frontend_types.h"
76 MallocExtension::instance()->GetNumericProperty(
tcmalloc_var_.c_str(), &value_);
JvmMetric(const std::string &key, const std::string &mempool_name, JvmMetricType type)
Private constructor to ensure only InitMetrics() can create JvmMetrics.
PhysicalBytesMetric(const std::string &key)
const std::string tcmalloc_var_
Name of the tcmalloc property this metric should fetch.
Status RegisterMemoryMetrics(MetricGroup *metrics, bool register_jvm_metrics)
MetricGroups may be organised hierarchically as a tree.
static TcmallocMetric * PAGEHEAP_UNMAPPED_BYTES
JvmMetricType metric_type_
static PhysicalBytesMetric * PHYSICAL_BYTES_RESERVED
static Status InitMetrics(MetricGroup *metrics)
static TcmallocMetric * PAGEHEAP_FREE_BYTES
virtual void CalculateValue()
TcmallocMetric(const std::string &key, const std::string &tcmalloc_var)
virtual void CalculateValue()
std::string mempool_name_
The name of the memory pool, defined by the Jvm.
virtual void CalculateValue()
Specialised metric which exposes numeric properties from tcmalloc.
static TcmallocMetric * TOTAL_BYTES_RESERVED
static TcmallocMetric * BYTES_IN_USE
Number of bytes allocated by tcmalloc, currently used by the application.
JvmMetricType
Each names one of the fields in TJvmMemoryPool.