Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
dcdb
dcdb
Commits
a846049d
Commit
a846049d
authored
Aug 30, 2019
by
Carla Guillen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixing compilation errors
parent
c03a71d6
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
64 additions
and
64 deletions
+64
-64
analytics/Makefile
analytics/Makefile
+6
-2
analytics/includes/DerivedMetrics.h
analytics/includes/DerivedMetrics.h
+0
-58
analytics/operators/persystsql/JobTSAggregatorConfigurator.cpp
...tics/operators/persystsql/JobTSAggregatorConfigurator.cpp
+1
-1
analytics/operators/smucngperf/SKXPMUMetrics.cpp
analytics/operators/smucngperf/SKXPMUMetrics.cpp
+34
-2
analytics/operators/smucngperf/SKXPMUMetrics.h
analytics/operators/smucngperf/SKXPMUMetrics.h
+21
-0
analytics/operators/smucngperf/SMUCNGPerfConfigurator.cpp
analytics/operators/smucngperf/SMUCNGPerfConfigurator.cpp
+1
-0
analytics/operators/smucngperf/SMUCNGPerfOperator.cpp
analytics/operators/smucngperf/SMUCNGPerfOperator.cpp
+0
-1
analytics/operators/smucngperf/SMUCNGPerfOperator.h
analytics/operators/smucngperf/SMUCNGPerfOperator.h
+1
-0
No files found.
analytics/Makefile
View file @
a846049d
...
...
@@ -4,7 +4,7 @@ include ../config.mk
CXXFLAGS
+=
-DBOOST_NETWORK_ENABLE_HTTPS
-I
../common/include
-I
$(DCDBDEPLOYPATH)
/include
-I
$(DCDBDEPLOYPATH)
/include/opencv4
LIBS
=
-L
../lib
-L
$(DCDBDEPLOYPATH)
/lib/
-ldl
-lboost_system
-lboost_thread
-lboost_log_setup
-lboost_log
-lboost_regex
-lpthread
-rdynamic
OPERATORS
=
aggregator regressor job_aggregator testeroperator filesink smucngperf
OPERATORS
=
aggregator regressor job_aggregator testeroperator filesink smucngperf
persystsql
ifeq
($(OS),Darwin)
BACNET_PORT
=
bsd
...
...
@@ -58,5 +58,9 @@ libdcdboperator_testeroperator.$(LIBEXT): operators/testeroperator/TesterOperato
libdcdboperator_filesink.$(LIBEXT)
:
operators/filesink/FilesinkOperator.o operators/filesink/FilesinkConfigurator.o ../common/src/sensornavigator.o
$(CXX)
$(LIBFLAGS)$@
-o
$@
$^
-L
$(DCDBDEPLOYPATH)
/lib/
-lboost_log
-lboost_system
-lboost_regex
libdcdboperator_smucngperf.$(LIBEXT)
:
operators/smucngperf/SMUCNGPerfOperator.o operators/smucngperf/SMUCNGPerfConfigurator.o ../common/src/sensornavigator.o
libdcdboperator_smucngperf.$(LIBEXT)
:
operators/smucngperf/SMUCNGPerfOperator.o operators/smucngperf/SMUCNGPerfConfigurator.o
operators/smucngperf/SKXPMUMetrics.o
../common/src/sensornavigator.o
$(CXX)
$(LIBFLAGS)$@
-o
$@
$^
-L
$(DCDBDEPLOYPATH)
/lib/
-lboost_log
-lboost_system
-lboost_regex
libdcdboperator_persystsql.$(LIBEXT)
:
operators/persystsql/JobTSAggregatorOperator.o operators/persystsql/JobTSAggregatorConfigurator.o ../common/src/sensornavigator.o
$(CXX)
$(LIBFLAGS)$@
-o
$@
$^
-L
$(DCDBDEPLOYPATH)
/lib/
-lboost_log
-lboost_system
-lboost_regex
analytics/includes/DerivedMetrics.h
deleted
100644 → 0
View file @
c03a71d6
/*
* DerivedMetrics.h
*
* Created on: Jul 11, 2019
* Author: carla
*/
#ifndef ANALYTICS_COMMONDERIVEDMETRICS_DERIVEDMETRICS_H_
#define ANALYTICS_COMMONDERIVEDMETRICS_DERIVEDMETRICS_H_
#include "cacheentry.h"
template
<
typename
...
Args
>
bool
getTimestampFromReadings
(
uint64_t
&
timestamp
,
Args
&
...
args
){
reading_t
readings
[]
=
{
args
...};
for
(
auto
&
reading
:
readings
){
if
(
reading
.
timestamp
!=
0
){
timestamp
=
reading
.
timestamp
;
return
true
;
}
}
return
false
;
}
/**
* For CPI, LoadsToStore, Branch rate, miss branch ratio, etc..
*/
bool
calculateMetricRatio
(
reading_t
&
dividend
,
reading_t
&
divisor
,
unsigned
int
scaling_factor
,
reading_t
&
result
)
{
if
(
divisor
.
value
>
0
){
result
.
value
=
(
dividend
.
value
/
static_cast
<
float
>
(
divisor
.
value
))
*
scaling_factor
;
return
getTimestampFromReadings
(
result
.
timestamp
,
dividend
,
divisor
);
}
return
false
;
//Division by zero
}
/** Any generic metric per second. For instance: instructions per second, l2 misses per second **/
bool
calculateMetricPerSec
(
reading_t
&
metric
,
uint64_t
interval
,
unsigned
int
scaling_factor
,
reading_t
&
result
)
{
if
(
interval
>
0
)
{
result
.
value
=
(
metric
.
value
/
static_cast
<
float
>
(
interval
))
*
scaling_factor
;
return
getTimestampFromReadings
(
result
.
timestamp
,
metric
);
}
return
false
;
//Division by zero
}
bool
calculateFrequency
(
reading_t
&
unhaltedRef
,
reading_t
&
unhaltedClocks
,
unsigned
int
min_freq
,
unsigned
int
max_freq
,
reading_t
&
result
)
{
if
(
unhaltedRef
.
value
>
0
){
result
.
value
=
(
unhaltedClocks
.
value
/
static_cast
<
float
>
(
unhaltedRef
.
value
))
*
max_freq
;
if
(
result
.
value
>
(
max_freq
*
1.1
)
||
result
.
value
<
(
min_freq
*
0.9
))
{
//There is something wrong here...
return
false
;
}
return
getTimestampFromReadings
(
result
.
timestamp
,
unhaltedRef
,
unhaltedClocks
);
}
return
false
;
//Division by zero
}
#endif
/* ANALYTICS_COMMONDERIVEDMETRICS_DERIVEDMETRICS_H_ */
analytics/operators/persystsql/JobTSAggregatorConfigurator.cpp
View file @
a846049d
...
...
@@ -93,7 +93,7 @@ bool JobTSAggregatorConfigurator::readUnits(JobTSAggregatorOperator& op,
if
(
num_quantiles
==
0
){
return
false
;
}
AggregatorSensorBase
quantsensor
;
AggregatorSensorBase
quantsensor
(
""
)
;
for
(
auto
&
sensor
:
protoOutputs
){
if
(
sensor
->
getOperation
()
==
AggregatorSensorBase
::
QTL
){
quantsensor
=
*
(
sensor
.
get
());
...
...
analytics/operators/smucngperf/SKXPMUMetrics.cpp
View file @
a846049d
...
...
@@ -28,8 +28,6 @@
#include "SKXPMUMetrics.h"
#include "../../includes/DerivedMetrics.h"
bool
calculateFlops
(
reading_t
&
scalarDB
,
reading_t
&
scalarSP
,
reading_t
&
packedDP128
,
reading_t
&
packedSP128
,
...
...
@@ -125,3 +123,37 @@ bool calculateMemoryBandwidth(std::vector<reading_t> membw_counts, reading_t & r
}
return
ret_val
;
}
/**
* For CPI, LoadsToStore, Branch rate, miss branch ratio, etc..
*/
bool
calculateMetricRatio
(
reading_t
&
dividend
,
reading_t
&
divisor
,
unsigned
int
scaling_factor
,
reading_t
&
result
)
{
if
(
divisor
.
value
>
0
){
result
.
value
=
(
dividend
.
value
/
static_cast
<
float
>
(
divisor
.
value
))
*
scaling_factor
;
return
getTimestampFromReadings
(
result
.
timestamp
,
dividend
,
divisor
);
}
return
false
;
//Division by zero
}
/** Any generic metric per second. For instance: instructions per second, l2 misses per second **/
bool
calculateMetricPerSec
(
reading_t
&
metric
,
uint64_t
interval
,
unsigned
int
scaling_factor
,
reading_t
&
result
)
{
if
(
interval
>
0
)
{
result
.
value
=
(
metric
.
value
/
static_cast
<
float
>
(
interval
))
*
scaling_factor
;
return
getTimestampFromReadings
(
result
.
timestamp
,
metric
);
}
return
false
;
//Division by zero
}
bool
calculateFrequency
(
reading_t
&
unhaltedRef
,
reading_t
&
unhaltedClocks
,
unsigned
int
min_freq
,
unsigned
int
max_freq
,
reading_t
&
result
)
{
if
(
unhaltedRef
.
value
>
0
){
result
.
value
=
(
unhaltedClocks
.
value
/
static_cast
<
float
>
(
unhaltedRef
.
value
))
*
max_freq
;
if
(
result
.
value
>
(
max_freq
*
1.1
)
||
result
.
value
<
(
min_freq
*
0.9
))
{
//There is something wrong here...
return
false
;
}
return
getTimestampFromReadings
(
result
.
timestamp
,
unhaltedRef
,
unhaltedClocks
);
}
return
false
;
//Division by zero
}
analytics/operators/smucngperf/SKXPMUMetrics.h
View file @
a846049d
...
...
@@ -30,6 +30,18 @@
#include <vector>
#include "cacheentry.h"
template
<
typename
...
Args
>
bool
getTimestampFromReadings
(
uint64_t
&
timestamp
,
Args
&
...
args
){
reading_t
readings
[]
=
{
args
...};
for
(
auto
&
reading
:
readings
){
if
(
reading
.
timestamp
!=
0
){
timestamp
=
reading
.
timestamp
;
return
true
;
}
}
return
false
;
}
bool
calculateFlops
(
reading_t
&
scalarDB
,
reading_t
&
scalarSP
,
reading_t
&
packedDP128
,
reading_t
&
packedSP128
,
reading_t
&
packedDP256
,
reading_t
&
packedSP256
,
...
...
@@ -61,6 +73,15 @@ bool calculateSP_TO_TOTAL_RATIO(reading_t &scalarDB, reading_t & scalarSP,
bool
calculateL3HitToL3MissRatio
(
reading_t
&
l3_misses
,
reading_t
&
l3_load_hits
,
reading_t
&
l3_load_misses
,
reading_t
&
result
,
unsigned
int
scaling_factor
);
bool
calculateMetricRatio
(
reading_t
&
dividend
,
reading_t
&
divisor
,
unsigned
int
scaling_factor
,
reading_t
&
result
);
/** Any generic metric per second. For instance: instructions per second, l2 misses per second **/
bool
calculateMetricPerSec
(
reading_t
&
metric
,
uint64_t
interval
,
unsigned
int
scaling_factor
,
reading_t
&
result
)
;
bool
calculateFrequency
(
reading_t
&
unhaltedRef
,
reading_t
&
unhaltedClocks
,
unsigned
int
min_freq
,
unsigned
int
max_freq
,
reading_t
&
result
);
bool
calculateMemoryBandwidth
(
std
::
vector
<
reading_t
>
membw_counts
,
reading_t
&
result
);
#endif
/* ANALYTICS_ANALYZERS_SMUCNGPERFANALYZER_SKXDERIVEDMETRICS_SKXPMUMETRICS_H_ */
analytics/operators/smucngperf/SMUCNGPerfConfigurator.cpp
View file @
a846049d
...
...
@@ -27,6 +27,7 @@
#include "SMUCNGPerfConfigurator.h"
SMUCNGPerfConfigurator
::
SMUCNGPerfConfigurator
()
:
OperatorConfiguratorTemplate
(){
_operatorName
=
"supermucngperf"
;
_baseName
=
"sensor"
;
...
...
analytics/operators/smucngperf/SMUCNGPerfOperator.cpp
View file @
a846049d
...
...
@@ -40,7 +40,6 @@
#include "../../../common/include/logging.h"
#include "../../../common/include/sensorbase.h"
#include "../../../common/include/timestamp.h"
#include "../../includes/DerivedMetrics.h"
#include "../../includes/QueryEngine.h"
#include "../../includes/UnitTemplate.h"
#include "SKXPMUMetrics.h"
...
...
analytics/operators/smucngperf/SMUCNGPerfOperator.h
View file @
a846049d
...
...
@@ -30,6 +30,7 @@
#include "../../includes/OperatorTemplate.h"
#include "SMUCSensorBase.h"
#include "SKXPMUMetrics.h"
#include <map>
class
SMUCNGPerfOperator
:
virtual
public
OperatorTemplate
<
SMUCSensorBase
>
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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