100*_1G,
1000*_1G};
+#ifdef BLUESTORE_COMMON_CPUTRACE
+cpucounter_group BlueStore::cputrace_bluestore("bluestore");
+#endif
/*
* extent map blob encoding
*
ceph_assert((size_t)start < shards.size());
auto p = &shards[start];
if (!p->loaded) {
+ BLUE_SCOPE(maybe_load_shard);
dout(30) << __func__ << " opening shard 0x" << std::hex
<< p->shard_info->offset << std::dec << dendl;
bufferlist v;
c->get_onode_cache()->maybe_unpin(this);
}
if (--nref == 0) {
+ BLUE_SCOPE(onode_put);
delete this;
}
}
OnodeRef o = onode_space.lookup(oid);
if (o)
return o;
-
+ BLUE_SCOPE(get_onode);
string key;
get_object_key(store->cct, oid, &key);
void BlueStore::_txc_state_proc(TransContext *txc)
{
+ BLUE_SCOPE(txc_state_proc);
while (true) {
dout(10) << __func__ << " txc " << txc
<< " " << txc->get_state_name() << dendl;
void BlueStore::_txc_write_nodes(TransContext *txc, KeyValueDB::Transaction t)
{
+ BLUE_SCOPE(txc_write_nodes);
dout(20) << __func__ << " txc " << txc
<< " onodes " << txc->onodes
<< " shared_blobs " << txc->shared_blobs
void BlueStore::_txc_finalize_kv(TransContext *txc, KeyValueDB::Transaction t)
{
+ BLUE_SCOPE(txc_finalize_kv);
dout(20) << __func__ << " txc " << txc << std::hex
<< " allocated 0x" << txc->allocated
<< " released 0x" << txc->released
bdev->aio_submit(&txc->ioc);
}
+
void BlueStore::_txc_add_transaction(TransContext *txc, Transaction *t)
{
+ BLUE_SCOPE(txc_add_transaction);
Transaction::iterator i = t->begin();
_dump_transaction<30>(cct, t);
#include "BlueFS.h"
#include "common/EventTrace.h"
#include "common/admin_socket.h"
+#ifdef WITH_CPUTRACE
+#include "common/cputrace.h"
+#endif
#ifdef WITH_BLKIN
#include "common/zipkin_trace.h"
class SimpleBitmap;
//#define DEBUG_CACHE
//#define DEBUG_DEFERRED
-
+#ifdef WITH_CPUTRACE
+//change to #define to enable
+#undef BLUESTORE_COMMON_CPUTRACE
+#endif
// constants for Buffer::optimize()
#define MAX_BUFFER_SLOP_RATIO_DEN 8 // so actually 1/N
#define CEPH_BLUESTORE_TOOL_RESTORE_ALLOCATION
const std::vector<std::string>& devs,
std::vector<uint64_t>* valid_positions,
bool force);
+
+#ifdef BLUESTORE_COMMON_CPUTRACE
+ static cpucounter_group cputrace_bluestore;
+#define BLUE_SCOPE(y) MEASURE_SCOPE(cputrace_bluestore, y)
+#else //BLUESTORE_COMMON_CPUTRACE
+#define BLUE_SCOPE(y)
+#endif //BLUESTORE_COMMON_CPUTRACE
};
inline std::ostream& operator<<(std::ostream& out, const BlueStore::volatile_statfs& s) {