/* * Copyright (c) 2011, 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. *
*/
class HelpDCmd : public DCmdWithParser { protected:
DCmdArgument<bool> _all;
DCmdArgument<char*> _cmd; public:
HelpDCmd(outputStream* output, bool heap); staticconstchar* name() { return"help"; } staticconstchar* description() { return"For more information about a specific command use 'help <command>'. " "With no argument this will show a list of available commands. " "'help all' will show help for all commands.";
} staticconstchar* impact() { return"Low"; } virtualvoid execute(DCmdSource source, TRAPS);
};
class FinalizerInfoDCmd : public DCmd { public:
FinalizerInfoDCmd(outputStream* output, bool heap) : DCmd(output, heap) { } staticconstchar* name() { return"GC.finalizer_info"; } staticconstchar* description() { return"Provide information about Java finalization queue.";
} staticconstchar* impact() { return"Medium";
} staticconst JavaPermission permission() {
JavaPermission p = {"java.lang.management.ManagementPermission", "monitor", NULL}; return p;
}
virtualvoid execute(DCmdSource source, TRAPS);
};
#if INCLUDE_SERVICES // Heap dumping supported // See also: dump_heap in attachListener.cpp class HeapDumpDCmd : public DCmdWithParser { protected:
DCmdArgument<char*> _filename;
DCmdArgument<bool> _all;
DCmdArgument<jlong> _gzip;
DCmdArgument<bool> _overwrite; public:
HeapDumpDCmd(outputStream* output, bool heap); staticconstchar* name() { return"GC.heap_dump";
} staticconstchar* description() { return"Generate a HPROF format dump of the Java heap.";
} staticconstchar* impact() { return"High: Depends on Java heap size and content. " "Request a full GC unless the '-all' option is specified.";
} staticconst JavaPermission permission() {
JavaPermission p = {"java.lang.management.ManagementPermission", "monitor", NULL}; return p;
} virtualvoid execute(DCmdSource source, TRAPS);
}; #endif// INCLUDE_SERVICES
// See also: inspectheap in attachListener.cpp class ClassHistogramDCmd : public DCmdWithParser { protected:
DCmdArgument<bool> _all;
DCmdArgument<jlong> _parallel_thread_num; public:
ClassHistogramDCmd(outputStream* output, bool heap); staticconstchar* name() { return"GC.class_histogram";
} staticconstchar* description() { return"Provide statistics about the Java heap usage.";
} staticconstchar* impact() { return"High: Depends on Java heap size and content.";
} staticconst JavaPermission permission() {
JavaPermission p = {"java.lang.management.ManagementPermission", "monitor", NULL}; return p;
} virtualvoid execute(DCmdSource source, TRAPS);
};
class ClassHierarchyDCmd : public DCmdWithParser { protected:
DCmdArgument<bool> _print_interfaces; // true if inherited interfaces should be printed.
DCmdArgument<bool> _print_subclasses; // true if subclasses of the specified classname should be printed.
DCmdArgument<char*> _classname; // Optional single class name whose hierarchy should be printed. public:
ClassHierarchyDCmd(outputStream* output, bool heap); staticconstchar* name() { return"VM.class_hierarchy";
} staticconstchar* description() { return"Print a list of all loaded classes, indented to show the class hierarchy. " "The name of each class is followed by the ClassLoaderData* of its ClassLoader, " "or \"null\" if loaded by the bootstrap class loader.";
} staticconstchar* impact() { return"Medium: Depends on number of loaded classes.";
} staticconst JavaPermission permission() {
JavaPermission p = {"java.lang.management.ManagementPermission", "monitor", NULL}; return p;
} virtualvoid execute(DCmdSource source, TRAPS);
};
#if INCLUDE_CDS class DumpSharedArchiveDCmd: public DCmdWithParser { protected:
DCmdArgument<char*> _suboption; // option of VM.cds
DCmdArgument<char*> _filename; // file name, optional public:
DumpSharedArchiveDCmd(outputStream* output, bool heap); staticconstchar* name() { return"VM.cds";
} staticconstchar* description() { return"Dump a static or dynamic shared archive including all shareable classes";
} staticconstchar* impact() { return"Medium: Pause time depends on number of loaded classes";
} staticconst JavaPermission permission() {
JavaPermission p = {"java.lang.management.ManagementPermission", "monitor", NULL}; return p;
} staticint num_arguments(); virtualvoid execute(DCmdSource source, TRAPS);
}; #endif// INCLUDE_CDS
// See also: thread_dump in attachListener.cpp class ThreadDumpDCmd : public DCmdWithParser { protected:
DCmdArgument<bool> _locks;
DCmdArgument<bool> _extended; public:
ThreadDumpDCmd(outputStream* output, bool heap); staticconstchar* name() { return"Thread.print"; } staticconstchar* description() { return"Print all threads with stacktraces.";
} staticconstchar* impact() { return"Medium: Depends on the number of threads.";
} staticconst JavaPermission permission() {
JavaPermission p = {"java.lang.management.ManagementPermission", "monitor", NULL}; return p;
} virtualvoid execute(DCmdSource source, TRAPS);
};
// Enhanced JMX Agent support
class JMXStartRemoteDCmd : public DCmdWithParser {
// Explicitly list all properties that could be // passed to Agent.startRemoteManagementAgent() // com.sun.management is omitted
class ThreadDumpToFileDCmd : public DCmdWithParser { private: void dumpToFile(Symbol* name, Symbol* signature, constchar* path, bool overwrite, TRAPS); protected:
DCmdArgument<bool> _overwrite;
DCmdArgument<char*> _format;
DCmdArgument<char*> _filepath; public:
ThreadDumpToFileDCmd(outputStream *output, bool heap); staticconstchar *name() { return"Thread.dump_to_file";
} staticconstchar *description() { return"Dump threads, with stack traces, to a file in plain text or JSON format.";
} staticconstchar* impact() { return"Medium: Depends on the number of threads.";
} staticconst JavaPermission permission() {
JavaPermission p = {"java.lang.management.ManagementPermission", "monitor", NULL}; return p;
} staticint num_arguments(); virtualvoid execute(DCmdSource source, TRAPS);
};
#endif// SHARE_SERVICES_DIAGNOSTICCOMMAND_HPP
Messung V0.5 in Prozent
¤ Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.0.14Bemerkung:
(Wie Sie bei der Firma Beratungs- und Dienstleistungen beauftragen können 2026-05-02)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.