diff options
author | Amar Tumballi <amarts@redhat.com> | 2012-08-02 00:34:52 +0530 |
---|---|---|
committer | Anand Avati <avati@redhat.com> | 2012-08-01 14:35:10 -0700 |
commit | 7d21da4cef50bc43d3b3cfca54d6c9a03ed645a8 (patch) | |
tree | 15f84d1c0aa28f07ada4ad3fcefafe87434b3680 /libglusterfs/src | |
parent | 7004dd1d50dc24910832c549af3808c83c63c671 (diff) |
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 <amarts@redhat.com>
BUG: 845114
Reviewed-on: http://review.gluster.com/3768
Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com>
Reviewed-by: Anand Avati <avati@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Diffstat (limited to 'libglusterfs/src')
-rw-r--r-- | libglusterfs/src/common-utils.c | 6 | ||||
-rw-r--r-- | libglusterfs/src/stack.c | 10 |
2 files changed, 8 insertions, 8 deletions
diff --git a/libglusterfs/src/common-utils.c b/libglusterfs/src/common-utils.c index 3d668f9cf9b..74f38d01ea9 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 f922be83c7f..1579e097457 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; |