diff --git a/collectors/likwidMetric.go b/collectors/likwidMetric.go index 85bd932..de66920 100644 --- a/collectors/likwidMetric.go +++ b/collectors/likwidMetric.go @@ -133,7 +133,7 @@ func (m *LikwidCollector) Init(config json.RawMessage) error { m.meta = map[string]string{"source": m.name, "group": "PerfCounter"} cclog.ComponentDebug(m.name, "Get cpulist and init maps and lists") - cpulist := topo.CpuList() + cpulist := topo.HwthreadList() m.cpulist = make([]C.int, len(cpulist)) m.cpu2tid = make(map[int]int) for i, c := range cpulist { diff --git a/internal/metricAggregator/metricAggregatorFunctions.go b/internal/metricAggregator/metricAggregatorFunctions.go index 1fbef65..a972adc 100644 --- a/internal/metricAggregator/metricAggregatorFunctions.go +++ b/internal/metricAggregator/metricAggregatorFunctions.go @@ -246,7 +246,7 @@ func matchfunc(args ...interface{}) (interface{}, error) { func getCpuCoreFunc(args ...interface{}) (interface{}, error) { switch cpuid := args[0].(type) { case int: - return topo.GetCpuCore(cpuid), nil + return topo.GetHwthreadCore(cpuid), nil } return -1, errors.New("function 'getCpuCore' accepts only an 'int' cpuid") } @@ -255,7 +255,7 @@ func getCpuCoreFunc(args ...interface{}) (interface{}, error) { func getCpuSocketFunc(args ...interface{}) (interface{}, error) { switch cpuid := args[0].(type) { case int: - return topo.GetCpuSocket(cpuid), nil + return topo.GetHwthreadSocket(cpuid), nil } return -1, errors.New("function 'getCpuCore' accepts only an 'int' cpuid") } @@ -264,7 +264,7 @@ func getCpuSocketFunc(args ...interface{}) (interface{}, error) { func getCpuNumaDomainFunc(args ...interface{}) (interface{}, error) { switch cpuid := args[0].(type) { case int: - return topo.GetCpuNumaDomain(cpuid), nil + return topo.GetHwthreadNumaDomain(cpuid), nil } return -1, errors.New("function 'getCpuNuma' accepts only an 'int' cpuid") } @@ -273,7 +273,7 @@ func getCpuNumaDomainFunc(args ...interface{}) (interface{}, error) { func getCpuDieFunc(args ...interface{}) (interface{}, error) { switch cpuid := args[0].(type) { case int: - return topo.GetCpuDie(cpuid), nil + return topo.GetHwthreadDie(cpuid), nil } return -1, errors.New("function 'getCpuDie' accepts only an 'int' cpuid") } @@ -336,7 +336,7 @@ func getCpuListOfDieFunc(args ...interface{}) (interface{}, error) { // wrapper function to get a list of all cpuids of the node func getCpuListOfNode(args ...interface{}) (interface{}, error) { - return topo.CpuList(), nil + return topo.HwthreadList(), nil } // helper function to get the cpuid list for a CCMetric type tag set (type and type-id) @@ -348,7 +348,7 @@ func getCpuListOfType(args ...interface{}) (interface{}, error) { case string: switch typ { case "node": - return topo.CpuList(), nil + return topo.HwthreadList(), nil case "socket": return getCpuListOfSocketFunc(args[1]) case "numadomain":