Mercurial > hg > graal-jvmci-8
comparison src/share/vm/services/diagnosticCommand.cpp @ 17827:f42c10a3d4b1
7090324: gclog rotation via external tool
Summary: GC log rotation can be set via java command line, but customer sometime need to sync with OS level rotation setting.
Reviewed-by: sla, minqi, ehelin
Contributed-by: suenaga.yasumasa@lab.ntt.co.jp
author | minqi |
---|---|
date | Mon, 31 Mar 2014 13:09:35 -0700 |
parents | 82a9cdbf683e |
children | 78bbf4d43a14 |
comparison
equal
deleted
inserted
replaced
17826:d5818eeedb40 | 17827:f42c10a3d4b1 |
---|---|
51 DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<HeapDumpDCmd>(DCmd_Source_Internal | DCmd_Source_AttachAPI, true, false)); | 51 DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<HeapDumpDCmd>(DCmd_Source_Internal | DCmd_Source_AttachAPI, true, false)); |
52 DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<ClassHistogramDCmd>(full_export, true, false)); | 52 DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<ClassHistogramDCmd>(full_export, true, false)); |
53 DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<ClassStatsDCmd>(full_export, true, false)); | 53 DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<ClassStatsDCmd>(full_export, true, false)); |
54 #endif // INCLUDE_SERVICES | 54 #endif // INCLUDE_SERVICES |
55 DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<ThreadDumpDCmd>(full_export, true, false)); | 55 DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<ThreadDumpDCmd>(full_export, true, false)); |
56 DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<RotateGCLogDCmd>(full_export, true, false)); | |
56 | 57 |
57 // Enhanced JMX Agent Support | 58 // Enhanced JMX Agent Support |
58 // These commands won't be exported via the DiagnosticCommandMBean until an | 59 // These commands won't be exported via the DiagnosticCommandMBean until an |
59 // appropriate permission is created for them | 60 // appropriate permission is created for them |
60 uint32_t jmx_agent_export_flags = DCmd_Source_Internal | DCmd_Source_AttachAPI; | 61 uint32_t jmx_agent_export_flags = DCmd_Source_Internal | DCmd_Source_AttachAPI; |
648 | 649 |
649 JavaValue result(T_VOID); | 650 JavaValue result(T_VOID); |
650 JavaCalls::call_static(&result, ik, vmSymbols::stopRemoteAgent_name(), vmSymbols::void_method_signature(), CHECK); | 651 JavaCalls::call_static(&result, ik, vmSymbols::stopRemoteAgent_name(), vmSymbols::void_method_signature(), CHECK); |
651 } | 652 } |
652 | 653 |
654 void RotateGCLogDCmd::execute(DCmdSource source, TRAPS) { | |
655 if (UseGCLogFileRotation) { | |
656 VM_RotateGCLog rotateop(output()); | |
657 VMThread::execute(&rotateop); | |
658 } else { | |
659 output()->print_cr("Target VM does not support GC log file rotation."); | |
660 } | |
661 } |