internal

package
v0.0.0-...-20fb975 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2020 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const DEFAULT_CAPACITY = (1 << 20)
View Source
const DEFAULT_IMAGE_GENERATOR_CAPACITY = 2048

Variables

This section is empty.

Functions

func ShannonEntropy

func ShannonEntropy(dist map[uint64]uint64, total uint64) float64

func WaitForEvent

func WaitForEvent(handler EventHandler, queue chan Event, done chan bool)

Types

type Access

type Access struct {
	AccessType flatbuffers.AccessType
	InstAddr   uint64
	DestAddr   uint64
	InstBefore uint64
}

func (*Access) VisitHandler

func (a *Access) VisitHandler(handler EventHandler)

type AccessCount

type AccessCount struct {
	NI int
	NR int
	NW int
}

type AddrSlice

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

func NewAddrSlice

func NewAddrSlice(begin, end uint) *AddrSlice

type AddrSlicing

type AddrSlicing struct {
	Total  int
	Slices []*AddrSlice
}

func ParseAddrSlicing

func ParseAddrSlicing(specStr string) (*AddrSlicing, error)

type Checkpoint

type Checkpoint struct {
	Id         string
	Pos        int
	InstBefore uint64
}

func (*Checkpoint) VisitHandler

func (c *Checkpoint) VisitHandler(handler EventHandler)

type CheckpointPos

type CheckpointPos struct {
	Checkpoint *Checkpoint
	XPos       int
}

type Event

type Event interface {
	VisitHandler(handler EventHandler)
}

type EventDispatcher

type EventDispatcher struct {
	Handlers []*EventQueue
	// contains filtered or unexported fields
}

func NewEventDispatcher

func NewEventDispatcher() *EventDispatcher

func (*EventDispatcher) AddHandler

func (e *EventDispatcher) AddHandler(handler EventHandler)

func (*EventDispatcher) Finalize

func (e *EventDispatcher) Finalize()

func (*EventDispatcher) HandleAccess

func (e *EventDispatcher) HandleAccess(access *Access) error

func (*EventDispatcher) HandleCheckpoint

func (e *EventDispatcher) HandleCheckpoint(checkpoint *Checkpoint) error

func (*EventDispatcher) HandleForked

func (e *EventDispatcher) HandleForked(forked *Forked) error

func (*EventDispatcher) Start

func (e *EventDispatcher) Start()

func (*EventDispatcher) Stop

func (e *EventDispatcher) Stop()

type EventHandler

type EventHandler interface {
	HandleAccess(access *Access) error
	HandleCheckpoint(checkpoint *Checkpoint) error
	HandleForked(forked *Forked) error
	Start()
	Stop()
	Finalize()
}

type EventLogger

type EventLogger struct {
	Events []string
}

func (*EventLogger) Finalize

func (e *EventLogger) Finalize()

func (*EventLogger) HandleAccess

func (e *EventLogger) HandleAccess(access *Access) error

func (*EventLogger) HandleCheckpoint

func (e *EventLogger) HandleCheckpoint(c *Checkpoint) error

func (*EventLogger) HandleForked

func (e *EventLogger) HandleForked(f *Forked) error

func (*EventLogger) Start

func (e *EventLogger) Start()

func (*EventLogger) Stop

func (e *EventLogger) Stop()

type EventParser

type EventParser struct {
	Handler EventHandler
	// contains filtered or unexported fields
}

func NewEventParser

func NewEventParser(h EventHandler) *EventParser

func (*EventParser) Parse

func (p *EventParser) Parse(reader *bufio.Reader) error

type EventQueue

type EventQueue struct {
	Queue chan Event
	Done  chan bool
	// contains filtered or unexported fields
}

func NewEventQueue

func NewEventQueue(handler EventHandler) *EventQueue

func (*EventQueue) Finalize

func (e *EventQueue) Finalize()

func (*EventQueue) HandleAccess

func (e *EventQueue) HandleAccess(access *Access) error

func (*EventQueue) HandleCheckpoint

func (e *EventQueue) HandleCheckpoint(checkpoint *Checkpoint) error

func (*EventQueue) HandleForked

func (e *EventQueue) HandleForked(forked *Forked) error

func (*EventQueue) Start

func (e *EventQueue) Start()

func (*EventQueue) Stop

func (e *EventQueue) Stop()

type FlatBuffersRecorder

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

func NewFlatBuffersRecorder

func NewFlatBuffersRecorder(writer io.Writer) *FlatBuffersRecorder

func (FlatBuffersRecorder) Finalize

func (f FlatBuffersRecorder) Finalize()

func (*FlatBuffersRecorder) HandleAccess

func (f *FlatBuffersRecorder) HandleAccess(access *Access) error

func (*FlatBuffersRecorder) HandleCheckpoint

func (f *FlatBuffersRecorder) HandleCheckpoint(checkpoint *Checkpoint) error

func (*FlatBuffersRecorder) HandleForked

func (f *FlatBuffersRecorder) HandleForked(forked *Forked) error

func (*FlatBuffersRecorder) Start

func (f *FlatBuffersRecorder) Start()

func (*FlatBuffersRecorder) Stop

func (f *FlatBuffersRecorder) Stop()

type Forked

type Forked struct {
	PId               uint32
	PPId              uint32
	ParentAccessCount uint64
}

func (*Forked) VisitHandler

func (f *Forked) VisitHandler(handler EventHandler)

type ImageGenerator

type ImageGenerator struct {
	Width                int
	Height               int
	InstructionPerColumn int
	AddrSlicing          *AddrSlicing

	Beta   float32
	Writer io.Writer
	// contains filtered or unexported fields
}

func NewImageGenerator

func NewImageGenerator(Height, InstructionPerColumn int, slicing *AddrSlicing) *ImageGenerator

func (*ImageGenerator) Finalize

func (i *ImageGenerator) Finalize()

func (*ImageGenerator) GenerateImage

func (i *ImageGenerator) GenerateImage() *image.RGBA

func (*ImageGenerator) HandleAccess

func (i *ImageGenerator) HandleAccess(access *Access) error

func (*ImageGenerator) HandleCheckpoint

func (i *ImageGenerator) HandleCheckpoint(checkpoint *Checkpoint) error

func (*ImageGenerator) HandleForked

func (i *ImageGenerator) HandleForked(f *Forked) error

func (*ImageGenerator) Start

func (i *ImageGenerator) Start()

func (*ImageGenerator) Stop

func (i *ImageGenerator) Stop()

type StatsConfig

type StatsConfig struct {
	AddrSlicing *AddrSlicing
}

func NewStatsConfig

func NewStatsConfig(sliceSpec string) (*StatsConfig, error)

type StreamStats

type StreamStats struct {
	Config *StatsConfig

	Writer io.Writer
	// contains filtered or unexported fields
}

func NewStreamStats

func NewStreamStats(config *StatsConfig) *StreamStats

func (*StreamStats) Finalize

func (s *StreamStats) Finalize()

func (*StreamStats) HandleAccess

func (s *StreamStats) HandleAccess(access *Access) error

func (*StreamStats) HandleCheckpoint

func (s *StreamStats) HandleCheckpoint(checkpoint *Checkpoint) error

func (*StreamStats) HandleForked

func (s *StreamStats) HandleForked(forked *Forked) error

func (*StreamStats) Start

func (s *StreamStats) Start()

func (*StreamStats) Stop

func (s *StreamStats) Stop()

func (StreamStats) WriteSummary

func (s StreamStats) WriteSummary(writer io.Writer) error

type YPositioner

type YPositioner struct {
	LayerHeight int
	Offset      int
	// contains filtered or unexported fields
}

func NewYPositioner

func NewYPositioner(slice *AddrSlice, totalHeight, totalAddrBits int) *YPositioner

func (*YPositioner) GetYPos

func (p *YPositioner) GetYPos(value uint64) int

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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