src/share/vm/services/diagnosticCommand.cpp
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File
*** old/src/share/vm/services/diagnosticCommand.cpp Fri Sep 25 16:23:25 2015
--- new/src/share/vm/services/diagnosticCommand.cpp Fri Sep 25 16:23:25 2015
*** 23,32 ****
--- 23,34 ----
*/
#include "precompiled.hpp"
#include "classfile/classLoaderStats.hpp"
#include "classfile/compactHashtable.hpp"
+ #include "compiler/compileBroker.hpp"
+ #include "compiler/directivesParser.hpp"
#include "gc/shared/vmGCOperations.hpp"
#include "oops/oop.inline.hpp"
#include "runtime/globals.hpp"
#include "runtime/javaCalls.hpp"
#include "runtime/os.hpp"
*** 77,86 ****
--- 79,93 ----
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<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));
+
// Enhanced JMX Agent Support
// These commands won't be exported via the DiagnosticCommandMBean until an
// appropriate permission is created for them
uint32_t jmx_agent_export_flags = DCmd_Source_Internal | DCmd_Source_AttachAPI;
DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<JMXStartRemoteDCmd>(jmx_agent_export_flags, true,false));
*** 832,841 ****
--- 839,883 ----
void CodeCacheDCmd::execute(DCmdSource source, TRAPS) {
VM_PrintCodeCache printCodeCacheOp(output());
VMThread::execute(&printCodeCacheOp);
}
+ void CompilerDirectivesPrintDCmd::execute(DCmdSource source, TRAPS) {
+ DirectivesStack::print(output());
+ }
+
+ CompilerDirectivesAddDCmd::CompilerDirectivesAddDCmd(outputStream* output, bool heap) :
+ DCmdWithParser(output, heap),
+ _filename("filename","Name of the directives file", "STRING",true) {
+ _dcmdparser.add_dcmd_argument(&_filename);
+ }
+
+
+ void CompilerDirectivesAddDCmd::execute(DCmdSource source, TRAPS) {
+ if (!DirectivesParser::parse_from_file(_filename.value())) {
+ output()->print_cr("Could not load compiler directives file.");
+ }
+ }
+
+ int CompilerDirectivesAddDCmd::num_arguments() {
+ ResourceMark rm;
+ CompilerDirectivesAddDCmd* dcmd = new CompilerDirectivesAddDCmd(NULL, false);
+ if (dcmd != NULL) {
+ DCmdMark mark(dcmd);
+ return dcmd->_dcmdparser.num_arguments();
+ } else {
+ return 0;
+ }
+ }
+
+ void CompilerDirectivesRemoveDCmd::execute(DCmdSource source, TRAPS) {
+ DirectivesStack::pop();
+ }
+
+ void CompilerDirectivesClearDCmd::execute(DCmdSource source, TRAPS) {
+ DirectivesStack::clear();
+ }
#if INCLUDE_SERVICES
ClassHierarchyDCmd::ClassHierarchyDCmd(outputStream* output, bool heap) :
DCmdWithParser(output, heap),
_print_interfaces("-i", "Inherited interfaces should be printed.", "BOOLEAN", false, "false"),
_print_subclasses("-s", "If a classname is specified, print its subclasses. "
src/share/vm/services/diagnosticCommand.cpp
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File