From 136642da381cfe3eeed94fcdf23bccc30ea454d2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Piotr=20Da=C5=82ek?= Date: Fri, 23 Feb 2018 14:08:25 +0100 Subject: [PATCH] common/OpTracker: reorder fields MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Reorder smaller fields around so they're aligning naturally, regaining a few bytes of storage. Signed-off-by: Piotr Dałek --- src/common/TrackedOp.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/common/TrackedOp.h b/src/common/TrackedOp.h index 5c157a01cea9..511bb508a89d 100644 --- a/src/common/TrackedOp.h +++ b/src/common/TrackedOp.h @@ -29,9 +29,9 @@ typedef boost::intrusive_ptr TrackedOpRef; class OpHistoryServiceThread : public Thread { private: + list> _external_queue; OpHistory* _ophistory; mutable ceph::spinlock queue_spinlock; - list> _external_queue; bool _break_thread; public: explicit OpHistoryServiceThread(OpHistory* parent) @@ -54,20 +54,20 @@ class OpHistory { set > duration; set > slow_op; Mutex ops_history_lock; - std::atomic_bool shutdown; void cleanup(utime_t now); uint32_t history_size; uint32_t history_duration; uint32_t history_slow_op_size; uint32_t history_slow_op_threshold; + std::atomic_bool shutdown; OpHistoryServiceThread opsvc; friend class OpHistoryServiceThread; public: - OpHistory() : ops_history_lock("OpHistory::Lock"), shutdown(false), + OpHistory() : ops_history_lock("OpHistory::Lock"), history_size(0), history_duration(0), history_slow_op_size(0), history_slow_op_threshold(0), - opsvc(this) { + shutdown(false), opsvc(this) { opsvc.create("OpHistorySvc"); } ~OpHistory() { @@ -103,8 +103,8 @@ class OpTracker { friend class OpHistory; std::atomic seq = { 0 }; vector sharded_in_flight_list; - uint32_t num_optracker_shards; OpHistory history; + uint32_t num_optracker_shards; float complaint_time; int log_threshold; std::atomic tracking_enabled; -- 2.47.3