@@ -44,6 +44,7 @@ class HelpDCmd : public DCmdWithParser {
44
44
DCmdArgument<bool > _all;
45
45
DCmdArgument<char *> _cmd;
46
46
public:
47
+ static int num_arguments () { return 2 ; }
47
48
HelpDCmd (outputStream* output, bool heap);
48
49
static const char * name () { return " help" ; }
49
50
static const char * description () {
@@ -113,6 +114,7 @@ class PrintVMFlagsDCmd : public DCmdWithParser {
113
114
protected:
114
115
DCmdArgument<bool > _all;
115
116
public:
117
+ static int num_arguments () { return 1 ; }
116
118
PrintVMFlagsDCmd (outputStream* output, bool heap);
117
119
static const char * name () { return " VM.flags" ; }
118
120
static const char * description () {
@@ -135,6 +137,7 @@ class SetVMFlagDCmd : public DCmdWithParser {
135
137
DCmdArgument<char *> _value;
136
138
137
139
public:
140
+ static int num_arguments () { return 2 ; }
138
141
SetVMFlagDCmd (outputStream* output, bool heap);
139
142
static const char * name () { return " VM.set_flag" ; }
140
143
static const char * description () {
@@ -176,6 +179,7 @@ class JVMTIAgentLoadDCmd : public DCmdWithParser {
176
179
DCmdArgument<char *> _libpath;
177
180
DCmdArgument<char *> _option;
178
181
public:
182
+ static int num_arguments () { return 2 ; }
179
183
JVMTIAgentLoadDCmd (outputStream* output, bool heap);
180
184
static const char * name () { return " JVMTI.agent_load" ; }
181
185
static const char * description () {
@@ -216,6 +220,7 @@ class VMUptimeDCmd : public DCmdWithParser {
216
220
protected:
217
221
DCmdArgument<bool > _date;
218
222
public:
223
+ static int num_arguments () { return 1 ; }
219
224
VMUptimeDCmd (outputStream* output, bool heap);
220
225
static const char * name () { return " VM.uptime" ; }
221
226
static const char * description () {
@@ -316,6 +321,7 @@ class HeapDumpDCmd : public DCmdWithParser {
316
321
DCmdArgument<jlong> _gzip;
317
322
DCmdArgument<bool > _overwrite;
318
323
public:
324
+ static int num_arguments () { return 4 ; }
319
325
HeapDumpDCmd (outputStream* output, bool heap);
320
326
static const char * name () {
321
327
return " GC.heap_dump" ;
@@ -342,6 +348,7 @@ class ClassHistogramDCmd : public DCmdWithParser {
342
348
DCmdArgument<bool > _all;
343
349
DCmdArgument<jlong> _parallel_thread_num;
344
350
public:
351
+ static int num_arguments () { return 2 ; }
345
352
ClassHistogramDCmd (outputStream* output, bool heap);
346
353
static const char * name () {
347
354
return " GC.class_histogram" ;
@@ -366,6 +373,7 @@ class ClassHierarchyDCmd : public DCmdWithParser {
366
373
DCmdArgument<bool > _print_subclasses; // true if subclasses of the specified classname should be printed.
367
374
DCmdArgument<char *> _classname; // Optional single class name whose hierarchy should be printed.
368
375
public:
376
+ static int num_arguments () { return 3 ; }
369
377
ClassHierarchyDCmd (outputStream* output, bool heap);
370
378
static const char * name () {
371
379
return " VM.class_hierarchy" ;
@@ -392,6 +400,7 @@ class DumpSharedArchiveDCmd: public DCmdWithParser {
392
400
DCmdArgument<char *> _suboption; // option of VM.cds
393
401
DCmdArgument<char *> _filename; // file name, optional
394
402
public:
403
+ static int num_arguments () { return 2 ; }
395
404
DumpSharedArchiveDCmd (outputStream* output, bool heap);
396
405
static const char * name () {
397
406
return " VM.cds" ;
@@ -407,7 +416,6 @@ class DumpSharedArchiveDCmd: public DCmdWithParser {
407
416
" monitor" , nullptr };
408
417
return p;
409
418
}
410
- static int num_arguments ();
411
419
virtual void execute (DCmdSource source, TRAPS);
412
420
};
413
421
#endif // INCLUDE_CDS
@@ -418,6 +426,7 @@ class ThreadDumpDCmd : public DCmdWithParser {
418
426
DCmdArgument<bool > _locks;
419
427
DCmdArgument<bool > _extended;
420
428
public:
429
+ static int num_arguments () { return 2 ; }
421
430
ThreadDumpDCmd (outputStream* output, bool heap);
422
431
static const char * name () { return " Thread.print" ; }
423
432
static const char * description () {
@@ -469,6 +478,8 @@ class JMXStartRemoteDCmd : public DCmdWithParser {
469
478
DCmdArgument<char *> _jdp_name;
470
479
471
480
public:
481
+ static int num_arguments () { return 21 ; }
482
+
472
483
JMXStartRemoteDCmd (outputStream *output, bool heap_allocated);
473
484
474
485
static const char *name () {
@@ -632,6 +643,7 @@ class CodeHeapAnalyticsDCmd : public DCmdWithParser {
632
643
DCmdArgument<char *> _function;
633
644
DCmdArgument<jlong> _granularity;
634
645
public:
646
+ static int num_arguments () { return 2 ; }
635
647
CodeHeapAnalyticsDCmd (outputStream* output, bool heap);
636
648
static const char * name () {
637
649
return " Compiler.CodeHeap_Analytics" ;
@@ -696,6 +708,7 @@ class CompilerDirectivesAddDCmd : public DCmdWithParser {
696
708
protected:
697
709
DCmdArgument<char *> _filename;
698
710
public:
711
+ static int num_arguments () { return 1 ; }
699
712
CompilerDirectivesAddDCmd (outputStream* output, bool heap);
700
713
static const char * name () {
701
714
return " Compiler.directives_add" ;
@@ -781,6 +794,7 @@ class SymboltableDCmd : public DCmdWithParser {
781
794
protected:
782
795
DCmdArgument<bool > _verbose;
783
796
public:
797
+ static int num_arguments () { return 1 ; }
784
798
SymboltableDCmd (outputStream* output, bool heap);
785
799
static const char * name () {
786
800
return " VM.symboltable" ;
@@ -803,6 +817,7 @@ class StringtableDCmd : public DCmdWithParser {
803
817
protected:
804
818
DCmdArgument<bool > _verbose;
805
819
public:
820
+ static int num_arguments () { return 1 ; }
806
821
StringtableDCmd (outputStream* output, bool heap);
807
822
static const char * name () {
808
823
return " VM.stringtable" ;
@@ -825,6 +840,7 @@ class SystemDictionaryDCmd : public DCmdWithParser {
825
840
protected:
826
841
DCmdArgument<bool > _verbose;
827
842
public:
843
+ static int num_arguments () { return 1 ; }
828
844
SystemDictionaryDCmd (outputStream* output, bool heap);
829
845
static const char * name () {
830
846
return " VM.systemdictionary" ;
@@ -847,6 +863,7 @@ class ClassesDCmd : public DCmdWithParser {
847
863
protected:
848
864
DCmdArgument<bool > _verbose;
849
865
public:
866
+ static int num_arguments () { return 1 ; }
850
867
ClassesDCmd (outputStream* output, bool heap);
851
868
static const char * name () {
852
869
return " VM.classes" ;
@@ -891,6 +908,7 @@ class EventLogDCmd : public DCmdWithParser {
891
908
DCmdArgument<char *> _log;
892
909
DCmdArgument<char *> _max;
893
910
public:
911
+ static int num_arguments () { return 2 ; }
894
912
EventLogDCmd (outputStream* output, bool heap);
895
913
static const char * name () {
896
914
return " VM.events" ;
@@ -917,6 +935,7 @@ class ThreadDumpToFileDCmd : public DCmdWithParser {
917
935
DCmdArgument<char *> _format;
918
936
DCmdArgument<char *> _filepath;
919
937
public:
938
+ static int num_arguments () { return 3 ; }
920
939
ThreadDumpToFileDCmd (outputStream *output, bool heap);
921
940
static const char *name () {
922
941
return " Thread.dump_to_file" ;
@@ -931,7 +950,6 @@ class ThreadDumpToFileDCmd : public DCmdWithParser {
931
950
JavaPermission p = {" java.lang.management.ManagementPermission" , " monitor" , nullptr };
932
951
return p;
933
952
}
934
- static int num_arguments ();
935
953
virtual void execute (DCmdSource source, TRAPS);
936
954
};
937
955
0 commit comments