Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
9.2.2023: Due to updates GitLab will be unavailable for some minutes between 9:00 and 11:00.
Open sidebar
dcdb
dcdb
Commits
b1651267
Commit
b1651267
authored
Jan 18, 2021
by
Carla Guillen
Browse files
formatting
parent
444b728d
Changes
1
Hide whitespace changes
Inline
Side-by-side
analytics/operators/smucngperf/SMUCNGPerfOperator.cpp
View file @
b1651267
...
...
@@ -64,41 +64,42 @@ SMUCNGPerfOperator::SMUCNGPerfOperator(const std::string& name): OperatorTemplat
_metricPerSecToId
[
SMUCSensorBase
::
IOREADS_PER_SECOND
]
=
SMUCSensorBase
::
IOREADS
;
_metricPerSecToId
[
SMUCSensorBase
::
IOWRITES_PER_SECOND
]
=
SMUCSensorBase
::
IOWRITES
;
_metricRatioToPair
.
emplace
(
std
::
piecewise_construct
,
std
::
forward_as_tuple
(
SMUCSensorBase
::
L3_TO_INSTRUCTIONS_RATIO
),
std
::
forward_as_tuple
(
SMUCSensorBase
::
MEM_LOAD_UOPS_RETIRED_L3_MISS
,
SMUCSensorBase
::
INSTRUCTIONS
));
_metricRatioToPair
.
emplace
(
std
::
piecewise_construct
,
std
::
forward_as_tuple
(
SMUCSensorBase
::
CPI
),
std
::
forward_as_tuple
(
SMUCSensorBase
::
CLOCKS
,
SMUCSensorBase
::
INSTRUCTIONS
));
_metricRatioToPair
.
emplace
(
std
::
piecewise_construct
,
std
::
forward_as_tuple
(
SMUCSensorBase
::
LOADS_TO_STORES
),
std
::
forward_as_tuple
(
SMUCSensorBase
::
MEM_INST_RETIRED_ALL_LOADS
,
SMUCSensorBase
::
MEM_INST_RETIRED_ALL_STORES
));
_metricRatioToPair
.
emplace
(
std
::
piecewise_construct
,
std
::
forward_as_tuple
(
SMUCSensorBase
::
BRANCH_PER_INSTRUCTIONS
),
std
::
forward_as_tuple
(
SMUCSensorBase
::
PERF_COUNT_HW_BRANCH_MISSES
,
SMUCSensorBase
::
INSTRUCTIONS
));
_metricRatioToPair
.
emplace
(
std
::
piecewise_construct
,
std
::
forward_as_tuple
(
SMUCSensorBase
::
MISSBRANCHES_TO_TOTAL_BRANCH_RATIO
),
std
::
forward_as_tuple
(
SMUCSensorBase
::
PERF_COUNT_HW_BRANCH_MISSES
,
SMUCSensorBase
::
PERF_COUNT_HW_BRANCH_INSTRUCTIONS
));
_metricRatioToPair
.
emplace
(
std
::
piecewise_construct
,
std
::
forward_as_tuple
(
SMUCSensorBase
::
LOADS_TOL3MISS_RATIO
),
std
::
forward_as_tuple
(
SMUCSensorBase
::
MEM_INST_RETIRED_ALL_LOADS
,
SMUCSensorBase
::
MEM_LOAD_UOPS_RETIRED_L3_MISS
));
_metricRatioToPair
.
emplace
(
std
::
piecewise_construct
,
std
::
forward_as_tuple
(
SMUCSensorBase
::
IO_BYTES_READ_PER_OP
),
std
::
forward_as_tuple
(
SMUCSensorBase
::
IOBYTESREAD
,
SMUCSensorBase
::
IOREADS
));
_metricRatioToPair
.
emplace
(
std
::
piecewise_construct
,
std
::
forward_as_tuple
(
SMUCSensorBase
::
IO_BYTES_WRITE_PER_OP
),
std
::
forward_as_tuple
(
SMUCSensorBase
::
IOBYTESWRITE
,
SMUCSensorBase
::
IOWRITES
));
_metricRatioToPair
.
emplace
(
std
::
piecewise_construct
,
std
::
forward_as_tuple
(
SMUCSensorBase
::
NETWORK_XMIT_BYTES_PER_PKT
),
std
::
forward_as_tuple
(
SMUCSensorBase
::
NETWORK_XMIT_BYTES
,
SMUCSensorBase
::
NETWORK_XMIT_PKTS
));
_metricRatioToPair
.
emplace
(
std
::
piecewise_construct
,
std
::
forward_as_tuple
(
SMUCSensorBase
::
NETWORK_RCV_BYTES_PER_PKT
),
std
::
forward_as_tuple
(
SMUCSensorBase
::
NETWORK_RCVD_BYTES
,
SMUCSensorBase
::
NETWORK_RCVD_PKTS
));
_profileMetricToMetricIds
[
SMUCSensorBase
::
IOBYTESREAD_PER_SECOND_PROF
]
=
{
SMUCSensorBase
::
IOBYTESREAD
};
_profileMetricToMetricIds
[
SMUCSensorBase
::
IOBYTESWRITE_PER_SECOND_PROF
]
=
{
SMUCSensorBase
::
IOBYTESWRITE
};
_profileMetricToMetricIds
[
SMUCSensorBase
::
IOREADS_PER_SECOND_PROF
]
=
{
SMUCSensorBase
::
IOREADS
};
_profileMetricToMetricIds
[
SMUCSensorBase
::
IOWRITES_PER_SECOND_PROF
]
=
{
SMUCSensorBase
::
IOWRITES
};
_profileMetricToMetricIds
[
SMUCSensorBase
::
IO_BYTES_READ_PER_OP_PROF
]
=
{
SMUCSensorBase
::
IOBYTESREAD
,
SMUCSensorBase
::
IOREADS
};
_profileMetricToMetricIds
[
SMUCSensorBase
::
IO_BYTES_WRITE_PER_OP_PROF
]
=
{
SMUCSensorBase
::
IOBYTESWRITE
,
SMUCSensorBase
::
IOWRITES
};
_flop_metric
=
{
SMUCSensorBase
::
FLOPS
,
SMUCSensorBase
::
PACKED_FLOPS
,
SMUCSensorBase
::
AVX512_TOVECTORIZED_RATIO
,
SMUCSensorBase
::
VECTORIZATION_RATIO
,
SMUCSensorBase
::
SINGLE_PRECISION_TO_TOTAL_RATIO
,
SMUCSensorBase
::
PACKED128_FLOPS
,
SMUCSensorBase
::
PACKED256_FLOPS
,
SMUCSensorBase
::
PACKED512_FLOPS
,
SMUCSensorBase
::
SINGLE_PRECISION_FLOPS
,
SMUCSensorBase
::
DOUBLE_PRECISION_FLOPS
};
_as_is_metric
[
SMUCSensorBase
::
USERPCT
]
=
SMUCSensorBase
::
USERPCT0
;
_as_is_metric
[
SMUCSensorBase
::
SYSTEMPCT
]
=
SMUCSensorBase
::
SYSTEMPCT0
;
_as_is_metric
[
SMUCSensorBase
::
IOWAITPCT
]
=
SMUCSensorBase
::
IOWAITPCT0
;
_metricRatioToPair
.
emplace
(
std
::
piecewise_construct
,
std
::
forward_as_tuple
(
SMUCSensorBase
::
L3_TO_INSTRUCTIONS_RATIO
),
std
::
forward_as_tuple
(
SMUCSensorBase
::
MEM_LOAD_UOPS_RETIRED_L3_MISS
,
SMUCSensorBase
::
INSTRUCTIONS
));
_metricRatioToPair
.
emplace
(
std
::
piecewise_construct
,
std
::
forward_as_tuple
(
SMUCSensorBase
::
CPI
),
std
::
forward_as_tuple
(
SMUCSensorBase
::
CLOCKS
,
SMUCSensorBase
::
INSTRUCTIONS
));
_metricRatioToPair
.
emplace
(
std
::
piecewise_construct
,
std
::
forward_as_tuple
(
SMUCSensorBase
::
LOADS_TO_STORES
),
std
::
forward_as_tuple
(
SMUCSensorBase
::
MEM_INST_RETIRED_ALL_LOADS
,
SMUCSensorBase
::
MEM_INST_RETIRED_ALL_STORES
));
_metricRatioToPair
.
emplace
(
std
::
piecewise_construct
,
std
::
forward_as_tuple
(
SMUCSensorBase
::
BRANCH_PER_INSTRUCTIONS
),
std
::
forward_as_tuple
(
SMUCSensorBase
::
PERF_COUNT_HW_BRANCH_MISSES
,
SMUCSensorBase
::
INSTRUCTIONS
));
_metricRatioToPair
.
emplace
(
std
::
piecewise_construct
,
std
::
forward_as_tuple
(
SMUCSensorBase
::
MISSBRANCHES_TO_TOTAL_BRANCH_RATIO
),
std
::
forward_as_tuple
(
SMUCSensorBase
::
PERF_COUNT_HW_BRANCH_MISSES
,
SMUCSensorBase
::
PERF_COUNT_HW_BRANCH_INSTRUCTIONS
));
_metricRatioToPair
.
emplace
(
std
::
piecewise_construct
,
std
::
forward_as_tuple
(
SMUCSensorBase
::
LOADS_TOL3MISS_RATIO
),
std
::
forward_as_tuple
(
SMUCSensorBase
::
MEM_INST_RETIRED_ALL_LOADS
,
SMUCSensorBase
::
MEM_LOAD_UOPS_RETIRED_L3_MISS
));
_metricRatioToPair
.
emplace
(
std
::
piecewise_construct
,
std
::
forward_as_tuple
(
SMUCSensorBase
::
IO_BYTES_READ_PER_OP
),
std
::
forward_as_tuple
(
SMUCSensorBase
::
IOBYTESREAD
,
SMUCSensorBase
::
IOREADS
));
_metricRatioToPair
.
emplace
(
std
::
piecewise_construct
,
std
::
forward_as_tuple
(
SMUCSensorBase
::
IO_BYTES_WRITE_PER_OP
),
std
::
forward_as_tuple
(
SMUCSensorBase
::
IOBYTESWRITE
,
SMUCSensorBase
::
IOWRITES
));
_metricRatioToPair
.
emplace
(
std
::
piecewise_construct
,
std
::
forward_as_tuple
(
SMUCSensorBase
::
NETWORK_XMIT_BYTES_PER_PKT
),
std
::
forward_as_tuple
(
SMUCSensorBase
::
NETWORK_XMIT_BYTES
,
SMUCSensorBase
::
NETWORK_XMIT_PKTS
));
_metricRatioToPair
.
emplace
(
std
::
piecewise_construct
,
std
::
forward_as_tuple
(
SMUCSensorBase
::
NETWORK_RCV_BYTES_PER_PKT
),
std
::
forward_as_tuple
(
SMUCSensorBase
::
NETWORK_RCVD_BYTES
,
SMUCSensorBase
::
NETWORK_RCVD_PKTS
));
_profileMetricToMetricIds
[
SMUCSensorBase
::
IOBYTESREAD_PER_SECOND_PROF
]
=
{
SMUCSensorBase
::
IOBYTESREAD
};
_profileMetricToMetricIds
[
SMUCSensorBase
::
IOBYTESWRITE_PER_SECOND_PROF
]
=
{
SMUCSensorBase
::
IOBYTESWRITE
};
_profileMetricToMetricIds
[
SMUCSensorBase
::
IOREADS_PER_SECOND_PROF
]
=
{
SMUCSensorBase
::
IOREADS
};
_profileMetricToMetricIds
[
SMUCSensorBase
::
IOWRITES_PER_SECOND_PROF
]
=
{
SMUCSensorBase
::
IOWRITES
};
_profileMetricToMetricIds
[
SMUCSensorBase
::
IO_BYTES_READ_PER_OP_PROF
]
=
{
SMUCSensorBase
::
IOBYTESREAD
,
SMUCSensorBase
::
IOREADS
};
_profileMetricToMetricIds
[
SMUCSensorBase
::
IO_BYTES_WRITE_PER_OP_PROF
]
=
{
SMUCSensorBase
::
IOBYTESWRITE
,
SMUCSensorBase
::
IOWRITES
};
_flop_metric
=
{
SMUCSensorBase
::
FLOPS
,
SMUCSensorBase
::
PACKED_FLOPS
,
SMUCSensorBase
::
AVX512_TOVECTORIZED_RATIO
,
SMUCSensorBase
::
VECTORIZATION_RATIO
,
SMUCSensorBase
::
SINGLE_PRECISION_TO_TOTAL_RATIO
,
SMUCSensorBase
::
PACKED128_FLOPS
,
SMUCSensorBase
::
PACKED256_FLOPS
,
SMUCSensorBase
::
PACKED512_FLOPS
,
SMUCSensorBase
::
SINGLE_PRECISION_FLOPS
,
SMUCSensorBase
::
DOUBLE_PRECISION_FLOPS
};
_as_is_metric
[
SMUCSensorBase
::
USERPCT
]
=
SMUCSensorBase
::
USERPCT0
;
_as_is_metric
[
SMUCSensorBase
::
SYSTEMPCT
]
=
SMUCSensorBase
::
SYSTEMPCT0
;
_as_is_metric
[
SMUCSensorBase
::
IOWAITPCT
]
=
SMUCSensorBase
::
IOWAITPCT0
;
}
SMUCNGPerfOperator
::~
SMUCNGPerfOperator
()
{
...
...
@@ -246,7 +247,6 @@ void SMUCNGPerfOperator::computeProfileMetric(std::vector<SMUCNGPtr>& inputs, SM
result
.
timestamp
=
_buffers
[
0
][
0
].
timestamp
;
outSensor
->
storeReading
(
result
);
}
}
void
SMUCNGPerfOperator
::
computeLOADIMBALANCES
(
std
::
vector
<
SMUCNGPtr
>&
inputs
,
SMUCNGPtr
&
outSensor
,
const
uint64_t
timestamp
){
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment