376 public:
377 static int num_arguments() { return 3; }
378 ClassHierarchyDCmd(outputStream* output, bool heap);
379 static const char* name() {
380 return "VM.class_hierarchy";
381 }
382 static const char* description() {
383 return "Print a list of all loaded classes, indented to show the class hierarchy. "
384 "The name of each class is followed by the ClassLoaderData* of its ClassLoader, "
385 "or \"null\" if loaded by the bootstrap class loader.";
386 }
387 static const char* impact() {
388 return "Medium: Depends on number of loaded classes.";
389 }
390 static const JavaPermission permission() {
391 JavaPermission p = {"java.lang.management.ManagementPermission",
392 "monitor", nullptr};
393 return p;
394 }
395 virtual void execute(DCmdSource source, TRAPS);
396 };
397
398 #if INCLUDE_CDS
399 class DumpSharedArchiveDCmd: public DCmdWithParser {
400 protected:
401 DCmdArgument<char*> _suboption; // option of VM.cds
402 DCmdArgument<char*> _filename; // file name, optional
403 public:
404 static int num_arguments() { return 2; }
405 DumpSharedArchiveDCmd(outputStream* output, bool heap);
406 static const char* name() {
407 return "VM.cds";
408 }
409 static const char* description() {
410 return "Dump a static or dynamic shared archive including all shareable classes";
411 }
412 static const char* impact() {
413 return "Medium: Pause time depends on number of loaded classes";
414 }
415 static const JavaPermission permission() {
|
376 public:
377 static int num_arguments() { return 3; }
378 ClassHierarchyDCmd(outputStream* output, bool heap);
379 static const char* name() {
380 return "VM.class_hierarchy";
381 }
382 static const char* description() {
383 return "Print a list of all loaded classes, indented to show the class hierarchy. "
384 "The name of each class is followed by the ClassLoaderData* of its ClassLoader, "
385 "or \"null\" if loaded by the bootstrap class loader.";
386 }
387 static const char* impact() {
388 return "Medium: Depends on number of loaded classes.";
389 }
390 static const JavaPermission permission() {
391 JavaPermission p = {"java.lang.management.ManagementPermission",
392 "monitor", nullptr};
393 return p;
394 }
395 virtual void execute(DCmdSource source, TRAPS);
396 };
397
398 class PrintClassLayoutDCmd : public DCmdWithParser {
399 protected:
400 DCmdArgument<char*> _classname; // lass name whose layout should be printed.
401 public:
402 PrintClassLayoutDCmd(outputStream* output, bool heap);
403 static const char* name() {
404 return "VM.class_print_layout";
405 }
406 static const char* description() {
407 return "Print the layout of an instance of a class, including flat fields. "
408 "The name of each class is followed by the ClassLoaderData* of its ClassLoader, "
409 "or \"null\" if loaded by the bootstrap class loader.";
410 }
411 static const char* impact() {
412 return "Medium: Depends on number of loaded classes.";
413 }
414 static const JavaPermission permission() {
415 JavaPermission p = {"java.lang.management.ManagementPermission",
416 "monitor", nullptr};
417 return p;
418 }
419 static int num_arguments();
420 virtual void execute(DCmdSource source, TRAPS);
421 };
422
423 #if INCLUDE_CDS
424 class DumpSharedArchiveDCmd: public DCmdWithParser {
425 protected:
426 DCmdArgument<char*> _suboption; // option of VM.cds
427 DCmdArgument<char*> _filename; // file name, optional
428 public:
429 static int num_arguments() { return 2; }
430 DumpSharedArchiveDCmd(outputStream* output, bool heap);
431 static const char* name() {
432 return "VM.cds";
433 }
434 static const char* description() {
435 return "Dump a static or dynamic shared archive including all shareable classes";
436 }
437 static const char* impact() {
438 return "Medium: Pause time depends on number of loaded classes";
439 }
440 static const JavaPermission permission() {
|