Skip to content

Commit c2bca93

Browse files
committed
show performance debug options only when debug help is requested
1 parent e9197a5 commit c2bca93

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

graalpython/com.oracle.graal.python.shell/src/com/oracle/graal/python/shell/GraalPythonMain.java

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -533,15 +533,12 @@ protected void printHelp(OptionCategory maxCategory) {
533533
// "- : program read from stdin (default; interactive mode if a tty)\n" +
534534
"arg ...: arguments passed to program in sys.argv[1:]\n" +
535535
"\n" +
536-
"Arguments specific to GraalPython.\n" +
537-
"--show-version : print the Python version number and continue.\n" +
538-
"-CC : run the C compiler used for generating GraalPython C extensions.\n" +
539-
" All following arguments are passed to the compiler.\n" +
540-
"-LD : run the linker used for generating GraalPython C extensions.\n" +
541-
" All following arguments are passed to the linker.\n" +
542-
"-debug-perf : Enable tracing of Truffle compilations and its warnings\n" +
543-
"-dump : Enable dumping of compilation graphs to IGV\n" +
544-
"-compile-truffle-immediately : Start compiling on first invocation and throw compilation exceptions\n" +
536+
"Arguments specific to GraalPython:\n" +
537+
"--show-version : print the Python version number and continue.\n" +
538+
"-CC : run the C compiler used for generating GraalPython C extensions.\n" +
539+
" All following arguments are passed to the compiler.\n" +
540+
"-LD : run the linker used for generating GraalPython C extensions.\n" +
541+
" All following arguments are passed to the linker.\n" +
545542
"\n" +
546543
"Other environment variables:\n" +
547544
"PYTHONSTARTUP: file executed on interactive startup (no default)\n" +
@@ -555,6 +552,12 @@ protected void printHelp(OptionCategory maxCategory) {
555552
" as specifying the -R option: a random value is used to seed the hashes of\n" +
556553
" str, bytes and datetime objects. It can also be set to an integer\n" +
557554
" in the range [0,4294967295] to get hash values with a predictable seed.");
555+
if (maxCategory.compareTo(OptionCategory.DEBUG) >= 0) {
556+
print("\nGraalPython performance debugging options:\n" +
557+
"-debug-perf : Enable tracing of Truffle compilations and its warnings\n" +
558+
"-dump : Enable dumping of compilation graphs to IGV\n" +
559+
"-compile-truffle-immediately : Start compiling on first invocation and throw compilation exceptions");
560+
}
558561
}
559562

560563
@Override

0 commit comments

Comments
 (0)