Documentation
¶
Index ¶
- func AlignedBlock(blockSize int) []byte
- type MemoryManager
- func (m *MemoryManager) Activate(vmID string) error
- func (m *MemoryManager) Deactivate(vmID string) error
- func (m *MemoryManager) DeregisterVM(vmID string) error
- func (m *MemoryManager) DumpUPFLatencyStats(vmID, functionName, latencyOutFilePath string) error
- func (m *MemoryManager) DumpUPFPageStats(vmID, functionName, metricsOutFilePath string) error
- func (m *MemoryManager) FetchState(vmID string) error
- func (m *MemoryManager) GetUPFLatencyStats(vmID string) ([]*metrics.Metric, error)
- func (m *MemoryManager) RegisterVM(cfg SnapshotStateCfg) error
- type MemoryManagerCfg
- type Record
- type SnapshotState
- type SnapshotStateCfg
- type Trace
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AlignedBlock ¶
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 ¶
Trace Contains records
func (*Trace) AppendRecord ¶
AppendRecord Appends a record to the trace
func (*Trace) ProcessRecord ¶
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)