From 7d21da4cef50bc43d3b3cfca54d6c9a03ed645a8 Mon Sep 17 00:00:00 2001 From: Amar Tumballi Date: Thu, 2 Aug 2012 00:34:52 +0530 Subject: supportability: print all missing frames earlier, the statedump and backtrace were printing frames only if it matched type GF_FOPs or GF_MGMTs (GF_MGMT is not in use now). This made all the frames from glusterd, or any other frames which got created outside the scope of 'fops' not getting printed. now, made two classifications, one as FOPs (which gets logged with the proper name), and another set is !FOPs (ie, else part), which gets logged with only the op number. Change-Id: Ifa18cdb75f7afefe6bb489d319b589cda8e64c1d Signed-off-by: Amar Tumballi BUG: 845114 Reviewed-on: http://review.gluster.com/3768 Reviewed-by: Raghavendra Bhat Reviewed-by: Anand Avati Tested-by: Gluster Build System --- libglusterfs/src/common-utils.c | 6 +++--- libglusterfs/src/stack.c | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) (limited to 'libglusterfs') diff --git a/libglusterfs/src/common-utils.c b/libglusterfs/src/common-utils.c index 3d668f9c..74f38d01 100644 --- a/libglusterfs/src/common-utils.c +++ b/libglusterfs/src/common-utils.c @@ -417,10 +417,10 @@ gf_print_trace (int32_t signum, glusterfs_ctx_t *ctx) sprintf (msg,"frame : type(%d) op(%s)\n", tmp->root->type, gf_fop_list[tmp->root->op]); - if (tmp->root->type == GF_OP_TYPE_MGMT) - sprintf (msg,"frame : type(%d) op(%s)\n", + else + sprintf (msg,"frame : type(%d) op(%d)\n", tmp->root->type, - gf_mgmt_list[tmp->root->op]); + tmp->root->op); ret = write (fd, msg, strlen (msg)); if (ret < 0) diff --git a/libglusterfs/src/stack.c b/libglusterfs/src/stack.c index f922be83..1579e097 100644 --- a/libglusterfs/src/stack.c +++ b/libglusterfs/src/stack.c @@ -104,8 +104,8 @@ gf_proc_dump_call_stack (call_stack_t *call_stack, const char *key_buf,...) if (call_stack->type == GF_OP_TYPE_FOP) gf_proc_dump_write("op", "%s", gf_fop_list[call_stack->op]); - else if (call_stack->type == GF_OP_TYPE_MGMT) - gf_proc_dump_write("op", "%s", gf_mgmt_list[call_stack->op]); + else + gf_proc_dump_write("op", "stack"); gf_proc_dump_write("type", "%d", call_stack->type); gf_proc_dump_write("cnt", "%d", cnt); @@ -278,9 +278,9 @@ gf_proc_dump_call_stack_to_dict (call_stack_t *call_stack, if (call_stack->type == GF_OP_TYPE_FOP) ret = dict_set_str (dict, key, gf_fop_list[call_stack->op]); - else if (call_stack->type == GF_OP_TYPE_MGMT) - ret = dict_set_str (dict, key, - gf_mgmt_list[call_stack->op]); + else + ret = dict_set_str (dict, key, "other"); + if (ret) return; -- cgit