138 return "Medium: Depends on Java heap size and content."; 139 } 140 static int num_arguments() { return 0; } 141 virtual void execute(TRAPS); 142 }; 143 144 class RunFinalizationDCmd : public DCmd { 145 public: 146 RunFinalizationDCmd(outputStream* output, bool heap) : DCmd(output, heap) { } 147 static const char* name() { return "GC.run_finalization"; } 148 static const char* description() { 149 return "Call java.lang.System.runFinalization()."; 150 } 151 static const char* impact() { 152 return "Medium: Depends on Java content."; 153 } 154 static int num_arguments() { return 0; } 155 virtual void execute(TRAPS); 156 }; 157 158 #ifndef SERVICES_KERNEL // Heap dumping not supported 159 // See also: dump_heap in attachListener.cpp 160 class HeapDumpDCmd : public DCmdWithParser { 161 protected: 162 DCmdArgument<char*> _filename; 163 DCmdArgument<bool> _all; 164 public: 165 HeapDumpDCmd(outputStream* output, bool heap); 166 static const char* name() { 167 return "GC.heap_dump"; 168 } 169 static const char* description() { 170 return "Generate a HPROF format dump of the Java heap."; 171 } 172 static const char* impact() { 173 return "High: Depends on Java heap size and content. " 174 "Request a full GC unless the '-all' option is specified."; 175 } 176 static int num_arguments(); 177 virtual void execute(TRAPS); 178 }; 179 #endif // SERVICES_KERNEL 180 181 // See also: inspeactheap in attachListener.cpp 182 class ClassHistogramDCmd : public DCmdWithParser { 183 protected: 184 DCmdArgument<bool> _all; 185 public: 186 ClassHistogramDCmd(outputStream* output, bool heap); 187 static const char* name() { 188 return "GC.class_histogram"; 189 } 190 static const char* description() { 191 return "Provide statistics about the Java heap usage."; 192 } 193 static const char* impact() { 194 return "High: Depends on Java heap size and content."; 195 } 196 static int num_arguments(); 197 virtual void execute(TRAPS); 198 }; 199 | 138 return "Medium: Depends on Java heap size and content."; 139 } 140 static int num_arguments() { return 0; } 141 virtual void execute(TRAPS); 142 }; 143 144 class RunFinalizationDCmd : public DCmd { 145 public: 146 RunFinalizationDCmd(outputStream* output, bool heap) : DCmd(output, heap) { } 147 static const char* name() { return "GC.run_finalization"; } 148 static const char* description() { 149 return "Call java.lang.System.runFinalization()."; 150 } 151 static const char* impact() { 152 return "Medium: Depends on Java content."; 153 } 154 static int num_arguments() { return 0; } 155 virtual void execute(TRAPS); 156 }; 157 158 #if INCLUDE_SERVICES // Heap dumping supported 159 // See also: dump_heap in attachListener.cpp 160 class HeapDumpDCmd : public DCmdWithParser { 161 protected: 162 DCmdArgument<char*> _filename; 163 DCmdArgument<bool> _all; 164 public: 165 HeapDumpDCmd(outputStream* output, bool heap); 166 static const char* name() { 167 return "GC.heap_dump"; 168 } 169 static const char* description() { 170 return "Generate a HPROF format dump of the Java heap."; 171 } 172 static const char* impact() { 173 return "High: Depends on Java heap size and content. " 174 "Request a full GC unless the '-all' option is specified."; 175 } 176 static int num_arguments(); 177 virtual void execute(TRAPS); 178 }; 179 #endif // INCLUDE_SERVICES 180 181 // See also: inspeactheap in attachListener.cpp 182 class ClassHistogramDCmd : public DCmdWithParser { 183 protected: 184 DCmdArgument<bool> _all; 185 public: 186 ClassHistogramDCmd(outputStream* output, bool heap); 187 static const char* name() { 188 return "GC.class_histogram"; 189 } 190 static const char* description() { 191 return "Provide statistics about the Java heap usage."; 192 } 193 static const char* impact() { 194 return "High: Depends on Java heap size and content."; 195 } 196 static int num_arguments(); 197 virtual void execute(TRAPS); 198 }; 199 |