Skip to content

Commit ae70c8f

Browse files
committedMar 25, 2016
Merge remote-tracking branch 'origin' into codedb-ffi-io
2 parents cf86e0f + 636abb1 commit ae70c8f

File tree

6 files changed

+21
-10
lines changed

6 files changed

+21
-10
lines changed
 

Diff for: ‎.travis.yml

-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ notifications:
3939
on_start: always
4040
env:
4141
global:
42-
- RBXOPT=-Xint
4342
- LANG="en_US.UTF-8"
4443
- secure: olbok/GN6rOYvPnHBYWGz7giCoCdLFpT/7WSBHukYO3E0uNeqAUOOgW2BFOwCVWdSEJ/iTvJXZQ4qVZHX+6jRfvILZeGv+D2P93VdD8UFQRoTOfFC7esAo525s9fuKm9ehUGWZxlzGOBHHckky1jn6pEf8mlXAVM5e76dlH0fck=
4544
- secure: aqG9eB/PrzQ7XJQN6YX/00sNVvwSB77saxXQzguL2WFjAXB74h6168Hzq+awHtNX/vfOb6ta7fpWLHrA0D+gmZnvTR29VlP6nd0vs1tkdX1/jWbiBHjamRffp+NWVdKbJKYn5iLOGXcuUMOzY/opLKOdvxKZfkxGMxR2tTNLZUE=

Diff for: ‎library/rubinius/configuration.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@
145145
"Lock around using CAPI methods"
146146
end
147147

148-
c.vm_variable "int", false,
148+
c.vm_variable "int", true,
149149
:as => "jit_disabled",
150150
:description => "Force the JIT to never turn on"
151151

Diff for: ‎machine/builtin/location.cpp

+10
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
#include "builtin/native_method.hpp"
1010
#include "builtin/string.hpp"
1111

12+
#include "instruments/timing.hpp"
13+
1214
namespace rubinius {
1315
void Location::bootstrap(STATE) {
1416
GO(location).set(state->memory()->new_class<Class, Location>(
@@ -129,6 +131,10 @@ namespace rubinius {
129131
Array* Location::from_call_stack(STATE, ssize_t up) {
130132
if(up < 0) rubinius::bug("negative skip frame value provided");
131133

134+
timer::StopWatch<timer::microseconds> timer(
135+
state->vm()->metrics().machine.backtrace_us);
136+
state->vm()->metrics().machine.backtraces++;
137+
132138
CallFrame* base = state->vm()->call_frame();
133139
CallFrame* start = base;
134140
size_t count = 0;
@@ -160,6 +166,10 @@ namespace rubinius {
160166
Array* Location::mri_backtrace(STATE, ssize_t up) {
161167
if(up < 0) rubinius::bug("negative skip frame value provided");
162168

169+
timer::StopWatch<timer::microseconds> timer(
170+
state->vm()->metrics().machine.backtrace_us);
171+
state->vm()->metrics().machine.backtraces++;
172+
163173
CallFrame* base = state->vm()->call_frame();
164174
CallFrame* start = base;
165175
size_t count = 0;

Diff for: ‎machine/metrics.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -352,6 +352,10 @@ namespace rubinius {
352352
"machine.checkpoints", metrics_data_.machine.checkpoints));
353353
metrics_map_.push_back(new MetricsItem(
354354
"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));
355359
metrics_map_.push_back(new MetricsItem(
356360
"machine.methods.invoked", metrics_data_.machine.methods_invoked));
357361
metrics_map_.push_back(new MetricsItem(

Diff for: ‎machine/metrics.hpp

+6
Original file line numberDiff line numberDiff line change
@@ -160,13 +160,17 @@ namespace rubinius {
160160
metric checkpoints;
161161
metric stops;
162162
metric inline_cache_resets;
163+
metric backtraces;
164+
metric backtrace_us;
163165
metric methods_invoked;
164166
metric blocks_invoked;
165167

166168
MachineMetrics() {
167169
checkpoints = 0;
168170
stops = 0;
169171
inline_cache_resets = 0;
172+
backtraces = 0;
173+
backtrace_us = 0;
170174
methods_invoked = 0;
171175
blocks_invoked = 0;
172176
}
@@ -175,6 +179,8 @@ namespace rubinius {
175179
checkpoints += data.checkpoints;
176180
stops += data.stops;
177181
inline_cache_resets += data.inline_cache_resets;
182+
backtraces += data.backtraces;
183+
backtrace_us += data.backtrace_us;
178184
methods_invoked += data.methods_invoked;
179185
blocks_invoked += data.blocks_invoked;
180186
}

Diff for: ‎machine/vm.cpp

-8
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,6 @@ namespace rubinius {
123123
}
124124

125125
CallFrame* VM::get_call_frame(ssize_t up) {
126-
if(up < 0) rubinius::bug("negative skip frame value provided");
127-
128126
CallFrame* frame = call_frame_;
129127

130128
while(frame && up-- > 0) {
@@ -135,8 +133,6 @@ namespace rubinius {
135133
}
136134

137135
CallFrame* VM::get_ruby_frame(ssize_t up) {
138-
if(up < 0) rubinius::bug("negative skip frame value provided");
139-
140136
CallFrame* frame = call_frame_;
141137

142138
while(frame && up-- > 0) {
@@ -152,8 +148,6 @@ namespace rubinius {
152148
}
153149

154150
CallFrame* VM::get_variables_frame(ssize_t up) {
155-
if(up < 0) rubinius::bug("negative skip frame value provided");
156-
157151
CallFrame* frame = call_frame_;
158152

159153
while(frame && up-- > 0) {
@@ -175,8 +169,6 @@ namespace rubinius {
175169
}
176170

177171
CallFrame* VM::get_scope_frame(ssize_t up) {
178-
if(up < 0) rubinius::bug("negative skip frame value provided");
179-
180172
CallFrame* frame = call_frame_;
181173

182174
while(frame && up-- > 0) {

0 commit comments

Comments
 (0)
Please sign in to comment.