367 DCmdArgument<char*> _classname; // Optional single class name whose hierarchy should be printed.
368 public:
369 ClassHierarchyDCmd(outputStream* output, bool heap);
370 static const char* name() {
371 return "VM.class_hierarchy";
372 }
373 static const char* description() {
374 return "Print a list of all loaded classes, indented to show the class hierarchy. "
375 "The name of each class is followed by the ClassLoaderData* of its ClassLoader, "
376 "or \"null\" if loaded by the bootstrap class loader.";
377 }
378 static const char* impact() {
379 return "Medium: Depends on number of loaded classes.";
380 }
381 static const JavaPermission permission() {
382 JavaPermission p = {"java.lang.management.ManagementPermission",
383 "monitor", NULL};
384 return p;
385 }
386 virtual void execute(DCmdSource source, TRAPS);
387 };
388
389 class TouchedMethodsDCmd : public DCmd {
390 public:
391 TouchedMethodsDCmd(outputStream* output, bool heap) : DCmd(output, heap) {}
392 static const char* name() {
393 return "VM.print_touched_methods";
394 }
395 static const char* description() {
396 return "Print all methods that have ever been touched during the lifetime of this JVM.";
397 }
398 static const char* impact() {
399 return "Medium: Depends on Java content.";
400 }
401 virtual void execute(DCmdSource source, TRAPS);
402 };
403
404 #if INCLUDE_CDS
405 class DumpSharedArchiveDCmd: public DCmdWithParser {
406 protected:
|
367 DCmdArgument<char*> _classname; // Optional single class name whose hierarchy should be printed.
368 public:
369 ClassHierarchyDCmd(outputStream* output, bool heap);
370 static const char* name() {
371 return "VM.class_hierarchy";
372 }
373 static const char* description() {
374 return "Print a list of all loaded classes, indented to show the class hierarchy. "
375 "The name of each class is followed by the ClassLoaderData* of its ClassLoader, "
376 "or \"null\" if loaded by the bootstrap class loader.";
377 }
378 static const char* impact() {
379 return "Medium: Depends on number of loaded classes.";
380 }
381 static const JavaPermission permission() {
382 JavaPermission p = {"java.lang.management.ManagementPermission",
383 "monitor", NULL};
384 return p;
385 }
386 virtual void execute(DCmdSource source, TRAPS);
387 };
388
389 class PrintClassLayoutDCmd : public DCmdWithParser {
390 protected:
391 DCmdArgument<char*> _classname; // lass name whose layout should be printed.
392 public:
393 PrintClassLayoutDCmd(outputStream* output, bool heap);
394 static const char* name() {
395 return "VM.class_print_layout";
396 }
397 static const char* description() {
398 return "Print the layout of an instance of a class, including inlined fields. "
399 "The name of each class is followed by the ClassLoaderData* of its ClassLoader, "
400 "or \"null\" if loaded by the bootstrap class loader.";
401 }
402 static const char* impact() {
403 return "Medium: Depends on number of loaded classes.";
404 }
405 static const JavaPermission permission() {
406 JavaPermission p = {"java.lang.management.ManagementPermission",
407 "monitor", NULL};
408 return p;
409 }
410 static int num_arguments();
411 virtual void execute(DCmdSource source, TRAPS);
412 };
413
414 class TouchedMethodsDCmd : public DCmd {
415 public:
416 TouchedMethodsDCmd(outputStream* output, bool heap) : DCmd(output, heap) {}
417 static const char* name() {
418 return "VM.print_touched_methods";
419 }
420 static const char* description() {
421 return "Print all methods that have ever been touched during the lifetime of this JVM.";
422 }
423 static const char* impact() {
424 return "Medium: Depends on Java content.";
425 }
426 virtual void execute(DCmdSource source, TRAPS);
427 };
428
429 #if INCLUDE_CDS
430 class DumpSharedArchiveDCmd: public DCmdWithParser {
431 protected:
|