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: 789fa8190ca0^
Choose a base ref
...
head repository: rubinius/rubinius
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 19e5f9822659
Choose a head ref
  • 4 commits
  • 47 files changed
  • 1 contributor

Commits on May 1, 2016

  1. Added include for RapidJSON.

    brixen committed May 1, 2016
    Copy the full SHA
    789fa81 View commit details
  2. Added RapidJSON.

    https://github.com/miloyip/rapidjson c02d52ad56595dc70b38daf46b5f315d3a7115fa
    brixen committed May 1, 2016
    Copy the full SHA
    9ab41af View commit details
  3. Added -Xsystem.diagnostics.target.

    This specifies the location to send diagnostics data.
    brixen committed May 1, 2016
    Copy the full SHA
    f5f110a View commit details
  4. Removed SystemDiagnostics object.

    Instead of a single data object that collects all system diagnostics, this is
    the first step of using a single mechanism to emit diagnostics from a variety
    of system components, without coupling them.
    brixen committed May 1, 2016
    Copy the full SHA
    19e5f98 View commit details
Showing with 15,147 additions and 132 deletions.
  1. +31 −20 library/rubinius/configuration.rb
  2. +0 −3 machine/environment.cpp
  3. +2 −3 machine/environment.hpp
  4. +2 −6 machine/memory.cpp
  5. +2 −3 machine/memory.hpp
  6. +0 −1 machine/memory/immix_marker.cpp
  7. +0 −6 machine/metrics.cpp
  8. +0 −2 machine/metrics.hpp
  9. +0 −32 machine/system_diagnostics.cpp
  10. +0 −56 machine/system_diagnostics.hpp
  11. +2 −0 rakelib/blueprint.rb
  12. +263 −0 vendor/rapidjson/rapidjson/allocators.h
  13. +2,577 −0 vendor/rapidjson/rapidjson/document.h
  14. +299 −0 vendor/rapidjson/rapidjson/encodedstream.h
  15. +712 −0 vendor/rapidjson/rapidjson/encodings.h
  16. +74 −0 vendor/rapidjson/rapidjson/error/en.h
  17. +155 −0 vendor/rapidjson/rapidjson/error/error.h
  18. +99 −0 vendor/rapidjson/rapidjson/filereadstream.h
  19. +104 −0 vendor/rapidjson/rapidjson/filewritestream.h
  20. +151 −0 vendor/rapidjson/rapidjson/fwd.h
  21. +290 −0 vendor/rapidjson/rapidjson/internal/biginteger.h
  22. +258 −0 vendor/rapidjson/rapidjson/internal/diyfp.h
  23. +244 −0 vendor/rapidjson/rapidjson/internal/dtoa.h
  24. +78 −0 vendor/rapidjson/rapidjson/internal/ieee754.h
  25. +304 −0 vendor/rapidjson/rapidjson/internal/itoa.h
  26. +181 −0 vendor/rapidjson/rapidjson/internal/meta.h
  27. +55 −0 vendor/rapidjson/rapidjson/internal/pow10.h
  28. +701 −0 vendor/rapidjson/rapidjson/internal/regex.h
  29. +230 −0 vendor/rapidjson/rapidjson/internal/stack.h
  30. +55 −0 vendor/rapidjson/rapidjson/internal/strfunc.h
  31. +269 −0 vendor/rapidjson/rapidjson/internal/strtod.h
  32. +46 −0 vendor/rapidjson/rapidjson/internal/swap.h
  33. +110 −0 vendor/rapidjson/rapidjson/istreamwrapper.h
  34. +57 −0 vendor/rapidjson/rapidjson/license.txt
  35. +70 −0 vendor/rapidjson/rapidjson/memorybuffer.h
  36. +71 −0 vendor/rapidjson/rapidjson/memorystream.h
  37. +316 −0 vendor/rapidjson/rapidjson/msinttypes/inttypes.h
  38. +300 −0 vendor/rapidjson/rapidjson/msinttypes/stdint.h
  39. +76 −0 vendor/rapidjson/rapidjson/ostreamwrapper.h
  40. +1,354 −0 vendor/rapidjson/rapidjson/pointer.h
  41. +249 −0 vendor/rapidjson/rapidjson/prettywriter.h
  42. +615 −0 vendor/rapidjson/rapidjson/rapidjson.h
  43. +1,857 −0 vendor/rapidjson/rapidjson/reader.h
  44. +2,018 −0 vendor/rapidjson/rapidjson/schema.h
  45. +179 −0 vendor/rapidjson/rapidjson/stream.h
  46. +117 −0 vendor/rapidjson/rapidjson/stringbuffer.h
  47. +574 −0 vendor/rapidjson/rapidjson/writer.h
51 changes: 31 additions & 20 deletions library/rubinius/configuration.rb
Original file line number Diff line number Diff line change
@@ -182,38 +182,49 @@
s.vm_variable "tmp", "$TMPDIR",
"Default temp/fallback directory for the process"

s.vm_variable "console.path", "$TMPDIR/$PROGRAM_NAME-$USER-console",
"Path for Rubinius Console connection file"
s.section "console" do |c|
c.vm_variable "path", "$TMPDIR/$PROGRAM_NAME-$USER-console",
"Path for Rubinius Console connection file"

s.vm_variable "console.access", 0660,
"Permissions on the Rubinius Console connection file"
c.vm_variable "access", 0660,
"Permissions on the Rubinius Console connection file"
end

s.vm_variable "log", "$TMPDIR/$PROGRAM_NAME-$USER.log",
"Logging facility to use: 'syslog', 'console', or path"

s.vm_variable "log.limit", (10 * 1024 * 1024),
"The maximum size of the log file before log rotation is performed"
s.section "log" do |l|
l.vm_variable "limit", (10 * 1024 * 1024),
"The maximum size of the log file before log rotation is performed"

s.vm_variable "log.archives", 5,
"The number of prior logs that will be saved as '$(system.log).N.Z' zip files"
l.vm_variable "archives", 5,
"The number of prior logs that will be saved as '$(system.log).N.Z' zip files"

s.vm_variable "log.access", 0600,
"Permissions on the log file"
l.vm_variable "access", 0600,
"Permissions on the log file"

s.vm_variable "log.level", "warn",
"Logging level: fatal, error, warn, info, debug"
l.vm_variable "level", "warn",
"Logging level: fatal, error, warn, info, debug"
end

s.vm_variable "metrics.interval", 10000,
"Number of milliseconds between aggregation of VM metrics"
s.section "metrics" do |m|
m.vm_variable "interval", 10000,
"Number of milliseconds between aggregation of VM metrics"

s.vm_variable "metrics.target", "none",
"Location to send metrics every interval: 'statsd', path"
m.vm_variable "target", "none",
"Location to send metrics every interval: 'statsd', path"

s.vm_variable "metrics.statsd.server", "localhost:8125",
"The [host:]port of the StatsD server"
m.vm_variable "statsd.server", "localhost:8125",
"The [host:]port of the StatsD server"

s.vm_variable "metrics.statsd.prefix", "host.$nodename.$pid.app.rbx",
"Prefix for StatsD metric names"
m.vm_variable "statsd.prefix", "host.$nodename.$pid.app.rbx",
"Prefix for StatsD metric names"
end

s.section "diagnostics" do |d|
d.vm_variable "target", "none",
"Location to send diagnostics: host:port, path"
end
end
end

3 changes: 0 additions & 3 deletions machine/environment.cpp
Original file line number Diff line number Diff line change
@@ -7,7 +7,6 @@
#include "compiled_file.hpp"
#include "memory.hpp"
#include "exception.hpp"
#include "system_diagnostics.hpp"
#include "thread_phase.hpp"

#include "builtin/array.hpp"
@@ -218,8 +217,6 @@ namespace rubinius {
}

void Environment::start_diagnostics(STATE) {
diagnostics_ = new diagnostics::SystemDiagnostics(
state->shared().memory()->diagnostics());
}

void Environment::start_logging(STATE) {
5 changes: 2 additions & 3 deletions machine/environment.hpp
Original file line number Diff line number Diff line change
@@ -16,7 +16,6 @@
namespace rubinius {

namespace diagnostics {
class SystemDiagnostics;
}

namespace memory {
@@ -76,7 +75,7 @@ namespace rubinius {

memory::TypedRoot<Object*>* loader_;

diagnostics::SystemDiagnostics* diagnostics_;
diagnostics::Diagnostics* diagnostics_;

public:
SharedState* shared;
@@ -118,7 +117,7 @@ namespace rubinius {
return loader_->get();
}

diagnostics::SystemDiagnostics* diagnostics() {
diagnostics::Diagnostics* diagnostics() {
return diagnostics_;
}

8 changes: 2 additions & 6 deletions machine/memory.cpp
Original file line number Diff line number Diff line change
@@ -17,7 +17,6 @@
#include "memory/walker.hpp"

#include "environment.hpp"
#include "system_diagnostics.hpp"

#if ENABLE_LLVM
#include "jit/llvm/state.hpp"
@@ -78,10 +77,7 @@ namespace rubinius {
, collect_young_flag_(false)
, collect_full_flag_(false)
, shared_(vm->shared)
, diagnostics_(new diagnostics::ObjectDiagnostics(/* young_->diagnostics(), */
immix_->diagnostics(), mark_sweep_->diagnostics(),
inflated_headers_->diagnostics(), capi_handles_->diagnostics(),
code_manager_.diagnostics(), shared.symbols.diagnostics()))
, diagnostics_(NULL)
, vm_(vm)
, last_object_id(1)
, last_snapshot_id(0)
@@ -569,7 +565,7 @@ namespace rubinius {
}

if(state->shared().config.memory_collection_log.value) {
state->shared().env()->diagnostics()->log();
// TODO: memory diagnostics
}
}

5 changes: 2 additions & 3 deletions machine/memory.hpp
Original file line number Diff line number Diff line change
@@ -43,7 +43,6 @@ namespace rubinius {
}

namespace diagnostics {
class ObjectDiagnostics;
}

namespace capi {
@@ -138,7 +137,7 @@ namespace rubinius {

SharedState& shared_;

diagnostics::ObjectDiagnostics* diagnostics_;
diagnostics::Diagnostics* diagnostics_;

public:
VM* vm_;
@@ -572,7 +571,7 @@ namespace rubinius {
mature_gc_in_progress_ = false;
}

diagnostics::ObjectDiagnostics* diagnostics() {
diagnostics::Diagnostics* diagnostics() {
return diagnostics_;
}

1 change: 0 additions & 1 deletion machine/memory/immix_marker.cpp
Original file line number Diff line number Diff line change
@@ -4,7 +4,6 @@
#include "metrics.hpp"
#include "memory.hpp"
#include "state.hpp"
#include "system_diagnostics.hpp"
#include "thread_phase.hpp"
#include "vm.hpp"

6 changes: 0 additions & 6 deletions machine/metrics.cpp
Original file line number Diff line number Diff line change
@@ -6,7 +6,6 @@
#include "object_utils.hpp"
#include "shared_state.hpp"
#include "configuration.hpp"
#include "system_diagnostics.hpp"
#include "thread_phase.hpp"

#include "builtin/class.hpp"
@@ -536,10 +535,6 @@ namespace rubinius {
}
}

void Metrics::log_diagnostics(STATE) {
state->shared().env()->diagnostics()->log();
}

void Metrics::run(STATE) {
state->vm()->become_unmanaged();

@@ -585,7 +580,6 @@ namespace rubinius {
ManagedPhase managed(state);

update_ruby_values(state);
log_diagnostics(state);
}

if(emitter_) emitter_->send_metrics();
2 changes: 0 additions & 2 deletions machine/metrics.hpp
Original file line number Diff line number Diff line change
@@ -454,8 +454,6 @@ namespace rubinius {
void init_ruby_metrics(STATE);
void update_ruby_values(STATE);

void log_diagnostics(STATE);

void disable(STATE) {
enabled_ = false;
}
32 changes: 0 additions & 32 deletions machine/system_diagnostics.cpp

This file was deleted.

56 changes: 0 additions & 56 deletions machine/system_diagnostics.hpp

This file was deleted.

2 changes: 2 additions & 0 deletions rakelib/blueprint.rb
Original file line number Diff line number Diff line change
@@ -84,6 +84,8 @@
src = Rubinius::BUILD_CONFIG[:sourcedir]

# Libraries
gcc.cflags << "-I#{src}/vendor/rapidjson"

ltm = i.external_lib "vendor/libtommath" do |l|
l.cflags = ["-I#{src}/vendor/libtommath"] + gcc.cflags
l.objects = [l.file("libtommath.a")]
Loading