summaryrefslogtreecommitdiff
path: root/include/ruby/debug.h
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-10-07 07:21:11 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-10-07 07:21:11 +0000
commit774bff0adb44eaf5c806afb1bf9eff65d26b2f1f (patch)
treece65433d0c9fff8d7c1003478966ada7344c0cb4 /include/ruby/debug.h
parent6531e12e0beaf5e730592d7cd1bb9eab96140433 (diff)
* include/ruby/debug.h: add backtrace collecting APIs for profiler.
* int rb_profile_frames(int start, int limit, VALUE *buff, int *lines); Collect information of frame information. * VALUE rb_profile_frame_path(VALUE frame); * VALUE rb_profile_frame_absolute_path(VALUE frame); * VALUE rb_profile_frame_label(VALUE frame); * VALUE rb_profile_frame_base_label(VALUE frame); * VALUE rb_profile_frame_first_lineno(VALUE frame); * VALUE rb_profile_frame_classpath(VALUE frame); * VALUE rb_profile_frame_singleton_method_p(VALUE frame); Get information about each frame. These APIs are designed for profilers, for example, no objectallocation, and enough information for profilers. In this version, this API collects only collect Ruby level frames. This issue will be fixed after Ruby 2.1. * vm_backtrace.c: implement above APIs. * iseq.c (rb_iseq_klass): return local_iseq's class. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43170 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'include/ruby/debug.h')
-rw-r--r--include/ruby/debug.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/ruby/debug.h b/include/ruby/debug.h
index dca0f10..2ef99d4 100644
--- a/include/ruby/debug.h
+++ b/include/ruby/debug.h
@@ -24,6 +24,17 @@ RUBY_SYMBOL_EXPORT_BEGIN
/* Note: This file contains experimental APIs. */
/* APIs can be replaced at Ruby 2.0.1 or later */
+
+/* profile frames APIs */
+int rb_profile_frames(int start, int limit, VALUE *buff, int *lines);
+VALUE rb_profile_frame_path(VALUE frame);
+VALUE rb_profile_frame_absolute_path(VALUE frame);
+VALUE rb_profile_frame_label(VALUE frame);
+VALUE rb_profile_frame_base_label(VALUE frame);
+VALUE rb_profile_frame_first_lineno(VALUE frame);
+VALUE rb_profile_frame_classpath(VALUE frame);
+VALUE rb_profile_frame_singleton_method_p(VALUE frame);
+
/* debug inspector APIs */
typedef struct rb_debug_inspector_struct rb_debug_inspector_t;
typedef VALUE (*rb_debug_inspector_func_t)(const rb_debug_inspector_t *, void *);