|
86 | 86 | [[ "$protocol_trace_enabled" == 0 || "$protocol_trace_enabled" == 1 ]] \ |
87 | 87 | || { echo "PHASE2_PROTOCOL_TRACE_ENABLED must be 0 or 1" >&2; exit 64; } |
88 | 88 | case "$spark_profile_mode" in |
89 | | - none|cpu|alloc) ;; |
90 | | - *) echo "PHASE2_SPARK_PROFILE_MODE must be none, cpu, or alloc" >&2; exit 64 ;; |
| 89 | + none|cpu|cpu-all|alloc) ;; |
| 90 | + *) echo "PHASE2_SPARK_PROFILE_MODE must be none, cpu, cpu-all, or alloc" >&2; exit 64 ;; |
91 | 91 | esac |
92 | | -if [[ "$spark_profile_mode" != none && "$scenario" != block-direct-write ]]; then |
93 | | - echo "Spark profiling is currently isolated to block-direct-write" >&2 |
| 92 | +if [[ "$spark_profile_mode" == cpu-all && \ |
| 93 | + "$scenario" != block-active && "$scenario" != block-direct-write ]]; then |
| 94 | + echo "Spark cpu-all profiling is isolated to block-active or block-direct-write" >&2 |
| 95 | + exit 64 |
| 96 | +fi |
| 97 | +if [[ "$spark_profile_mode" != none && "$spark_profile_mode" != cpu-all && \ |
| 98 | + "$scenario" != block-direct-write ]]; then |
| 99 | + echo "Spark cpu/alloc profiling is isolated to block-direct-write" >&2 |
94 | 100 | exit 64 |
95 | 101 | fi |
96 | 102 | [[ -f "$plugin_jar" && -f "$paper_jar" ]] \ |
@@ -638,6 +644,12 @@ if [[ "$spark_profile_mode" != none ]]; then |
638 | 644 | spark_profile_interval_unit="milliseconds" |
639 | 645 | spark_profile_only_ticks_over_ms="40" |
640 | 646 | ;; |
| 647 | + cpu-all) |
| 648 | + spark_profile_start_command="spark profiler start --interval 1" |
| 649 | + spark_profile_interval="1" |
| 650 | + spark_profile_interval_unit="milliseconds" |
| 651 | + spark_profile_only_ticks_over_ms="" |
| 652 | + ;; |
641 | 653 | alloc) |
642 | 654 | spark_profile_start_command="spark profiler start --alloc --interval 32768" |
643 | 655 | spark_profile_interval="32768" |
|
0 commit comments