xruntime

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildPath

func BuildPath() string

func Caller

func Caller() string

func CallerName

func CallerName() string

CallerName return current caller name

func SetGoGc

func SetGoGc(gc int)

SetGoGc sets the garbage collection target percentage capture initial gc percentage first if gc > 0, set gc percentage to gc. else restore initial gc percentage and return.

func Stack

func Stack(pretty bool) []byte

Stack get stacktrace with pretty format.

Types

type EmptyInterface

type EmptyInterface struct {
	Type *Type
	Data unsafe.Pointer
}

func EmptyInterfaceData

func EmptyInterfaceData(v interface{}) *EmptyInterface

type Interface

type Interface struct {
	VTable *VTable
	Data   unsafe.Pointer
}

func InterfaceData

func InterfaceData(v interface{}) *Interface

type InterfaceType

type InterfaceType struct {
	Type    Type
	PkgPath Name
	Methods []Method
}

type Method

type Method struct {
	Name NameOffset
	Type TypeOffset
}

type Name

type Name struct {
	Bytes *byte
}

type NameOffset

type NameOffset int32

type Type

type Type struct {
	Size       uintptr
	PtrData    uintptr // Size of memory prefix holding all pointers
	Hash       uint32
	TypeFlag   TypeFlag
	Align      uint8
	FieldAlign uint8
	Kind       uint8
	// function for comparing objects of this type
	// (ptr to object A, ptr to object B) -> ==?
	Equal func(unsafe.Pointer, unsafe.Pointer) bool
	// Gcdata stores the GC type data for the garbage collector.
	// If the KindGCProg bit is set in Kind, Gcdata is a GC program.
	// Otherwise it is a ptrmask bitmap. See mbitmap.go for details.
	Gcdata    *byte
	Str       NameOffset
	PtrToThis TypeOffset
}

type TypeFlag

type TypeFlag uint8

type TypeOffset

type TypeOffset int32

type VTable

type VTable struct {
	IType *InterfaceType
	Type  *Type
	Hash  uint32 // copy of _type.Hash. Used for type switches.

	Fun [1]uintptr // variable sized. Fun[0]==0 means _type does not implement IType.
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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