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: ae81a26ec0b3
Choose a base ref
...
head repository: rubinius/rubinius
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 90963f83c315
Choose a head ref
  • 2 commits
  • 5 files changed
  • 1 contributor

Commits on Jan 14, 2015

  1. Copy the full SHA
    a51a642 View commit details
  2. Copy the full SHA
    90963f8 View commit details
Showing with 15 additions and 2 deletions.
  1. +1 −1 Gemfile.installed
  2. +1 −1 gems_list.txt
  3. +8 −0 vm/llvm/state.cpp
  4. +2 −0 vm/metrics.cpp
  5. +3 −0 vm/metrics.hpp
2 changes: 1 addition & 1 deletion Gemfile.installed
Original file line number Diff line number Diff line change
@@ -10,5 +10,5 @@ gem "racc", "~> 1.4"
gem "rake", "~> 10.1"
gem "json", "~> 1.8"
gem "rdoc", "~> 4.0"
gem "psych", "~> 2.0"
gem "psych", "= 2.0.6"
gem "rb-readline", "~> 0.5"
2 changes: 1 addition & 1 deletion gems_list.txt
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@ bundler-1.7.11.gem
ffi2-generators-0.1.1.gem
json-1.8.2.gem
minitest-4.7.5.gem
psych-2.0.9.gem
psych-2.0.6.gem
racc-1.4.12.gem
rake-10.4.2.gem
rb-readline-0.5.2.gem
8 changes: 8 additions & 0 deletions vm/llvm/state.cpp
Original file line number Diff line number Diff line change
@@ -356,6 +356,8 @@ namespace rubinius {
} catch(LLVMState::CompileError& e) {
utilities::logger::warn("JIT: compile error: %s", e.error());

vm()->metrics()->m.jit_metrics.methods_failed++;

// If someone was waiting on this, wake them up.
if(utilities::thread::Condition* cond = compile_request->waiter()) {
cond->signal();
@@ -456,6 +458,8 @@ namespace rubinius {

// TODO: Fix compile policy checks
if(!code->keywords()->nil_p()) {
vm()->metrics()->m.jit_metrics.methods_failed++;

return;
}

@@ -489,6 +493,8 @@ namespace rubinius {

// TODO: Fix compile policy checks
if(!code->keywords()->nil_p()) {
vm()->metrics()->m.jit_metrics.methods_failed++;

return;
}

@@ -551,6 +557,8 @@ namespace rubinius {
{
// TODO: Fix compile policy checks
if(!start->keywords()->nil_p()) {
vm()->metrics()->m.jit_metrics.methods_failed++;

return;
}

2 changes: 2 additions & 0 deletions vm/metrics.cpp
Original file line number Diff line number Diff line change
@@ -231,6 +231,8 @@ namespace rubinius {
"jit.methods.queued", metrics_collection_.jit_metrics.methods_queued));
metrics_map_.push_back(new MetricsItem(
"jit.methods.compiled", metrics_collection_.jit_metrics.methods_compiled));
metrics_map_.push_back(new MetricsItem(
"jit.methods.failed", metrics_collection_.jit_metrics.methods_failed));
metrics_map_.push_back(new MetricsItem(
"jit.time.last.us", metrics_collection_.jit_metrics.time_last_us));
metrics_map_.push_back(new MetricsItem(
3 changes: 3 additions & 0 deletions vm/metrics.hpp
Original file line number Diff line number Diff line change
@@ -181,19 +181,22 @@ namespace rubinius {
struct JITMetrics {
metric methods_queued;
metric methods_compiled;
metric methods_failed;
metric time_last_us;
metric time_total_us;

void init() {
methods_queued = 0;
methods_compiled = 0;
methods_failed = 0;
time_last_us = 0;
time_total_us = 0;
}

void add(JITMetrics* data) {
methods_queued += data->methods_queued;
methods_compiled += data->methods_compiled;
methods_failed += data->methods_failed;
time_last_us += data->time_last_us;
time_total_us += data->time_total_us;
}