summaryrefslogtreecommitdiffstats
path: root/libglusterfs/src/stack.h
diff options
context:
space:
mode:
authorAmar Tumballi <amar@gluster.com>2010-09-24 10:14:23 +0000
committerVijay Bellur <vijay@dev.gluster.com>2010-09-24 11:25:55 -0700
commit96846cb2aaac582323a5f7347581dad2f5f2cd31 (patch)
tree6a449308f543950feb902a458dd82fab341b5540 /libglusterfs/src/stack.h
parent25e868b571bc394dd65b54849f369e1a0c29caab (diff)
stack.h: remove the time/latency measurement code
Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 1701 (better statistics gathering in glusterd) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1701
Diffstat (limited to 'libglusterfs/src/stack.h')
-rw-r--r--libglusterfs/src/stack.h37
1 files changed, 0 insertions, 37 deletions
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;
}