[project] cross-platform launcher: correcting the -XX:HeapDumpPath value

Unlike `-XX:ErrorFile`, it doesn't support the '%p' placeholder for PID, and having multiple heap dumps is bothersome.

GitOrigin-RevId: 5a3954ba34b8ea8eab458f1d464079253464bc8d
This commit is contained in:
Roman Shevchenko
2023-06-21 12:51:06 +02:00
committed by intellij-monorepo-bot
parent a277ed82d3
commit 597a7f5b5b

View File

@@ -45,7 +45,7 @@ impl LaunchConfiguration for DefaultLaunchConfiguration {
let user_home_path = get_user_home()?.to_string_checked()?;
let slash = std::path::MAIN_SEPARATOR;
vm_options.push(format!("-XX:ErrorFile={user_home_path}{slash}java_error_in_{}_%p.log", self.launcher_base_name));
vm_options.push(format!("-XX:HeapDumpPath={user_home_path}{slash}java_error_in_{}_%p.hprof", self.launcher_base_name));
vm_options.push(format!("-XX:HeapDumpPath={user_home_path}{slash}java_error_in_{}.hprof", self.launcher_base_name));
// collecting JVM options from user and distribution files
self.collect_vm_options_from_files(&mut vm_options)?;