aboutsummaryrefslogtreecommitdiffstats
path: root/vm_backtrace.c
diff options
context:
space:
mode:
authornormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-05-09 05:06:41 +0000
committernormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-05-09 05:06:41 +0000
commitc2a5df6905c9b9afde2c2611a20128220bf1372a (patch)
treee22cadfa88ec235f9630197c0c3a56ce6cbe4850 /vm_backtrace.c
parent5591fbbe4ef5a3903a96eb3f02d49a0a13ef6017 (diff)
downloadruby-c2a5df6905c9b9afde2c2611a20128220bf1372a.tar.gz
rb_execution_context_t: move stack, stack_size and cfp from rb_thread_t
The goal is to reduce rb_context_t and rb_fiber_t size by removing the need to store the entire rb_thread_t in there. [ruby-core:81045] Work-in-progress: soon, we will move more fields here. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58614 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_backtrace.c')
-rw-r--r--vm_backtrace.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/vm_backtrace.c b/vm_backtrace.c
index a5ab52e349..5c1cca5aef 100644
--- a/vm_backtrace.c
+++ b/vm_backtrace.c
@@ -427,7 +427,7 @@ backtrace_each(rb_thread_t *th,
void (*iter_cfunc)(void *arg, const rb_control_frame_t *cfp, ID mid),
void *arg)
{
- rb_control_frame_t *last_cfp = th->cfp;
+ rb_control_frame_t *last_cfp = th->ec.cfp;
rb_control_frame_t *start_cfp = RUBY_VM_END_CONTROL_FRAME(th);
rb_control_frame_t *cfp;
ptrdiff_t size, i;
@@ -439,7 +439,7 @@ backtrace_each(rb_thread_t *th,
* top frame
* ...
* 2nd frame <- lev:0
- * current frame <- th->cfp
+ * current frame <- th->ec.cfp
*/
start_cfp =
@@ -1178,7 +1178,7 @@ rb_debug_inspector_open(rb_debug_inspector_func_t func, void *data)
volatile VALUE MAYBE_UNUSED(result);
dbg_context.th = th;
- dbg_context.cfp = dbg_context.th->cfp;
+ dbg_context.cfp = dbg_context.th->ec.cfp;
dbg_context.backtrace = rb_threadptr_backtrace_location_ary(th, 0, 0);
dbg_context.backtrace_size = RARRAY_LEN(dbg_context.backtrace);
dbg_context.contexts = collect_caller_bindings(th);
@@ -1248,7 +1248,7 @@ rb_profile_frames(int start, int limit, VALUE *buff, int *lines)
{
int i;
rb_thread_t *th = GET_THREAD();
- rb_control_frame_t *cfp = th->cfp, *end_cfp = RUBY_VM_END_CONTROL_FRAME(th);
+ rb_control_frame_t *cfp = th->ec.cfp, *end_cfp = RUBY_VM_END_CONTROL_FRAME(th);
const rb_callable_method_entry_t *cme;
for (i=0; i<limit && cfp != end_cfp;) {