Documentation ¶
Index ¶
- Constants
- Variables
- func MatchDirectMemory(s string) bool
- func MatchHeap(s string) bool
- func MatchMetaspace(s string) bool
- func MatchReservedCodeCache(s string) bool
- func MatchStack(s string) bool
- func ParseUnit(u string) (int64, error)
- type Calculator
- type DirectMemory
- type HeadRoom
- type Heap
- type MemoryRegions
- func (m MemoryRegions) AllRegionsSize(threadCount int) (Size, error)
- func (m MemoryRegions) AllRegionsString(threadCount int) string
- func (m MemoryRegions) FixedRegionsSize(threadCount int) (Size, error)
- func (m MemoryRegions) FixedRegionsString(threadCount int) string
- func (m MemoryRegions) NonHeapRegionsSize(threadCount int) (Size, error)
- func (m MemoryRegions) NonHeapRegionsString(threadCount int) string
- type Metaspace
- type Provenance
- type ReservedCodeCache
- type Size
- type Stack
Constants ¶
View Source
const ( ClassSize = int64(5_800) ClassOverhead = int64(14_000_000) )
View Source
const ( Unknown Provenance = iota Default UserConfigured Calculated Kibi = int64(1_024) Mebi = 1_024 * Kibi Gibi = 1_024 * Mebi Tebi = 1_024 * Gibi SizePattern = "([\\d]+)([kmgtKMGT]?)" )
Variables ¶
View Source
var ( DefaultDirectMemory = DirectMemory{Value: 10 * Mebi, Provenance: Default} DirectMemoryRE = regexp.MustCompile(fmt.Sprintf("^-XX:MaxDirectMemorySize=(%s)$", SizePattern)) )
View Source
var ( DefaultReservedCodeCache = ReservedCodeCache{Value: 240 * Mebi, Provenance: Default} ReservedCodeCacheRE = regexp.MustCompile(fmt.Sprintf("^-XX:ReservedCodeCacheSize=(%s)$", SizePattern)) )
View Source
var ( DefaultStack = Stack{Value: 1 * Mebi, Provenance: Default} StackRE = regexp.MustCompile(fmt.Sprintf("^-Xss(%s)$", SizePattern)) )
View Source
var HeapRE = regexp.MustCompile(fmt.Sprintf("^-Xmx(%s)$", SizePattern))
View Source
var MetaspaceRE = regexp.MustCompile(fmt.Sprintf("^-XX:MaxMetaspaceSize=(%s)$", SizePattern))
View Source
var SizeRE = regexp.MustCompile(fmt.Sprintf("^%s$", SizePattern))
Functions ¶
func MatchDirectMemory ¶
func MatchMetaspace ¶
func MatchReservedCodeCache ¶
func MatchStack ¶
Types ¶
type Calculator ¶
func (Calculator) Calculate ¶
func (c Calculator) Calculate(flags string) (MemoryRegions, error)
type DirectMemory ¶
type DirectMemory Size
func ParseDirectMemory ¶
func ParseDirectMemory(s string) (DirectMemory, error)
func (DirectMemory) String ¶
func (d DirectMemory) String() string
type MemoryRegions ¶
type MemoryRegions struct { DirectMemory DirectMemory HeadRoom *HeadRoom Heap *Heap Metaspace *Metaspace ReservedCodeCache ReservedCodeCache Stack Stack }
func NewMemoryRegionsFromFlags ¶
func NewMemoryRegionsFromFlags(flags string) (MemoryRegions, error)
func (MemoryRegions) AllRegionsSize ¶
func (m MemoryRegions) AllRegionsSize(threadCount int) (Size, error)
func (MemoryRegions) AllRegionsString ¶
func (m MemoryRegions) AllRegionsString(threadCount int) string
func (MemoryRegions) FixedRegionsSize ¶
func (m MemoryRegions) FixedRegionsSize(threadCount int) (Size, error)
func (MemoryRegions) FixedRegionsString ¶
func (m MemoryRegions) FixedRegionsString(threadCount int) string
func (MemoryRegions) NonHeapRegionsSize ¶
func (m MemoryRegions) NonHeapRegionsSize(threadCount int) (Size, error)
func (MemoryRegions) NonHeapRegionsString ¶
func (m MemoryRegions) NonHeapRegionsString(threadCount int) string
type Provenance ¶
type Provenance uint8
type ReservedCodeCache ¶
type ReservedCodeCache Size
func ParseReservedCodeCache ¶
func ParseReservedCodeCache(s string) (ReservedCodeCache, error)
func (ReservedCodeCache) String ¶
func (r ReservedCodeCache) String() string
Click to show internal directories.
Click to hide internal directories.