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

Commits on May 11, 2015

  1. Copy the full SHA
    c017561 View commit details
  2. Fixed deadlock in Metrics. Possibly related to #3366.

    1. The Metrics thread was holding a lock that the Finalizer thread needed to
    acquire to finalize a Thread structure; and
    2. The Metrics thread was waiting to become GC dependent; and
    3. A GC cycle was starting; and
    4. The GC cycle could not progress because the Finalizer thread was GC
    dependend and not stopping.
    brixen committed May 11, 2015
    Copy the full SHA
    52c2849 View commit details
Showing with 18 additions and 18 deletions.
  1. +1 −1 .travis.yml
  2. +17 −17 vm/metrics.cpp
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -48,6 +48,6 @@ env:

os:
- linux
- osx
# - osx

osx_image: xcode61
34 changes: 17 additions & 17 deletions vm/metrics.cpp
Original file line number Diff line number Diff line change
@@ -197,7 +197,6 @@ namespace rubinius {
, timer_(NULL)
, emitter_(NULL)
{
metrics_lock_.init();
map_metrics();

if(!state->shared().config.system_metrics_target.value.compare("statsd")) {
@@ -419,6 +418,7 @@ namespace rubinius {

timer_ = new timer::Timer;

metrics_lock_.init();
metrics_collection_.init();
metrics_history_.init();
}
@@ -459,31 +459,31 @@ namespace rubinius {

if(thread_exit_) break;

{
utilities::thread::Mutex::LockGuard guard(metrics_lock_);
metrics_collection_.init();
ThreadList* threads = state->shared().threads();

metrics_collection_.init();
ThreadList* threads = state->shared().threads();

for(ThreadList::iterator i = threads->begin();
i != threads->end();
++i) {
if(VM* vm = (*i)->as_vm()) {
metrics_collection_.add(vm->metrics());
}
for(ThreadList::iterator i = threads->begin();
i != threads->end();
++i) {
if(VM* vm = (*i)->as_vm()) {
metrics_collection_.add(vm->metrics());
}
}

#ifdef ENABLE_LLVM
if(LLVMState* llvm_state = state->shared().llvm_state) {
metrics_collection_.add(llvm_state->metrics());
}
if(LLVMState* llvm_state = state->shared().llvm_state) {
metrics_collection_.add(llvm_state->metrics());
}
#endif

metrics_collection_.add(metrics_history_);
{
utilities::thread::Mutex::LockGuard guard(metrics_lock_);

update_ruby_values(state);
metrics_collection_.add(metrics_history_);
}

update_ruby_values(state);

if(emitter_) emitter_->send_metrics();
}