blob: abc92f19bf26a7191399eabba8ffc3aae9df36ae (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
// Author: arnej
package jvm
import (
"github.com/vespa-engine/vespa/client/go/internal/admin/defaults"
)
func (opts *Options) AddCommonXX() {
crashDir := defaults.UnderVespaHome("var/crash")
errorFile := crashDir + "/hs_err_pid%p.log"
opts.fixSpec.FixDir(crashDir)
opts.AddOption("-XX:+PreserveFramePointer")
opts.AddOption("-XX:+HeapDumpOnOutOfMemoryError")
opts.AddOption("-XX:HeapDumpPath=" + crashDir)
opts.AddOption("-XX:ErrorFile=" + errorFile)
opts.AddOption("-XX:+ExitOnOutOfMemoryError")
// not common after all:
opts.AddOption("-XX:MaxJavaStackTraceDepth=1000000")
// Aid debugging for slight cost in performance
opts.AddOption("-XX:-OmitStackTraceInFastThrow")
}
|