utils

package
v0.0.0-...-f46da47 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2021 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ForkRunExample

func ForkRunExample(functionNumber int) int

func FreeCPointer

func FreeCPointer(p unsafe.Pointer)

func GetCPIBase

func GetCPIBase() float32

获取本机的只有L1 Hit的访问以及其他不访问内存的指令的Cycles Per Instruction

func GetL3Cap

func GetL3Cap() (numWays, numSets, lineBytes int)

func GetLowestBits

func GetLowestBits(n int) int

func GetMemAccessLatency

func GetMemAccessLatency() (l1lat, l2lat, l3lat, memLat int)

获取本机CPU的访存延迟。单位为周期

func IntListDifferent

func IntListDifferent(old, new []int) bool

func MallocCPidList

func MallocCPidList(pidList []int) unsafe.Pointer

将Go语言的pid列表转换为C的pid_t类型的列表 使用完毕后务必free,否则将会引发内存泄漏

func NumBits

func NumBits(n int) int

func ParseCTFTrace

func ParseCTFTrace(dir string) (map[int][]uint64, error)

Types

type PinBinaryReader

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

func NewPinBinaryReader

func NewPinBinaryReader(file string) (*PinBinaryReader, error)

func (*PinBinaryReader) AsyncRead

func (p *PinBinaryReader) AsyncRead() <-chan *PinBinaryRecord

func (*PinBinaryReader) ReadAll

func (p *PinBinaryReader) ReadAll() map[int][]uint64

type PinBinaryRecord

type PinBinaryRecord struct {
	Tid  int
	List []uint64
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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