From 96846cb2aaac582323a5f7347581dad2f5f2cd31 Mon Sep 17 00:00:00 2001 From: Amar Tumballi Date: Fri, 24 Sep 2010 10:14:23 +0000 Subject: stack.h: remove the time/latency measurement code Signed-off-by: Amar Tumballi Signed-off-by: Vijay Bellur BUG: 1701 (better statistics gathering in glusterd) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1701 --- libglusterfs/src/stack.h | 37 ------------------------------------- 1 file changed, 37 deletions(-) (limited to 'libglusterfs') diff --git a/libglusterfs/src/stack.h b/libglusterfs/src/stack.h index 55bcecc4b80..fa2a7b3fcbe 100644 --- a/libglusterfs/src/stack.h +++ b/libglusterfs/src/stack.h @@ -153,14 +153,8 @@ FRAME_DESTROY (call_frame_t *frame) static inline void STACK_DESTROY (call_stack_t *stack) { - glusterfs_ctx_t *ctx = glusterfs_ctx_get (); void *local = NULL; - if (ctx && ctx->measure_latency) { - gettimeofday (&stack->frames.end, NULL); - gf_update_latency (&stack->frames); - } - LOCK (&stack->pool->lock); { list_del_init (&stack->all_frames); @@ -176,10 +170,6 @@ STACK_DESTROY (call_stack_t *stack) LOCK_DESTROY (&stack->frames.lock); while (stack->frames.next) { - if (ctx && ctx->measure_latency) { - gf_update_latency (stack->frames.next); - } - FRAME_DESTROY (stack->frames.next); } mem_put (stack->pool->stack_mem_pool, stack); @@ -216,12 +206,6 @@ STACK_DESTROY (call_stack_t *stack) _new->cookie = _new; \ LOCK_INIT (&_new->lock); \ frame->ref_count++; \ - \ - if (((xlator_t *) obj)->ctx->measure_latency) { \ - gettimeofday (&_new->begin, NULL); \ - gf_set_fop_from_fn_pointer (_new, ((xlator_t *)obj)->fops, fn); \ - } \ - \ old_THIS = THIS; \ THIS = obj; \ fn (_new, obj, params); \ @@ -254,12 +238,6 @@ STACK_DESTROY (call_stack_t *stack) LOCK_INIT (&_new->lock); \ frame->ref_count++; \ fn##_cbk = rfn; \ - \ - if (((xlator_t *) obj)->ctx->measure_latency) { \ - gettimeofday (&_new->begin, NULL); \ - gf_set_fop_from_fn_pointer (_new, ((xlator_t *)obj)->fops, fn); \ - } \ - \ old_THIS = THIS; \ THIS = obj; \ fn (_new, obj, params); \ @@ -283,11 +261,6 @@ STACK_DESTROY (call_stack_t *stack) old_THIS = THIS; \ THIS = _parent->this; \ frame->complete = _gf_true; \ - \ - if (((xlator_t *) old_THIS)->ctx->measure_latency) { \ - gettimeofday (&frame->end, NULL); \ - } \ - \ fn (_parent, frame->cookie, _parent->this, params); \ THIS = old_THIS; \ } while (0) @@ -310,11 +283,6 @@ STACK_DESTROY (call_stack_t *stack) old_THIS = THIS; \ THIS = _parent->this; \ frame->complete = _gf_true; \ - \ - if (((xlator_t *) old_THIS)->ctx->measure_latency) { \ - gettimeofday (&frame->end, NULL); \ - } \ - \ fn (_parent, frame->cookie, _parent->this, params); \ THIS = old_THIS; \ } while (0) @@ -367,7 +335,6 @@ static inline call_frame_t * create_frame (xlator_t *xl, call_pool_t *pool) { call_stack_t *stack = NULL; - glusterfs_ctx_t *ctx = glusterfs_ctx_get (); if (!xl || !pool) { return NULL; @@ -390,10 +357,6 @@ create_frame (xlator_t *xl, call_pool_t *pool) LOCK_INIT (&stack->frames.lock); - if (ctx && ctx->measure_latency) { - gettimeofday (&stack->frames.begin, NULL); - } - return &stack->frames; } -- cgit