133 bool _print_help;
134 bool _print_class_stats;
135 const char* _columns;
136 public:
137 VM_GC_HeapInspection(outputStream* out, bool request_full_gc) :
138 VM_GC_Operation(0 /* total collections, dummy, ignored */,
139 GCCause::_heap_inspection /* GC Cause */,
140 0 /* total full collections, dummy, ignored */,
141 request_full_gc) {
142 _out = out;
143 _full_gc = request_full_gc;
144 _csv_format = false;
145 _print_help = false;
146 _print_class_stats = false;
147 _columns = NULL;
148 }
149
150 ~VM_GC_HeapInspection() {}
151 virtual VMOp_Type type() const { return VMOp_GC_HeapInspection; }
152 virtual bool skip_operation() const;
153 virtual bool doit_prologue();
154 virtual void doit();
155 void set_csv_format(bool value) {_csv_format = value;}
156 void set_print_help(bool value) {_print_help = value;}
157 void set_print_class_stats(bool value) {_print_class_stats = value;}
158 void set_columns(const char* value) {_columns = value;}
159 protected:
160 bool collect();
161 };
162
163 class VM_CollectForAllocation : public VM_GC_Operation {
164 protected:
165 size_t _word_size; // Size of object to be allocated (in number of words)
166 HeapWord* _result; // Allocation result (NULL if allocation failed)
167
168 public:
169 VM_CollectForAllocation(size_t word_size, uint gc_count_before, GCCause::Cause cause)
170 : VM_GC_Operation(gc_count_before, cause), _result(NULL), _word_size(word_size) {}
171
172 HeapWord* result() const {
173 return _result;
|
133 bool _print_help;
134 bool _print_class_stats;
135 const char* _columns;
136 public:
137 VM_GC_HeapInspection(outputStream* out, bool request_full_gc) :
138 VM_GC_Operation(0 /* total collections, dummy, ignored */,
139 GCCause::_heap_inspection /* GC Cause */,
140 0 /* total full collections, dummy, ignored */,
141 request_full_gc) {
142 _out = out;
143 _full_gc = request_full_gc;
144 _csv_format = false;
145 _print_help = false;
146 _print_class_stats = false;
147 _columns = NULL;
148 }
149
150 ~VM_GC_HeapInspection() {}
151 virtual VMOp_Type type() const { return VMOp_GC_HeapInspection; }
152 virtual bool skip_operation() const;
153 virtual void doit();
154 void set_csv_format(bool value) {_csv_format = value;}
155 void set_print_help(bool value) {_print_help = value;}
156 void set_print_class_stats(bool value) {_print_class_stats = value;}
157 void set_columns(const char* value) {_columns = value;}
158 protected:
159 bool collect();
160 };
161
162 class VM_CollectForAllocation : public VM_GC_Operation {
163 protected:
164 size_t _word_size; // Size of object to be allocated (in number of words)
165 HeapWord* _result; // Allocation result (NULL if allocation failed)
166
167 public:
168 VM_CollectForAllocation(size_t word_size, uint gc_count_before, GCCause::Cause cause)
169 : VM_GC_Operation(gc_count_before, cause), _result(NULL), _word_size(word_size) {}
170
171 HeapWord* result() const {
172 return _result;
|