Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: rubinius/rubinius
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 2f73b5abe855
Choose a base ref
...
head repository: rubinius/rubinius
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 463bebefcaa5
Choose a head ref
  • 3 commits
  • 7 files changed
  • 1 contributor

Commits on Mar 25, 2016

  1. Copy the full SHA
    324780c View commit details
  2. Added backtrace metrics.

    brixen committed Mar 25, 2016
    Copy the full SHA
    128a1f2 View commit details
  3. Completely disable the JIT.

    brixen committed Mar 25, 2016
    Copy the full SHA
    463bebe View commit details
Showing with 26 additions and 10 deletions.
  1. +0 −1 .travis.yml
  2. +1 −1 library/rubinius/configuration.rb
  3. +10 −0 machine/builtin/location.cpp
  4. +5 −0 machine/memory/immix_collector.cpp
  5. +4 −0 machine/metrics.cpp
  6. +6 −0 machine/metrics.hpp
  7. +0 −8 machine/vm.cpp
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;
5 changes: 5 additions & 0 deletions machine/memory/immix_collector.cpp
Original file line number Diff line number Diff line change
@@ -117,6 +117,11 @@ namespace memory {
if(obj->marked_p(memory_->mark())) return false;
obj->mark(memory_, memory_->mark());

if(!memory_->valid_object_p(obj)) {
std::cerr << "mark_address: pid: " << getpid() << ", invalid object pushed on mark stack: " << obj << std::endl;
sleep(3600);
}

if(push) ms.push_back(addr);
// If this is a young object, let the GC know not to try and mark
// the block it's in.
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) {