Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin' into codedb-ffi-io
Browse files Browse the repository at this point in the history
brixen committed Mar 25, 2016
2 parents cf86e0f + 636abb1 commit ae70c8f
Showing 6 changed files with 21 additions and 10 deletions.
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -39,7 +39,6 @@ notifications:
on_start: always
env:
global:
- RBXOPT=-Xint
- LANG="en_US.UTF-8"
- secure: olbok/GN6rOYvPnHBYWGz7giCoCdLFpT/7WSBHukYO3E0uNeqAUOOgW2BFOwCVWdSEJ/iTvJXZQ4qVZHX+6jRfvILZeGv+D2P93VdD8UFQRoTOfFC7esAo525s9fuKm9ehUGWZxlzGOBHHckky1jn6pEf8mlXAVM5e76dlH0fck=
- secure: aqG9eB/PrzQ7XJQN6YX/00sNVvwSB77saxXQzguL2WFjAXB74h6168Hzq+awHtNX/vfOb6ta7fpWLHrA0D+gmZnvTR29VlP6nd0vs1tkdX1/jWbiBHjamRffp+NWVdKbJKYn5iLOGXcuUMOzY/opLKOdvxKZfkxGMxR2tTNLZUE=
2 changes: 1 addition & 1 deletion library/rubinius/configuration.rb
Original file line number Diff line number Diff line change
@@ -145,7 +145,7 @@
"Lock around using CAPI methods"
end

c.vm_variable "int", false,
c.vm_variable "int", true,
:as => "jit_disabled",
:description => "Force the JIT to never turn on"

10 changes: 10 additions & 0 deletions machine/builtin/location.cpp
Original file line number Diff line number Diff line change
@@ -9,6 +9,8 @@
#include "builtin/native_method.hpp"
#include "builtin/string.hpp"

#include "instruments/timing.hpp"

namespace rubinius {
void Location::bootstrap(STATE) {
GO(location).set(state->memory()->new_class<Class, Location>(
@@ -129,6 +131,10 @@ namespace rubinius {
Array* Location::from_call_stack(STATE, ssize_t up) {
if(up < 0) rubinius::bug("negative skip frame value provided");

timer::StopWatch<timer::microseconds> timer(
state->vm()->metrics().machine.backtrace_us);
state->vm()->metrics().machine.backtraces++;

CallFrame* base = state->vm()->call_frame();
CallFrame* start = base;
size_t count = 0;
@@ -160,6 +166,10 @@ namespace rubinius {
Array* Location::mri_backtrace(STATE, ssize_t up) {
if(up < 0) rubinius::bug("negative skip frame value provided");

timer::StopWatch<timer::microseconds> timer(
state->vm()->metrics().machine.backtrace_us);
state->vm()->metrics().machine.backtraces++;

CallFrame* base = state->vm()->call_frame();
CallFrame* start = base;
size_t count = 0;
4 changes: 4 additions & 0 deletions machine/metrics.cpp
Original file line number Diff line number Diff line change
@@ -352,6 +352,10 @@ namespace rubinius {
"machine.checkpoints", metrics_data_.machine.checkpoints));
metrics_map_.push_back(new MetricsItem(
"machine.inline_cache.resets", metrics_data_.machine.inline_cache_resets));
metrics_map_.push_back(new MetricsItem(
"machine.backtraces", metrics_data_.machine.backtraces));
metrics_map_.push_back(new MetricsItem(
"machine.backtrace.us", metrics_data_.machine.backtrace_us));
metrics_map_.push_back(new MetricsItem(
"machine.methods.invoked", metrics_data_.machine.methods_invoked));
metrics_map_.push_back(new MetricsItem(
6 changes: 6 additions & 0 deletions machine/metrics.hpp
Original file line number Diff line number Diff line change
@@ -160,13 +160,17 @@ namespace rubinius {
metric checkpoints;
metric stops;
metric inline_cache_resets;
metric backtraces;
metric backtrace_us;
metric methods_invoked;
metric blocks_invoked;

MachineMetrics() {
checkpoints = 0;
stops = 0;
inline_cache_resets = 0;
backtraces = 0;
backtrace_us = 0;
methods_invoked = 0;
blocks_invoked = 0;
}
@@ -175,6 +179,8 @@ namespace rubinius {
checkpoints += data.checkpoints;
stops += data.stops;
inline_cache_resets += data.inline_cache_resets;
backtraces += data.backtraces;
backtrace_us += data.backtrace_us;
methods_invoked += data.methods_invoked;
blocks_invoked += data.blocks_invoked;
}
8 changes: 0 additions & 8 deletions machine/vm.cpp
Original file line number Diff line number Diff line change
@@ -123,8 +123,6 @@ namespace rubinius {
}

CallFrame* VM::get_call_frame(ssize_t up) {
if(up < 0) rubinius::bug("negative skip frame value provided");

CallFrame* frame = call_frame_;

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

CallFrame* VM::get_ruby_frame(ssize_t up) {
if(up < 0) rubinius::bug("negative skip frame value provided");

CallFrame* frame = call_frame_;

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

CallFrame* VM::get_variables_frame(ssize_t up) {
if(up < 0) rubinius::bug("negative skip frame value provided");

CallFrame* frame = call_frame_;

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

CallFrame* VM::get_scope_frame(ssize_t up) {
if(up < 0) rubinius::bug("negative skip frame value provided");

CallFrame* frame = call_frame_;

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

0 comments on commit ae70c8f

Please sign in to comment.