File tree 6 files changed +21
-10
lines changed
6 files changed +21
-10
lines changed Original file line number Diff line number Diff line change @@ -39,7 +39,6 @@ notifications:
39
39
on_start : always
40
40
env :
41
41
global :
42
- - RBXOPT=-Xint
43
42
- LANG="en_US.UTF-8"
44
43
- secure : olbok/GN6rOYvPnHBYWGz7giCoCdLFpT/7WSBHukYO3E0uNeqAUOOgW2BFOwCVWdSEJ/iTvJXZQ4qVZHX+6jRfvILZeGv+D2P93VdD8UFQRoTOfFC7esAo525s9fuKm9ehUGWZxlzGOBHHckky1jn6pEf8mlXAVM5e76dlH0fck=
45
44
- secure : aqG9eB/PrzQ7XJQN6YX/00sNVvwSB77saxXQzguL2WFjAXB74h6168Hzq+awHtNX/vfOb6ta7fpWLHrA0D+gmZnvTR29VlP6nd0vs1tkdX1/jWbiBHjamRffp+NWVdKbJKYn5iLOGXcuUMOzY/opLKOdvxKZfkxGMxR2tTNLZUE=
Original file line number Diff line number Diff line change 145
145
"Lock around using CAPI methods"
146
146
end
147
147
148
- c . vm_variable "int" , false ,
148
+ c . vm_variable "int" , true ,
149
149
:as => "jit_disabled" ,
150
150
:description => "Force the JIT to never turn on"
151
151
Original file line number Diff line number Diff line change 9
9
#include " builtin/native_method.hpp"
10
10
#include " builtin/string.hpp"
11
11
12
+ #include " instruments/timing.hpp"
13
+
12
14
namespace rubinius {
13
15
void Location::bootstrap (STATE) {
14
16
GO (location).set (state->memory ()->new_class <Class, Location>(
@@ -129,6 +131,10 @@ namespace rubinius {
129
131
Array* Location::from_call_stack (STATE, ssize_t up) {
130
132
if (up < 0 ) rubinius::bug (" negative skip frame value provided" );
131
133
134
+ timer::StopWatch<timer::microseconds> timer (
135
+ state->vm ()->metrics ().machine .backtrace_us );
136
+ state->vm ()->metrics ().machine .backtraces ++;
137
+
132
138
CallFrame* base = state->vm ()->call_frame ();
133
139
CallFrame* start = base;
134
140
size_t count = 0 ;
@@ -160,6 +166,10 @@ namespace rubinius {
160
166
Array* Location::mri_backtrace (STATE, ssize_t up) {
161
167
if (up < 0 ) rubinius::bug (" negative skip frame value provided" );
162
168
169
+ timer::StopWatch<timer::microseconds> timer (
170
+ state->vm ()->metrics ().machine .backtrace_us );
171
+ state->vm ()->metrics ().machine .backtraces ++;
172
+
163
173
CallFrame* base = state->vm ()->call_frame ();
164
174
CallFrame* start = base;
165
175
size_t count = 0 ;
Original file line number Diff line number Diff line change @@ -352,6 +352,10 @@ namespace rubinius {
352
352
" machine.checkpoints" , metrics_data_.machine .checkpoints ));
353
353
metrics_map_.push_back (new MetricsItem (
354
354
" machine.inline_cache.resets" , metrics_data_.machine .inline_cache_resets ));
355
+ metrics_map_.push_back (new MetricsItem (
356
+ " machine.backtraces" , metrics_data_.machine .backtraces ));
357
+ metrics_map_.push_back (new MetricsItem (
358
+ " machine.backtrace.us" , metrics_data_.machine .backtrace_us ));
355
359
metrics_map_.push_back (new MetricsItem (
356
360
" machine.methods.invoked" , metrics_data_.machine .methods_invoked ));
357
361
metrics_map_.push_back (new MetricsItem (
Original file line number Diff line number Diff line change @@ -160,13 +160,17 @@ namespace rubinius {
160
160
metric checkpoints;
161
161
metric stops;
162
162
metric inline_cache_resets;
163
+ metric backtraces;
164
+ metric backtrace_us;
163
165
metric methods_invoked;
164
166
metric blocks_invoked;
165
167
166
168
MachineMetrics () {
167
169
checkpoints = 0 ;
168
170
stops = 0 ;
169
171
inline_cache_resets = 0 ;
172
+ backtraces = 0 ;
173
+ backtrace_us = 0 ;
170
174
methods_invoked = 0 ;
171
175
blocks_invoked = 0 ;
172
176
}
@@ -175,6 +179,8 @@ namespace rubinius {
175
179
checkpoints += data.checkpoints ;
176
180
stops += data.stops ;
177
181
inline_cache_resets += data.inline_cache_resets ;
182
+ backtraces += data.backtraces ;
183
+ backtrace_us += data.backtrace_us ;
178
184
methods_invoked += data.methods_invoked ;
179
185
blocks_invoked += data.blocks_invoked ;
180
186
}
Original file line number Diff line number Diff line change @@ -123,8 +123,6 @@ namespace rubinius {
123
123
}
124
124
125
125
CallFrame* VM::get_call_frame (ssize_t up) {
126
- if (up < 0 ) rubinius::bug (" negative skip frame value provided" );
127
-
128
126
CallFrame* frame = call_frame_;
129
127
130
128
while (frame && up-- > 0 ) {
@@ -135,8 +133,6 @@ namespace rubinius {
135
133
}
136
134
137
135
CallFrame* VM::get_ruby_frame (ssize_t up) {
138
- if (up < 0 ) rubinius::bug (" negative skip frame value provided" );
139
-
140
136
CallFrame* frame = call_frame_;
141
137
142
138
while (frame && up-- > 0 ) {
@@ -152,8 +148,6 @@ namespace rubinius {
152
148
}
153
149
154
150
CallFrame* VM::get_variables_frame (ssize_t up) {
155
- if (up < 0 ) rubinius::bug (" negative skip frame value provided" );
156
-
157
151
CallFrame* frame = call_frame_;
158
152
159
153
while (frame && up-- > 0 ) {
@@ -175,8 +169,6 @@ namespace rubinius {
175
169
}
176
170
177
171
CallFrame* VM::get_scope_frame (ssize_t up) {
178
- if (up < 0 ) rubinius::bug (" negative skip frame value provided" );
179
-
180
172
CallFrame* frame = call_frame_;
181
173
182
174
while (frame && up-- > 0 ) {
You can’t perform that action at this time.
0 commit comments