summaryrefslogtreecommitdiffstats
path: root/monitor.c
diff options
context:
space:
mode:
authorMateusz Kusiak <mateusz.kusiak@intel.com>2024-11-20 18:20:32 +0100
committerMariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>2024-11-22 09:00:32 +0100
commit655012434b7c059811a5f26001e47dd418f20a36 (patch)
treea5c604c67227b5a65d03b683aff40e04e864eeb1 /monitor.c
parentCI: assign ret to numeric value (diff)
downloadmdadm-655012434b7c059811a5f26001e47dd418f20a36.tar.xz
mdadm-655012434b7c059811a5f26001e47dd418f20a36.zip
debug: add timestamps for debug messages
Timestamps on debug messages help establish what takes long to process. Debug messages are print only if DDEBUG flag is passed. Add timestamps for debug messages. Remove dead code from dprintf dummies for non-debug builds. Remove timestamps from current debug messages. Signed-off-by: Mateusz Kusiak <mateusz.kusiak@intel.com>
Diffstat (limited to 'monitor.c')
-rw-r--r--monitor.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/monitor.c b/monitor.c
index 81ae8893..3c54f8cb 100644
--- a/monitor.c
+++ b/monitor.c
@@ -406,7 +406,6 @@ static int read_and_act(struct active_array *a)
struct mdinfo *mdi;
int ret = 0;
int count = 0;
- struct timeval tv;
bool write_checkpoint = false;
a->next_state = bad_word;
@@ -453,10 +452,8 @@ static int read_and_act(struct active_array *a)
check_for_cleared_bb(a, mdi);
}
- gettimeofday(&tv, NULL);
- dprintf("(%d): %ld.%06ld state:%s prev:%s action:%s prev: %s start:%llu\n",
+ dprintf("(%d): state:%s prev:%s action:%s prev: %s start:%llu\n",
a->info.container_member,
- tv.tv_sec, tv.tv_usec,
array_states[a->curr_state],
array_states[a->prev_state],
sync_actions[a->curr_action],