56 DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<SetVMFlagDCmd>(full_export, true, false));
57 DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<VMDynamicLibrariesDCmd>(full_export, true, false));
58 DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<VMUptimeDCmd>(full_export, true, false));
59 DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<VMInfoDCmd>(full_export, true, false));
60 DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<SystemGCDCmd>(full_export, true, false));
61 DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<RunFinalizationDCmd>(full_export, true, false));
62 DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<HeapInfoDCmd>(full_export, true, false));
63 DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<FinalizerInfoDCmd>(full_export, true, false));
64 #if INCLUDE_SERVICES // Heap dumping/inspection supported
65 DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<HeapDumpDCmd>(DCmd_Source_Internal | DCmd_Source_AttachAPI, true, false));
66 DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<ClassHistogramDCmd>(full_export, true, false));
67 DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<ClassStatsDCmd>(full_export, true, false));
68 DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<ClassHierarchyDCmd>(full_export, true, false));
69 DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<SymboltableDCmd>(full_export, true, false));
70 DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<StringtableDCmd>(full_export, true, false));
71 #endif // INCLUDE_SERVICES
72 #if INCLUDE_JVMTI
73 DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<JVMTIDataDumpDCmd>(full_export, true, false));
74 #endif // INCLUDE_JVMTI
75 DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<ThreadDumpDCmd>(full_export, true, false));
76 DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<RotateGCLogDCmd>(full_export, true, false));
77 DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<ClassLoaderStatsDCmd>(full_export, true, false));
78 DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<CompileQueueDCmd>(full_export, true, false));
79 DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<CodeListDCmd>(full_export, true, false));
80 DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<CodeCacheDCmd>(full_export, true, false));
81 DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<TouchedMethodsDCmd>(full_export, true, false));
82
83 DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<CompilerDirectivesPrintDCmd>(full_export, true, false));
84 DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<CompilerDirectivesAddDCmd>(full_export, true, false));
85 DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<CompilerDirectivesRemoveDCmd>(full_export, true, false));
86 DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<CompilerDirectivesClearDCmd>(full_export, true, false));
87
88 // Enhanced JMX Agent Support
89 // These commands won't be exported via the DiagnosticCommandMBean until an
90 // appropriate permission is created for them
91 uint32_t jmx_agent_export_flags = DCmd_Source_Internal | DCmd_Source_AttachAPI;
92 DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<JMXStartRemoteDCmd>(jmx_agent_export_flags, true,false));
93 DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<JMXStartLocalDCmd>(jmx_agent_export_flags, true,false));
94 DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<JMXStopRemoteDCmd>(jmx_agent_export_flags, true,false));
95 DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<JMXStatusDCmd>(jmx_agent_export_flags, true,false));
96
807 jvalue* jv = (jvalue*) result.get_value_addr();
808 oop str = (oop) jv->l;
809 if (str != NULL) {
810 char* out = java_lang_String::as_utf8_string(str);
811 if (out) {
812 output()->print_cr("%s", out);
813 return;
814 }
815 }
816 output()->print_cr("Error obtaining management agent status");
817 }
818
819 VMDynamicLibrariesDCmd::VMDynamicLibrariesDCmd(outputStream *output, bool heap_allocated) :
820 DCmd(output, heap_allocated) {
821 // do nothing
822 }
823
824 void VMDynamicLibrariesDCmd::execute(DCmdSource source, TRAPS) {
825 os::print_dll_info(output());
826 output()->cr();
827 }
828
829 void RotateGCLogDCmd::execute(DCmdSource source, TRAPS) {
830 if (UseGCLogFileRotation) {
831 VM_RotateGCLog rotateop(output());
832 VMThread::execute(&rotateop);
833 } else {
834 output()->print_cr("Target VM does not support GC log file rotation.");
835 }
836 }
837
838 void CompileQueueDCmd::execute(DCmdSource source, TRAPS) {
839 VM_PrintCompileQueue printCompileQueueOp(output());
840 VMThread::execute(&printCompileQueueOp);
841 }
842
843 void CodeListDCmd::execute(DCmdSource source, TRAPS) {
844 VM_PrintCodeList printCodeListOp(output());
845 VMThread::execute(&printCodeListOp);
846 }
847
848 void CodeCacheDCmd::execute(DCmdSource source, TRAPS) {
849 VM_PrintCodeCache printCodeCacheOp(output());
850 VMThread::execute(&printCodeCacheOp);
851 }
852
853 void CompilerDirectivesPrintDCmd::execute(DCmdSource source, TRAPS) {
854 DirectivesStack::print(output());
855 }
|
56 DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<SetVMFlagDCmd>(full_export, true, false));
57 DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<VMDynamicLibrariesDCmd>(full_export, true, false));
58 DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<VMUptimeDCmd>(full_export, true, false));
59 DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<VMInfoDCmd>(full_export, true, false));
60 DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<SystemGCDCmd>(full_export, true, false));
61 DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<RunFinalizationDCmd>(full_export, true, false));
62 DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<HeapInfoDCmd>(full_export, true, false));
63 DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<FinalizerInfoDCmd>(full_export, true, false));
64 #if INCLUDE_SERVICES // Heap dumping/inspection supported
65 DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<HeapDumpDCmd>(DCmd_Source_Internal | DCmd_Source_AttachAPI, true, false));
66 DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<ClassHistogramDCmd>(full_export, true, false));
67 DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<ClassStatsDCmd>(full_export, true, false));
68 DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<ClassHierarchyDCmd>(full_export, true, false));
69 DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<SymboltableDCmd>(full_export, true, false));
70 DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<StringtableDCmd>(full_export, true, false));
71 #endif // INCLUDE_SERVICES
72 #if INCLUDE_JVMTI
73 DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<JVMTIDataDumpDCmd>(full_export, true, false));
74 #endif // INCLUDE_JVMTI
75 DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<ThreadDumpDCmd>(full_export, true, false));
76 DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<ClassLoaderStatsDCmd>(full_export, true, false));
77 DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<CompileQueueDCmd>(full_export, true, false));
78 DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<CodeListDCmd>(full_export, true, false));
79 DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<CodeCacheDCmd>(full_export, true, false));
80 DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<TouchedMethodsDCmd>(full_export, true, false));
81
82 DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<CompilerDirectivesPrintDCmd>(full_export, true, false));
83 DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<CompilerDirectivesAddDCmd>(full_export, true, false));
84 DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<CompilerDirectivesRemoveDCmd>(full_export, true, false));
85 DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<CompilerDirectivesClearDCmd>(full_export, true, false));
86
87 // Enhanced JMX Agent Support
88 // These commands won't be exported via the DiagnosticCommandMBean until an
89 // appropriate permission is created for them
90 uint32_t jmx_agent_export_flags = DCmd_Source_Internal | DCmd_Source_AttachAPI;
91 DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<JMXStartRemoteDCmd>(jmx_agent_export_flags, true,false));
92 DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<JMXStartLocalDCmd>(jmx_agent_export_flags, true,false));
93 DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<JMXStopRemoteDCmd>(jmx_agent_export_flags, true,false));
94 DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<JMXStatusDCmd>(jmx_agent_export_flags, true,false));
95
806 jvalue* jv = (jvalue*) result.get_value_addr();
807 oop str = (oop) jv->l;
808 if (str != NULL) {
809 char* out = java_lang_String::as_utf8_string(str);
810 if (out) {
811 output()->print_cr("%s", out);
812 return;
813 }
814 }
815 output()->print_cr("Error obtaining management agent status");
816 }
817
818 VMDynamicLibrariesDCmd::VMDynamicLibrariesDCmd(outputStream *output, bool heap_allocated) :
819 DCmd(output, heap_allocated) {
820 // do nothing
821 }
822
823 void VMDynamicLibrariesDCmd::execute(DCmdSource source, TRAPS) {
824 os::print_dll_info(output());
825 output()->cr();
826 }
827
828 void CompileQueueDCmd::execute(DCmdSource source, TRAPS) {
829 VM_PrintCompileQueue printCompileQueueOp(output());
830 VMThread::execute(&printCompileQueueOp);
831 }
832
833 void CodeListDCmd::execute(DCmdSource source, TRAPS) {
834 VM_PrintCodeList printCodeListOp(output());
835 VMThread::execute(&printCodeListOp);
836 }
837
838 void CodeCacheDCmd::execute(DCmdSource source, TRAPS) {
839 VM_PrintCodeCache printCodeCacheOp(output());
840 VMThread::execute(&printCodeCacheOp);
841 }
842
843 void CompilerDirectivesPrintDCmd::execute(DCmdSource source, TRAPS) {
844 DirectivesStack::print(output());
845 }
|