_dump_op_descriptor_unlocked call within the function _mark_event()
was invoked unnecessarily every time for all log levels. This was
degrading performance significantly! The stream is only used during
log level 5 and thus the _dump_op_descriptor_unlocked() is only called
now if user sets the log level to 5 and beyond.
Signed-off-by: Somnath Roy <somnath.roy@sandisk.com>
void OpTracker::_mark_event(TrackedOp *op, const string &evt,
utime_t time)
{
- stringstream ss;
- op->_dump_op_descriptor_unlocked(ss);
- dout(5) << //"reqid: " << op->get_reqid() <<
- ", seq: " << op->seq
+ dout(5);
+ *_dout << "seq: " << op->seq
<< ", time: " << time << ", event: " << evt
- << ", op: " << ss.str() << dendl;
+ << ", op: ";
+ op->_dump_op_descriptor_unlocked(*_dout);
+ *_dout << dendl;
+
}
void OpTracker::RemoveOnDelete::operator()(TrackedOp *op) {