< prev index next >

src/hotspot/share/services/diagnosticCommand.cpp

Print this page
rev 49260 : [mq]: 8198691.patch

*** 101,110 **** --- 101,111 ---- DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<ClassLoaderStatsDCmd>(full_export, true, false)); DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<CompileQueueDCmd>(full_export, true, false)); DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<CodeListDCmd>(full_export, true, false)); DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<CodeCacheDCmd>(full_export, true, false)); DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<TouchedMethodsDCmd>(full_export, true, false)); + DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<CodeHeapAnalyticsDCmd>(full_export, true, false)); DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<CompilerDirectivesPrintDCmd>(full_export, true, false)); DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<CompilerDirectivesAddDCmd>(full_export, true, false)); DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<CompilerDirectivesRemoveDCmd>(full_export, true, false)); DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<CompilerDirectivesClearDCmd>(full_export, true, false));
*** 917,926 **** --- 918,952 ---- void CodeCacheDCmd::execute(DCmdSource source, TRAPS) { CodeCache::print_layout(output()); } + //---< BEGIN >--- CodeHeap State Analytics. + CodeHeapAnalyticsDCmd::CodeHeapAnalyticsDCmd(outputStream* output, bool heap) : + DCmdWithParser(output, heap), + _function("function", "Function to be performed (aggregate, UsedSpace, FreeSpace, MethodCount, MethodSpace, MethodAge, MethodNames, discard", "STRING", false, "all"), + _granularity("granularity", "Detail level - smaller value -> more detail", "STRING", false, "4096") { + _dcmdparser.add_dcmd_argument(&_function); + _dcmdparser.add_dcmd_argument(&_granularity); + } + + void CodeHeapAnalyticsDCmd::execute(DCmdSource source, TRAPS) { + CompileBroker::print_heapinfo(output(), _function.value(), _granularity.value()); + } + + int CodeHeapAnalyticsDCmd::num_arguments() { + ResourceMark rm; + CodeHeapAnalyticsDCmd* dcmd = new CodeHeapAnalyticsDCmd(NULL, false); + if (dcmd != NULL) { + DCmdMark mark(dcmd); + return dcmd->_dcmdparser.num_arguments(); + } else { + return 0; + } + } + //---< END >--- CodeHeap State Analytics. + void CompilerDirectivesPrintDCmd::execute(DCmdSource source, TRAPS) { DirectivesStack::print(output()); } CompilerDirectivesAddDCmd::CompilerDirectivesAddDCmd(outputStream* output, bool heap) :
< prev index next >