diff options
author | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-09-25 18:13:29 +0000 |
---|---|---|
committer | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-09-25 18:13:29 +0000 |
commit | cdc614cd0a21b2e72d953438438c78bafdfd9f80 (patch) | |
tree | b1e470a5deb7ab926c465b5814e03f338761efcf /signal.c | |
parent | 989fc2de9afccb14865735346bbfa3b3325de84c (diff) |
refactoring debug_counter.
* debug_counter.h: add comments for each counters.
* debug_counter.h: add some counters (see added comments for details).
* obj_newobj
* obj_newobj_slowpath
* obj_newobj_wb_unprotected
* obj_hash_empty
* obj_hash_under4
* obj_hash_ge4
* obj_hash_ge8
* heap_xmalloc
* heap_xrealloc
* heap_xfree
* gc.c: add some debug counters (see the above list).
* debug_counter.c (rb_debug_counter_show_results): accept
a header message.
* signal.c (ruby_default_signal): show debug counter results
and malloc info (rb_malloc_info_show_results()) before
SIGNAL exit.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64841 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'signal.c')
-rw-r--r-- | signal.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -395,9 +395,17 @@ interrupt_init(int argc, VALUE *argv, VALUE self) return rb_call_super(2, args); } +#include "debug_counter.h" +void rb_malloc_info_show_results(void); /* gc.c */ + void ruby_default_signal(int sig) { +#if USE_DEBUG_COUNTER + rb_debug_counter_show_results("killed by signal."); +#endif + rb_malloc_info_show_results(); + signal(sig, SIG_DFL); raise(sig); } |