Commit d7fe4402 authored by Carla Guillen's avatar Carla Guillen
Browse files

Adding all metrics to the configuration. Please NOTE: This invalidates the...

Adding all metrics to the configuration. Please NOTE: This invalidates the previous configuration files. The names for each metric have changed and are now standard to the type Metric_t in SMUCSensorBase.
parent dd61a37a
......@@ -31,6 +31,90 @@
SMUCNGPerfConfigurator::SMUCNGPerfConfigurator() : OperatorConfiguratorTemplate(){
_operatorName = "supermucngperf";
_baseName = "sensor";
_metricMap["INSTRUCTIONS"]=SMUCSensorBase::INSTRUCTIONS;
_metricMap["CLOCKS"]=SMUCSensorBase::CLOCKS;
_metricMap["CLOCKS_REF"]=SMUCSensorBase::CLOCKS_REF;
_metricMap["USERPCT"]=SMUCSensorBase::USERPCT;
_metricMap["SYSTEMPCT"]=SMUCSensorBase::SYSTEMPCT;
_metricMap["IOWAITPCT"]=SMUCSensorBase::IOWAITPCT;
_metricMap["MEMINFO"]=SMUCSensorBase::MEMINFO;
_metricMap["IOBYTESREAD"]=SMUCSensorBase::IOBYTESREAD;
_metricMap["IOBYTESWRITE"]=SMUCSensorBase::IOBYTESWRITE;
_metricMap["IOOPENS"]=SMUCSensorBase::IOOPENS;
_metricMap["IOCLOSES"]=SMUCSensorBase::IOCLOSES;
_metricMap["IOREADS"]=SMUCSensorBase::IOREADS;
_metricMap["IOWRITES"]=SMUCSensorBase::IOWRITES;
_metricMap["NETWORK_XMIT"]=SMUCSensorBase::NETWORK_XMIT;
_metricMap["NETWORK_RCVD"]=SMUCSensorBase::NETWORK_RCVD;
_metricMap["NETWORK_XMIT_PKTS"]=SMUCSensorBase::NETWORK_XMIT_PKTS;
_metricMap["NETWORK_RCVD_PKTS"]=SMUCSensorBase::NETWORK_RCVD_PKTS;
_metricMap["L2_RQSTS_MISS"]=SMUCSensorBase::L2_RQSTS_MISS;
_metricMap["ARITH_FPU_DIVIDER_ACTIVE"]=SMUCSensorBase::ARITH_FPU_DIVIDER_ACTIVE;
_metricMap["FP_ARITH_SCALAR_DOUBLE"]=SMUCSensorBase::FP_ARITH_SCALAR_DOUBLE;
_metricMap["FP_ARITH_SCALAR_SINGLE"]=SMUCSensorBase::FP_ARITH_SCALAR_SINGLE;
_metricMap["FP_ARITH_128B_PACKED_DOUBLE"]=SMUCSensorBase::FP_ARITH_128B_PACKED_DOUBLE;
_metricMap["FP_ARITH_128B_PACKED_SINGLE"]=SMUCSensorBase::FP_ARITH_128B_PACKED_SINGLE;
_metricMap["FP_ARITH_256B_PACKED_DOUBLE"]=SMUCSensorBase::FP_ARITH_256B_PACKED_DOUBLE;
_metricMap["FP_ARITH_256B_PACKED_SINGLE"]=SMUCSensorBase::FP_ARITH_256B_PACKED_SINGLE;
_metricMap["FP_ARITH_512B_PACKED_DOUBLE"]=SMUCSensorBase::FP_ARITH_512B_PACKED_DOUBLE;
_metricMap["FP_ARITH_512B_PACKED_SINGLE"]=SMUCSensorBase::FP_ARITH_512B_PACKED_SINGLE;
_metricMap["MEM_INST_RETIRED_ALL_LOADS"]=SMUCSensorBase::MEM_INST_RETIRED_ALL_LOADS;
_metricMap["MEM_INST_RETIRED_ALL_STORES"]=SMUCSensorBase::MEM_INST_RETIRED_ALL_STORES;
_metricMap["MEM_LOAD_UOPS_RETIRED_L3_MISS"]=SMUCSensorBase::MEM_LOAD_UOPS_RETIRED_L3_MISS;
_metricMap["MEM_LOAD_RETIRED_L3_HIT"]=SMUCSensorBase::MEM_LOAD_RETIRED_L3_HIT;
_metricMap["MEM_LOAD_RETIRED_L3_MISS"]=SMUCSensorBase::MEM_LOAD_RETIRED_L3_MISS;
_metricMap["PERF_COUNT_HW_BRANCH_INSTRUCTIONS"]=SMUCSensorBase::PERF_COUNT_HW_BRANCH_INSTRUCTIONS;
_metricMap["PERF_COUNT_HW_BRANCH_MISSES"]=SMUCSensorBase::PERF_COUNT_HW_BRANCH_MISSES;
_metricMap["CORE_TEMPERATURE"]=SMUCSensorBase::CORE_TEMPERATURE;
_metricMap["CPI"]=SMUCSensorBase::CPI;
_metricMap["FREQUENCY"]=SMUCSensorBase::FREQUENCY;
_metricMap["INSTRUCTIONS_PER_SECOND"]=SMUCSensorBase::INSTRUCTIONS_PER_SECOND;
_metricMap["FLOPS"]=SMUCSensorBase::FLOPS;
_metricMap["PACKED_FLOPS"]=SMUCSensorBase::PACKED_FLOPS;
_metricMap["AVX512_TOVECTORIZED_RATIO"]=SMUCSensorBase::AVX512_TOVECTORIZED_RATIO;
_metricMap["VECTORIZED_RATIO"]=SMUCSensorBase::VECTORIZED_RATIO;
_metricMap["SINGLE_PRECISION_TO_TOTAL_RATIO"]=SMUCSensorBase::SINGLE_PRECISION_TO_TOTAL_RATIO;
_metricMap["EXPENSIVE_INSTRUCTIONS_PER_SECOND"]=SMUCSensorBase::EXPENSIVE_INSTRUCTIONS_PER_SECOND;
_metricMap["INSTR_INTRA_NODE_LOADIMBALANCE"]=SMUCSensorBase::INSTR_INTRA_NODE_LOADIMBALANCE;
_metricMap["INSTR_INTER_NODE_LOADIMBALANCE"]=SMUCSensorBase::INSTR_INTER_NODE_LOADIMBALANCE;
_metricMap["L2_HITS_PER_SECOND"]=SMUCSensorBase::L2_HITS_PER_SECOND;
_metricMap["L2_MISSES_PER_SECOND"]=SMUCSensorBase::L2_MISSES_PER_SECOND;
_metricMap["L3_HITS_PER_SECOND"]=SMUCSensorBase::L3_HITS_PER_SECOND;
_metricMap["L3_MISSES_PER_SECOND"]=SMUCSensorBase::L3_MISSES_PER_SECOND;
_metricMap["L3_TO_INSTRUCTIONS_RATIO"]=SMUCSensorBase::L3_TO_INSTRUCTIONS_RATIO;
_metricMap["L3_BANDWIDTH"]=SMUCSensorBase::L3_BANDWIDTH;
_metricMap["L3HIT_TO_L3MISS_RATIO"]=SMUCSensorBase::L3HIT_TO_L3MISS_RATIO;
_metricMap["LOADS_TO_STORES"]=SMUCSensorBase::LOADS_TO_STORES;
_metricMap["LOADS_TOL3MISS_RATIO"]=SMUCSensorBase::LOADS_TOL3MISS_RATIO;
_metricMap["MISSBRANCHES_PER_SECOND"]=SMUCSensorBase::MISSBRANCHES_PER_SECOND;
_metricMap["BRANCH_PER_INSTRUCTIONS"]=SMUCSensorBase::BRANCH_PER_INSTRUCTIONS;
_metricMap["MISSBRANCHES_TO_TOTAL_BRANCH_RATIO"]=SMUCSensorBase::MISSBRANCHES_TO_TOTAL_BRANCH_RATIO;
_metricMap["MEMORY_BANDWIDTH"]=SMUCSensorBase::MEMORY_BANDWIDTH;
_metricMap["RAPL_PKG"]=SMUCSensorBase::RAPL_PKG;
_metricMap["RAPL_MEM"]=SMUCSensorBase::RAPL_MEM;
_metricMap["IPMI_CPU"]=SMUCSensorBase::IPMI_CPU;
_metricMap["IPMI_MEM"]=SMUCSensorBase::IPMI_MEM;
_metricMap["IPMI_DC"]=SMUCSensorBase::IPMI_DC;
_metricMap["IPMI_AC"]=SMUCSensorBase::IPMI_AC;
_metricMap["NETWORK_XMIT_BYTES_PER_OP"]=SMUCSensorBase::NETWORK_XMIT_BYTES_PER_OP;
_metricMap["NETWORK_BYTES_XMIT_PER_SECOND"]=SMUCSensorBase::NETWORK_BYTES_XMIT_PER_SECOND;
_metricMap["NETWORK_RCV_BYTES_PER_OP"]=SMUCSensorBase::NETWORK_RCV_BYTES_PER_OP;
_metricMap["NETWORK_BYTES_RCVD_PER_SECOND"]=SMUCSensorBase::NETWORK_BYTES_RCVD_PER_SECOND;
_metricMap["IOOPENS_PER_SECOND"]=SMUCSensorBase::IOOPENS_PER_SECOND;
_metricMap["IOCLOSES_PER_SECOND"]=SMUCSensorBase::IOCLOSES_PER_SECOND;
_metricMap["IOBYTESREAD_PER_SECOND"]=SMUCSensorBase::IOBYTESREAD_PER_SECOND;
_metricMap["IOBYTESWRITE_PER_SECOND"]=SMUCSensorBase::IOBYTESWRITE_PER_SECOND;
_metricMap["IOREADS_PER_SECOND"]=SMUCSensorBase::IOREADS_PER_SECOND;
_metricMap["IOWRITES_PER_SECOND"]=SMUCSensorBase::IOWRITES_PER_SECOND;
_metricMap["IO_BYTES_READ_PER_OP"]=SMUCSensorBase::IO_BYTES_READ_PER_OP;
_metricMap["IO_BYTES_WRITE_PER_OP"]=SMUCSensorBase::IO_BYTES_WRITE_PER_OP;
_metricMap["IOBYTESREAD_PER_SECOND_PROF"]=SMUCSensorBase::IOBYTESREAD_PER_SECOND_PROF;
_metricMap["IOBYTESWRITE_PER_SECOND_PROF"]=SMUCSensorBase::IOBYTESWRITE_PER_SECOND_PROF;
_metricMap["IOREADS_PER_SECOND_PROF"]=SMUCSensorBase::IOREADS_PER_SECOND_PROF;
_metricMap["IOWRITES_PER_SECOND_PROF"]=SMUCSensorBase::IOWRITES_PER_SECOND_PROF;
_metricMap["IO_BYTES_READ_PER_OP_PROF"]=SMUCSensorBase::IO_BYTES_READ_PER_OP_PROF;
_metricMap["IO_BYTES_WRITE_PER_OP_PROF"]=SMUCSensorBase::IO_BYTES_WRITE_PER_OP_PROF;
}
SMUCNGPerfConfigurator::~SMUCNGPerfConfigurator() {
......@@ -50,37 +134,13 @@ void SMUCNGPerfConfigurator::sensorBase(SMUCSensorBase& s, CFG_VAL config) {
unsigned int position = std::stoul(val.second.data());
s.setPosition(position);
std::string name = s.getName();
if(endsWith(name, "instructions")) {
_metricToPosition[SMUCSensorBase::INSTRUCTIONS] = position;
s.setMetric(SMUCSensorBase::INSTRUCTIONS);
} else if(endsWith(name, "clocks") && !endsWith(name, "ref_clocks")) {
_metricToPosition[SMUCSensorBase::CLOCKS] = position;
s.setMetric(SMUCSensorBase::CLOCKS);
} else if(endsWith(name, "ref_clocks") ) {
_metricToPosition[SMUCSensorBase::CLOCKS_REF] = position;
s.setMetric(SMUCSensorBase::CLOCKS_REF);
} else if(endsWith(name, "cpi")) {
_metricToPosition[SMUCSensorBase::CPI] = position;
s.setMetric(SMUCSensorBase::CPI);
} else if(endsWith(name, "frequency")) {
_metricToPosition[SMUCSensorBase::FREQUENCY] = position;
s.setMetric(SMUCSensorBase::FREQUENCY);
} else if(endsWith(name, "instructionsps")) {
_metricToPosition[SMUCSensorBase::INSTRUCTIONS_PER_SECOND] = position;
s.setMetric(SMUCSensorBase::INSTRUCTIONS_PER_SECOND);
} else if(endsWith(name, "networkxmit")){
_metricToPosition[SMUCSensorBase::NETWORK_XMIT] = position;
s.setMetric(SMUCSensorBase::NETWORK_XMIT);
} else if(endsWith(name, "networkrcvd")){
_metricToPosition[SMUCSensorBase::NETWORK_RCVD] = position;
s.setMetric(SMUCSensorBase::NETWORK_RCVD);
} else if (endsWith(name, "networkxmitps")){
_metricToPosition[SMUCSensorBase::NETWORK_BYTES_XMIT_PER_SECOND] = position;
s.setMetric(SMUCSensorBase::NETWORK_BYTES_XMIT_PER_SECOND);
} else if (endsWith(name, "ndtworkrcvdps")){
_metricToPosition[SMUCSensorBase::NETWORK_BYTES_RCVD_PER_SECOND] = position;
s.setMetric(SMUCSensorBase::NETWORK_BYTES_RCVD_PER_SECOND);
for (auto & kv : _metricMap){
if(endsWith(name,kv.first)){
_metricToPosition[kv.second] = position;
s.setMetric(kv.second);
break;
}
}
}
}
}
......
......@@ -40,6 +40,7 @@ private:
void operatorAttributes(SMUCNGPerfOperator& op, CFG_VAL config) override;
bool unit(UnitTemplate<SMUCSensorBase>& u) override;
std::map<SMUCSensorBase::Metric_t, unsigned int> _metricToPosition;
std::map<std::string, SMUCSensorBase::Metric_t> _metricMap;
};
extern "C" OperatorConfiguratorInterface* create() {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment