72 DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<RotateGCLogDCmd>(full_export, true, false)); |
72 DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<RotateGCLogDCmd>(full_export, true, false)); |
73 DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<ClassLoaderStatsDCmd>(full_export, true, false)); |
73 DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<ClassLoaderStatsDCmd>(full_export, true, false)); |
74 DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<CompileQueueDCmd>(full_export, true, false)); |
74 DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<CompileQueueDCmd>(full_export, true, false)); |
75 DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<CodeListDCmd>(full_export, true, false)); |
75 DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<CodeListDCmd>(full_export, true, false)); |
76 DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<CodeCacheDCmd>(full_export, true, false)); |
76 DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<CodeCacheDCmd>(full_export, true, false)); |
|
77 DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<TouchedMethodsDCmd>(full_export, true, false)); |
77 |
78 |
78 // Enhanced JMX Agent Support |
79 // Enhanced JMX Agent Support |
79 // These commands won't be exported via the DiagnosticCommandMBean until an |
80 // These commands won't be exported via the DiagnosticCommandMBean until an |
80 // appropriate permission is created for them |
81 // appropriate permission is created for them |
81 uint32_t jmx_agent_export_flags = DCmd_Source_Internal | DCmd_Source_AttachAPI; |
82 uint32_t jmx_agent_export_flags = DCmd_Source_Internal | DCmd_Source_AttachAPI; |
806 return 0; |
807 return 0; |
807 } |
808 } |
808 } |
809 } |
809 |
810 |
810 #endif |
811 #endif |
|
812 |
|
813 class VM_DumpTouchedMethods : public VM_Operation { |
|
814 private: |
|
815 outputStream* _out; |
|
816 public: |
|
817 VM_DumpTouchedMethods(outputStream* out) { |
|
818 _out = out; |
|
819 } |
|
820 |
|
821 virtual VMOp_Type type() const { return VMOp_DumpTouchedMethods; } |
|
822 |
|
823 virtual void doit() { |
|
824 Method::print_touched_methods(_out); |
|
825 } |
|
826 }; |
|
827 |
|
828 TouchedMethodsDCmd::TouchedMethodsDCmd(outputStream* output, bool heap) : |
|
829 DCmdWithParser(output, heap) |
|
830 {} |
|
831 |
|
832 void TouchedMethodsDCmd::execute(DCmdSource source, TRAPS) { |
|
833 if (!UnlockDiagnosticVMOptions) { |
|
834 output()->print_cr("VM.touched_methods command requires -XX:+UnlockDiagnosticVMOptions"); |
|
835 return; |
|
836 } |
|
837 VM_DumpTouchedMethods dumper(output()); |
|
838 VMThread::execute(&dumper); |
|
839 } |
|
840 |
|
841 int TouchedMethodsDCmd::num_arguments() { |
|
842 return 0; |
|
843 } |