src/share/vm/services/diagnosticCommand.cpp
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File
hotspot Cdiff src/share/vm/services/diagnosticCommand.cpp
src/share/vm/services/diagnosticCommand.cpp
Print this page
rev 8995 : 8046155: JEP165: Compiler Control
Summary:
Reviewed-by:
*** 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,881 ----
void CodeCacheDCmd::execute(DCmdSource source, TRAPS) {
VM_PrintCodeCache printCodeCacheOp(output());
VMThread::execute(&printCodeCacheOp);
}
+ void CompilerDirectivesPrintDCmd::execute(DCmdSource source, TRAPS) {
+ CompileBroker::print_directives(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) {
+ DirectivesParser::parse_from_file(_filename.value());
+ }
+
+ 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) {
+ CompileBroker::dirstack()->pop();
+ }
+
+ void CompilerDirectivesClearDCmd::execute(DCmdSource source, TRAPS) {
+ CompileBroker::dirstack()->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