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: 08547edc3f89
Choose a base ref
...
head repository: rubinius/rubinius
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 82f17ede583b
Choose a head ref
  • 3 commits
  • 13 files changed
  • 1 contributor

Commits on Jun 12, 2016

  1. Copy the full SHA
    2932ba1 View commit details
  2. Copy the full SHA
    1b12831 View commit details
  3. Copy the full SHA
    82f17ed View commit details
6 changes: 3 additions & 3 deletions library/rubinius/configuration.rb
Original file line number Diff line number Diff line change
@@ -73,7 +73,7 @@
l.vm_variable "finalizer", false,
"Log finalizer execution"

l.vm_variable "filter", "^core/.*$",
l.vm_variable "filter", /^core\/.*$/,
"Filter paths matching pattern when logging events"
end
end
@@ -89,7 +89,7 @@
l.vm_variable "finalizer", false,
"Log finalizer execution"

l.vm_variable "filter", "^core/.*$",
l.vm_variable "filter", /^core\/.*$/,
"Filter paths matching pattern when logging events"
end
end
@@ -145,7 +145,7 @@
l.vm_variable "lifetime", true,
"Log events during the process lifetime"

l.vm_variable "filter", "^core/.*$",
l.vm_variable "filter", /^core\/.*$/,
"Filter paths matching pattern when logging events"
end

15 changes: 13 additions & 2 deletions library/rubinius/configuration_variables.rb
Original file line number Diff line number Diff line change
@@ -26,7 +26,7 @@ def write_vm_variables(io)

io.puts "Configuration() :"
all = @variables.map { |v| v.initializer }.compact

io.puts all.join(",\n")
io.puts "{"

@@ -106,7 +106,12 @@ def initializer
return nil unless @vm

if @default
"#{@vm_name}(this, \"#{@name}\", #{@default.inspect})"
case @default
when Regexp
"#{@vm_name}(this, \"#{@name}\", #{@default.source.inspect})"
else
"#{@vm_name}(this, \"#{@name}\", #{@default.inspect})"
end
else
"#{@vm_name}(this, \"#{@name}\")"
end
@@ -170,6 +175,12 @@ def vm_variable(name, default, options=nil)
when :string
var.type = "config::String"

when Regexp
var.default = default.source
var.type = "config::Regexp"
when :regexp
var.type = "config::Regexp"

when true, false
var.default = default
var.type = "config::Bool"
3 changes: 2 additions & 1 deletion machine/builtin/fiber.cpp
Original file line number Diff line number Diff line change
@@ -13,6 +13,7 @@
#include "memory/gc.hpp"

#include <ostream>
#include <regex>
#include <string>

namespace rubinius {
@@ -133,7 +134,7 @@ namespace rubinius {
}

if(state->shared().config.machine_fiber_log_lifetime.value) {
std::string& filter = state->shared().config.machine_fiber_log_filter.value;
const std::regex& filter = state->shared().config.machine_fiber_log_filter();

if(CallFrame* call_frame = state->vm()->get_filtered_frame(state, filter)) {
std::ostringstream source;
9 changes: 5 additions & 4 deletions machine/builtin/system.cpp
Original file line number Diff line number Diff line change
@@ -48,6 +48,7 @@
#include <fcntl.h>
#include <iostream>
#include <fstream>
#include <regex>
#include <stdarg.h>
#include <string.h>
#include <sstream>
@@ -493,7 +494,7 @@ namespace rubinius {
close(errors[1]);

if(state->shared().config.system_log_lifetime.value) {
std::string& filter = state->shared().config.system_log_filter.value;
const std::regex& filter = state->shared().config.system_log_filter();

if(CallFrame* call_frame = state->vm()->get_filtered_frame(state, filter)) {
logger::write("process: spawn: %d: %s, %s, %s:%d",
@@ -620,7 +621,7 @@ namespace rubinius {
close(output[1]);

if(state->shared().config.system_log_lifetime.value) {
std::string& filter = state->shared().config.system_log_filter.value;
const std::regex& filter = state->shared().config.system_log_filter();

if(CallFrame* call_frame = state->vm()->get_filtered_frame(state, filter)) {
logger::write("process: backtick: %d: %s, %s, %s:%d",
@@ -714,7 +715,7 @@ namespace rubinius {
ExecCommand exe(state, path, args);

if(state->shared().config.system_log_lifetime.value) {
std::string& filter = state->shared().config.system_log_filter.value;
const std::regex& filter = state->shared().config.system_log_filter();

if(CallFrame* call_frame = state->vm()->get_filtered_frame(state, filter)) {
logger::write("process: exec: %s, %s, %s:%d", exe.command(),
@@ -878,7 +879,7 @@ namespace rubinius {
state->shared().machine_threads()->after_fork_parent(state);

if(state->shared().config.system_log_lifetime.value) {
std::string& filter = state->shared().config.system_log_filter.value;
const std::regex& filter = state->shared().config.system_log_filter();

if(CallFrame* call_frame = state->vm()->get_filtered_frame(state, filter)) {
logger::write("process: fork: child: %d, %s, %s:%d", pid,
5 changes: 3 additions & 2 deletions machine/builtin/thread.cpp
Original file line number Diff line number Diff line change
@@ -30,6 +30,7 @@
#include "missing/gettid.h"

#include <ostream>
#include <regex>
#include <string>

/* HACK: returns a value that should identify a native thread
@@ -160,7 +161,7 @@ namespace rubinius {
}

if(state->shared().config.machine_thread_log_lifetime.value) {
std::string& filter = state->shared().config.machine_thread_log_filter.value;
const std::regex& filter = state->shared().config.machine_thread_log_filter();

if(CallFrame* call_frame = state->vm()->get_filtered_frame(state, filter)) {
std::ostringstream source;
@@ -197,7 +198,7 @@ namespace rubinius {
}

if(state->shared().config.machine_thread_log_lifetime.value) {
std::string& filter = state->shared().config.machine_thread_log_filter.value;
const std::regex& filter = state->shared().config.machine_thread_log_filter();

if(CallFrame* call_frame = state->vm()->get_filtered_frame(state, filter)) {
std::ostringstream source;
4 changes: 4 additions & 0 deletions machine/defines.hpp
Original file line number Diff line number Diff line change
@@ -121,5 +121,9 @@ namespace rubinius {
#define UNUSED
#endif

#ifndef NORETURN
#define NORETURN(x) __attribute__ ((noreturn)) x
#endif

#endif

Loading