cpu

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: May 28, 2019 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// CPUID EAX input values
	LEAF_EXT_FEATURE_FLAGS = 0x07
	LEAF_RDT_MONITORING    = 0x0f
	LEAF_RDT_ALLOCATION    = 0x10

	// CPUID ECX input values
	RDT_MONITORING_SUBLEAF_L3 = 1

	// CPUID bitmasks
	EXT_FEATURE_FLAGS_EBX_RDT_M                                 = 1 << 12
	EXT_FEATURE_FLAGS_EBX_RDT_A                                 = 1 << 15
	RDT_MONITORING_EDX_L3_MONITORING                            = 1 << 1
	RDT_MONITORING_SUBLEAF_L3_EDX_L3_OCCUPANCY_MONITORING       = 1 << 0
	RDT_MONITORING_SUBLEAF_L3_EDX_L3_TOTAL_BANDWIDTH_MONITORING = 1 << 1
	RDT_MONITORING_SUBLEAF_L3_EDX_L3_LOCAL_BANDWIDTH_MONITORING = 1 << 2
	RDT_ALLOCATION_EBX_L3_CACHE_ALLOCATION                      = 1 << 1
	RDT_ALLOCATION_EBX_L2_CACHE_ALLOCATION                      = 1 << 2
	RDT_ALLOCATION_EBX_MEMORY_BANDWIDTH_ALLOCATION              = 1 << 3
)
View Source
const (
	// CPUID EAX input values
	LEAF_PROCESSOR_FREQUENCY_INFORMATION = 0x16
)

Variables

View Source
var Config = NFDConfig{
	cpuidConfig{
		AttributeBlacklist: []string{
			"BMI1",
			"BMI2",
			"CLMUL",
			"CMOV",
			"CX16",
			"ERMS",
			"F16C",
			"HTT",
			"LZCNT",
			"MMX",
			"MMXEXT",
			"NX",
			"POPCNT",
			"RDRAND",
			"RDSEED",
			"RDTSCP",
			"SGX",
			"SSE",
			"SSE2",
			"SSE3",
			"SSE4.1",
			"SSE4.2",
			"SSSE3",
		},
		AttributeWhitelist: []string{},
	},
}

Config contains the configuration of the cpuid source

Functions

This section is empty.

Types

type NFDConfig

type NFDConfig struct {
	Cpuid cpuidConfig `json:"cpuid,omitempty"`
}

NFDConfig is the type holding configuration of the cpuid feature source

type Source

type Source struct{}

Implement FeatureSource interface

func (Source) Discover

func (s Source) Discover() (source.Features, error)

func (Source) Name

func (s Source) Name() string

Jump to

Keyboard shortcuts

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