]> git.proxmox.com Git - ceph.git/blame - ceph/src/msg/xio/XioPool.cc
update sources to v12.1.1
[ceph.git] / ceph / src / msg / xio / XioPool.cc
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) 2014 CohortFS, LLC
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 */
14
15#include <iostream>
16#include "XioPool.h"
17
18XioPoolStats xp_stats;
19
20bool XioPool::trace_mempool = 0;
21bool XioPool::trace_msgcnt = 0;
22
23void XioPoolStats::dump(const char* tag, uint64_t serial)
24{
25 std::cout
26 << tag << " #" << serial << ": "
27 << "pool objs: "
28 << "64: " << ctr_set[SLAB_64].read() << " "
29 << "256: " << ctr_set[SLAB_256].read() << " "
30 << "1024: " << ctr_set[SLAB_1024].read() << " "
31 << "page: " << ctr_set[SLAB_PAGE].read() << " "
32 << "max: " << ctr_set[SLAB_MAX].read() << " "
33 << "overflow: " << ctr_set[SLAB_OVERFLOW].read() << " "
34 << std::endl;
35 std::cout
36 << tag << " #" << serial << ": "
37 << " msg objs: "
38 << "in: " << hook_cnt.read() << " "
39 << "out: " << msg_cnt.read() << " "
40 << std::endl;
41}