tracker

package
v0.0.0-...-95e5f6d Latest Latest
Warning

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

Go to latest
Published: May 9, 2019 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PageSize = 4 << 10
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Allocation

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

type MemDependency

type MemDependency struct {
	Callidx int
	// contains filtered or unexported fields
}

Memory dependency represents the dependency of a call on a virtual memory mapping. We assume the dependency is contiguous as we will allocate pointers for arguments in a separate mmap at the beginning of the function. Moreover there are no calls which we know of that take a list of pages as arguments.

func NewMemDependency

func NewMemDependency(callidx int, usedBy Arg, start uint64, end uint64) *MemDependency

type MemoryTracker

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

func NewTracker

func NewTracker() *MemoryTracker

func (*MemoryTracker) AddAllocation

func (m *MemoryTracker) AddAllocation(call *Call, size uint64, arg Arg)

func (*MemoryTracker) AddShmRequest

func (m *MemoryTracker) AddShmRequest(call *Call, shmid uint64, size uint64)

func (*MemoryTracker) CreateMapping

func (m *MemoryTracker) CreateMapping(call *Call, callidx int, arg Arg, start uint64, end uint64)

func (*MemoryTracker) FillOutMemory

func (m *MemoryTracker) FillOutMemory(prog *Prog) error

func (*MemoryTracker) FindLatestOverlappingVMA

func (m *MemoryTracker) FindLatestOverlappingVMA(start uint64) *VirtualMapping

func (*MemoryTracker) FindShmRequest

func (m *MemoryTracker) FindShmRequest(shmid uint64) *ShmRequest

func (*MemoryTracker) GetTotalMemoryAllocations

func (m *MemoryTracker) GetTotalMemoryAllocations(prog *Prog) uint64

func (*MemoryTracker) GetTotalVMAAllocations

func (m *MemoryTracker) GetTotalVMAAllocations(prog *Prog) uint64

func (*MemoryTracker) Mappings

func (m *MemoryTracker) Mappings(start uint64, end uint64) []*VirtualMapping

func (*MemoryTracker) Simplify

func (m *MemoryTracker) Simplify(prog *Prog, distilled *Prog) *MemoryTracker

func (*MemoryTracker) TrackDependency

func (m *MemoryTracker) TrackDependency(arg Arg, start uint64, end uint64, mapping *VirtualMapping)

type ShmRequest

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

func (*ShmRequest) GetSize

func (s *ShmRequest) GetSize() uint64

type State

type State struct {
	Target      *Target
	Files       map[string][]*Call
	Resources   map[string][]Arg
	Strings     map[string]*Call
	Pages       [maxPages]bool
	Pages_      [maxPages]int
	Tracker     *MemoryTracker
	CurrentCall *Call
}

func NewState

func NewState(target *Target) *State

func (*State) Analyze

func (s *State) Analyze(c *Call)

type VirtualMapping

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

func (*VirtualMapping) AddDependency

func (vm *VirtualMapping) AddDependency(md *MemDependency)

func (*VirtualMapping) GetCall

func (vm *VirtualMapping) GetCall() *Call

func (*VirtualMapping) GetCallIdx

func (vm *VirtualMapping) GetCallIdx() int

func (*VirtualMapping) GetEnd

func (vm *VirtualMapping) GetEnd() uint64

func (*VirtualMapping) GetStart

func (vm *VirtualMapping) GetStart() uint64

func (*VirtualMapping) GetUsedBy

func (vm *VirtualMapping) GetUsedBy() []*MemDependency

Jump to

Keyboard shortcuts

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