6
6
#include " config.h"
7
7
#include " vm.hpp"
8
8
#include " object_memory.hpp"
9
+
9
10
#include " capi/tag.hpp"
11
+
10
12
#include " gc/mark_sweep.hpp"
11
13
#include " gc/baker.hpp"
12
14
#include " gc/immix.hpp"
13
15
#include " gc/inflated_headers.hpp"
14
16
#include " gc/walker.hpp"
15
17
18
+ #include " system_diagnostics.hpp"
19
+
16
20
#if ENABLE_LLVM
17
21
#include " llvm/state.hpp"
18
22
#endif
@@ -54,27 +58,6 @@ namespace rubinius {
54
58
55
59
Object* object_watch = 0 ;
56
60
57
- void ObjectMemory::Diagnostics::log () {
58
- diagnostics::Diagnostics::log ();
59
-
60
- baker_->diagnostics ().log ();
61
- immix_->diagnostics ().log ();
62
- mark_sweep_->diagnostics ().log ();
63
- headers_->diagnostics ().log ();
64
- handles_->diagnostics ().log ();
65
- code_->diagnostics ().log ();
66
- symbols_->diagnostics ().log ();
67
-
68
- utilities::logger::write (" object memory: diagnostics: total memory: %ld" ,
69
- baker_->diagnostics ().bytes_ +
70
- immix_->diagnostics ().bytes_ +
71
- mark_sweep_->diagnostics ().bytes_ +
72
- headers_->diagnostics ().bytes_ +
73
- handles_->diagnostics ().bytes_ +
74
- code_->diagnostics ().bytes_ +
75
- symbols_->diagnostics ().bytes_ );
76
- }
77
-
78
61
/* ObjectMemory methods */
79
62
ObjectMemory::ObjectMemory (VM* vm, SharedState& shared)
80
63
: young_(new BakerGC(this , shared.config))
@@ -90,8 +73,10 @@ namespace rubinius {
90
73
, mature_gc_in_progress_(false )
91
74
, slab_size_(4096 )
92
75
, shared_(vm->shared)
93
- , diagnostics_(Diagnostics(young_, immix_, mark_sweep_,
94
- inflated_headers_, capi_handles_, &code_manager_, &shared.symbols))
76
+ , diagnostics_(new diagnostics::ObjectDiagnostics(young_->diagnostics (),
77
+ immix_->diagnostics(), mark_sweep_->diagnostics(),
78
+ inflated_headers_->diagnostics(), capi_handles_->diagnostics(),
79
+ code_manager_.diagnostics(), shared.symbols.diagnostics()))
95
80
, collect_young_now(false )
96
81
, collect_mature_now(false )
97
82
, vm_(vm)
0 commit comments