diff options
| author | zerninv <zerninvasilii@yandex.ru> | 2024-01-31 16:44:50 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-01-31 17:44:50 +0100 |
| commit | 11a89d6cb81c513a9c1624740a97b43fc737417b (patch) | |
| tree | 6319b6783b6d77c105f2aa7f6cc5d9012add984d /calculate_average_zerninv.sh | |
| parent | e2ee4cbc30fb010097ab4fd3100d72e3e0d47239 (diff) | |
Attempt to fix segfault CalculateAverage_zerninv.java (#635)
* attempt to fix segfault, graal native
* fix last bytes for last line handler
* fix typo
* one more attempt
Diffstat (limited to 'calculate_average_zerninv.sh')
| -rwxr-xr-x | calculate_average_zerninv.sh | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/calculate_average_zerninv.sh b/calculate_average_zerninv.sh index 2b76c7d..6dbda30 100755 --- a/calculate_average_zerninv.sh +++ b/calculate_average_zerninv.sh @@ -15,5 +15,11 @@ # limitations under the License. # -JAVA_OPTS="--enable-preview" -java $JAVA_OPTS --class-path target/average-1.0.0-SNAPSHOT.jar dev.morling.onebrc.CalculateAverage_zerninv
\ No newline at end of file +if [ -f target/CalculateAverage_zerninv_image ]; then + echo "Picking up existing native image 'target/CalculateAverage_zerninv_image', delete the file to select JVM mode." 1>&2 + target/CalculateAverage_zerninv_image +else + JAVA_OPTS="--enable-preview -Xmx512m -XX:+UseSerialGC -XX:-TieredCompilation" + echo "Chosing to run the app in JVM mode as no native image was found, use prepare_zerninv.sh to generate." 1>&2 + java $JAVA_OPTS --class-path target/average-1.0.0-SNAPSHOT.jar dev.morling.onebrc.CalculateAverage_zerninv +fi
\ No newline at end of file |
