comparison src/share/vm/gc_implementation/shared/vmGCOperations.hpp @ 7956:16fb9f942703

6479360: PrintClassHistogram improvements Summary: jcmd <pid> GC.class_stats (UnlockDiagnosticVMOptions) Reviewed-by: coleenp, hseigel, sla, acorn Contributed-by: ioi.lam@oracle.com
author acorn
date Fri, 25 Jan 2013 15:06:18 -0500
parents 685df3c6f84b
children f2110083203d
comparison
equal deleted inserted replaced
7950:6cf2530f7fd3 7956:16fb9f942703
1 /* 1 /*
2 * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 * 4 *
5 * This code is free software; you can redistribute it and/or modify it 5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as 6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
128 class VM_GC_HeapInspection: public VM_GC_Operation { 128 class VM_GC_HeapInspection: public VM_GC_Operation {
129 private: 129 private:
130 outputStream* _out; 130 outputStream* _out;
131 bool _full_gc; 131 bool _full_gc;
132 bool _need_prologue; 132 bool _need_prologue;
133 bool _csv_format; // "comma separated values" format for spreadsheet.
134 bool _print_help;
135 bool _print_class_stats;
136 const char* _columns;
133 public: 137 public:
134 VM_GC_HeapInspection(outputStream* out, bool request_full_gc, 138 VM_GC_HeapInspection(outputStream* out, bool request_full_gc,
135 bool need_prologue) : 139 bool need_prologue) :
136 VM_GC_Operation(0 /* total collections, dummy, ignored */, 140 VM_GC_Operation(0 /* total collections, dummy, ignored */,
137 GCCause::_heap_inspection /* GC Cause */, 141 GCCause::_heap_inspection /* GC Cause */,
138 0 /* total full collections, dummy, ignored */, 142 0 /* total full collections, dummy, ignored */,
139 request_full_gc) { 143 request_full_gc) {
140 _out = out; 144 _out = out;
141 _full_gc = request_full_gc; 145 _full_gc = request_full_gc;
142 _need_prologue = need_prologue; 146 _need_prologue = need_prologue;
147 _csv_format = false;
148 _print_help = false;
149 _print_class_stats = false;
150 _columns = NULL;
143 } 151 }
144 152
145 ~VM_GC_HeapInspection() {} 153 ~VM_GC_HeapInspection() {}
146 virtual VMOp_Type type() const { return VMOp_GC_HeapInspection; } 154 virtual VMOp_Type type() const { return VMOp_GC_HeapInspection; }
147 virtual bool skip_operation() const; 155 virtual bool skip_operation() const;
148 virtual bool doit_prologue(); 156 virtual bool doit_prologue();
149 virtual void doit(); 157 virtual void doit();
158 void set_csv_format(bool value) {_csv_format = value;}
159 void set_print_help(bool value) {_print_help = value;}
160 void set_print_class_stats(bool value) {_print_class_stats = value;}
161 void set_columns(const char* value) {_columns = value;}
150 }; 162 };
151 163
152 164
153 class VM_GenCollectForAllocation: public VM_GC_Operation { 165 class VM_GenCollectForAllocation: public VM_GC_Operation {
154 private: 166 private: