735 JDK's java.util.regex package. Set this property to "joni" to install |
735 JDK's java.util.regex package. Set this property to "joni" to install |
736 an implementation based on Joni, the regular expression engine used by |
736 an implementation based on Joni, the regular expression engine used by |
737 the JRuby project. The default value for this flag is "joni" |
737 the JRuby project. The default value for this flag is "joni" |
738 |
738 |
739 |
739 |
740 SYSTEM PROPERTY: -Dnashorn.time |
|
741 |
|
742 This enables timers for various phases of script compilation. The timers |
|
743 will be dumped when the Nashorn process exits. We see a percentage value |
|
744 of how much time was spent not executing bytecode (i.e. compilation and |
|
745 internal tasks) at the end of the report. |
|
746 |
|
747 Here is an example: |
|
748 |
|
749 [JavaScript Parsing] 61 ms |
|
750 [Constant Folding] 11 ms |
|
751 [Control Flow Lowering] 26 ms |
|
752 [Type Attribution] 81 ms |
|
753 [Range Analysis] 0 ms |
|
754 [Code Splitting] 29 ms |
|
755 [Type Finalization] 19 ms |
|
756 [Bytecode Generation] 189 ms |
|
757 [Code Installation] 7 ms |
|
758 Total runtime: 508 ms (Non-runtime: 423 ms [83%]) |
|
759 |
|
760 =============== |
740 =============== |
761 2. The loggers. |
741 2. The loggers. |
762 =============== |
742 =============== |
763 |
743 |
764 It is very simple to create your own logger. Use the DebugLogger class |
744 It is very simple to create your own logger. Use the DebugLogger class |
885 getter and setter in the program, show arguments, return values |
865 getter and setter in the program, show arguments, return values |
886 etc. It will also show the internal representation of respective field |
866 etc. It will also show the internal representation of respective field |
887 (Object in the normal case, unless running with the dual field |
867 (Object in the normal case, unless running with the dual field |
888 representation) |
868 representation) |
889 |
869 |
|
870 * time |
|
871 |
|
872 This enables timers for various phases of script compilation. The timers |
|
873 will be dumped when the Nashorn process exits. We see a percentage value |
|
874 of how much time was spent not executing bytecode (i.e. compilation and |
|
875 internal tasks) at the end of the report. |
|
876 |
|
877 A finer level than "info" will show individual compilation timings as they |
|
878 happen. |
|
879 |
|
880 Here is an example: |
|
881 |
|
882 [time] Accumulated complation phase Timings: |
|
883 [time] |
|
884 [time] 'JavaScript Parsing' 1076 ms |
|
885 [time] 'Constant Folding' 159 ms |
|
886 [time] 'Control Flow Lowering' 303 ms |
|
887 [time] 'Program Point Calculation' 282 ms |
|
888 [time] 'Builtin Replacement' 71 ms |
|
889 [time] 'Code Splitting' 670 ms |
|
890 [time] 'Symbol Assignment' 474 ms |
|
891 [time] 'Scope Depth Computation' 249 ms |
|
892 [time] 'Optimistic Type Assignment' 186 ms |
|
893 [time] 'Local Variable Type Calculation' 526 ms |
|
894 [time] 'Bytecode Generation' 5177 ms |
|
895 [time] 'Class Installation' 1854 ms |
|
896 [time] |
|
897 [time] Total runtime: 11994 ms (Non-runtime: 11027 ms [91%]) |
890 |
898 |
891 ======================= |
899 ======================= |
892 3. Undocumented options |
900 3. Undocumented options |
893 ======================= |
901 ======================= |
894 |
902 |