debug

package
v0.38.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 14, 2025 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Overview

Package debug is a very partially implemented package to allow compilation.

Package debug is a very partially implemented package to allow compilation.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FreeOSMemory added in v0.38.0

func FreeOSMemory()

func PrintStack added in v0.27.0

func PrintStack()

PrintStack prints to standard error the stack trace returned by runtime.Stack.

Not implemented.

func ReadGCStats added in v0.38.0

func ReadGCStats(stats *GCStats)

func SetGCPercent added in v0.28.0

func SetGCPercent(n int) int

Not implemented.

func SetMaxStack

func SetMaxStack(n int) int

SetMaxStack sets the maximum amount of memory that can be used by a single goroutine stack.

Not implemented.

func SetMaxThreads added in v0.38.0

func SetMaxThreads(threads int) int

func SetMemoryLimit added in v0.38.0

func SetMemoryLimit(limit int64) int64

func SetPanicOnFault added in v0.38.0

func SetPanicOnFault(enabled bool) bool

func SetTraceback added in v0.38.0

func SetTraceback(level string)

func Stack

func Stack() []byte

Stack returns a formatted stack trace of the goroutine that calls it.

Not implemented.

func WriteHeapDump added in v0.38.0

func WriteHeapDump(fd uintptr)

Types

type BuildInfo added in v0.23.0

type BuildInfo struct {
	GoVersion string    // version of the Go toolchain that built the binary, e.g. "go1.19.2"
	Path      string    // The main package path
	Main      Module    // The module containing the main package
	Deps      []*Module // Module dependencies
	Settings  []BuildSetting
}

BuildInfo represents the build information read from the running binary.

func ReadBuildInfo added in v0.23.0

func ReadBuildInfo() (info *BuildInfo, ok bool)

ReadBuildInfo returns the build information embedded in the running binary. The information is available only in binaries built with module support.

Not implemented.

func (*BuildInfo) String added in v0.33.0

func (bi *BuildInfo) String() string

type BuildSetting added in v0.28.0

type BuildSetting struct {
	// Key and Value describe the build setting.
	// Key must not contain an equals sign, space, tab, or newline.
	// Value must not contain newlines ('\n').
	Key, Value string
}

type GCStats added in v0.38.0

type GCStats struct {
	LastGC         time.Time
	NumGC          int64
	PauseTotal     time.Duration
	Pause          []time.Duration
	PauseEnd       []time.Time
	PauseQuantiles []time.Duration
}

type Module added in v0.23.0

type Module struct {
	Path    string  // module path
	Version string  // module version
	Sum     string  // checksum
	Replace *Module // replaced by this module
}

Module represents a module.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL