manager

package module
v0.0.0-...-ce9e244 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2021 License: MIT Imports: 21 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AlignedBlock

func AlignedBlock(blockSize int) []byte

AlignedBlock returns []byte of size BlockSize aligned to a multiple of alignSize in memory (must be power of two)

Types

type MemoryManager

type MemoryManager struct {
	sync.Mutex
	MemoryManagerCfg
	// contains filtered or unexported fields
}

MemoryManager Serves page faults coming from VMs

func NewMemoryManager

func NewMemoryManager(cfg MemoryManagerCfg) *MemoryManager

NewMemoryManager Initializes a new memory manager

func (*MemoryManager) Activate

func (m *MemoryManager) Activate(vmID string) error

Activate Creates an epoller to serve page faults for the VM

func (*MemoryManager) Deactivate

func (m *MemoryManager) Deactivate(vmID string) error

Deactivate Removes the epoller which serves page faults for the VM

func (*MemoryManager) DeregisterVM

func (m *MemoryManager) DeregisterVM(vmID string) error

DeregisterVM Deregisters a VM from the memory manager

func (*MemoryManager) DumpUPFLatencyStats

func (m *MemoryManager) DumpUPFLatencyStats(vmID, functionName, latencyOutFilePath string) error

DumpUPFLatencyStats Dumps latency stats collected for the VM

func (*MemoryManager) DumpUPFPageStats

func (m *MemoryManager) DumpUPFPageStats(vmID, functionName, metricsOutFilePath string) error

DumpUPFPageStats Saves the per VM stats

func (*MemoryManager) FetchState

func (m *MemoryManager) FetchState(vmID string) error

FetchState Fetches the working set file (or the whole guest memory) and the VMM state file

func (*MemoryManager) GetUPFLatencyStats

func (m *MemoryManager) GetUPFLatencyStats(vmID string) ([]*metrics.Metric, error)

GetUPFLatencyStats Returns the gathered metrics for the VM

func (*MemoryManager) RegisterVM

func (m *MemoryManager) RegisterVM(cfg SnapshotStateCfg) error

RegisterVM Registers a VM within the memory manager

type MemoryManagerCfg

type MemoryManagerCfg struct {
	MetricsModeOn bool
}

MemoryManagerCfg Global config of the manager

type Record

type Record struct {
	// contains filtered or unexported fields
}

Record A tuple with an address

type SnapshotState

type SnapshotState struct {
	SnapshotStateCfg
	// contains filtered or unexported fields
}

SnapshotState Stores the state of the snapshot of the VM.

func NewSnapshotState

func NewSnapshotState(cfg SnapshotStateCfg) *SnapshotState

NewSnapshotState Initializes a snapshot state

type SnapshotStateCfg

type SnapshotStateCfg struct {
	VMID string

	VMMStatePath, GuestMemPath, WorkingSetPath string

	InstanceSockAddr string
	BaseDir          string // base directory for the instance
	MetricsPath      string // path to csv file where the metrics should be stored
	IsLazyMode       bool
	GuestMemSize     int
	// contains filtered or unexported fields
}

SnapshotStateCfg Config to initialize SnapshotState

type Trace

type Trace struct {
	sync.Mutex
	// contains filtered or unexported fields
}

Trace Contains records

func (*Trace) AppendRecord

func (t *Trace) AppendRecord(r Record)

AppendRecord Appends a record to the trace

func (*Trace) ProcessRecord

func (t *Trace) ProcessRecord(GuestMemPath, WorkingSetPath string)

ProcessRecord Prepares the trace, the regions map, and the working set file for replay Must be called when record is done (i.e., it is not concurrency-safe vs. AppendRecord)

func (*Trace) WriteTrace

func (t *Trace) WriteTrace()

WriteTrace Writes all the records to a file

Jump to

Keyboard shortcuts

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