From c9352ce2281411f2807950dcae377ed9243f731c Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Fri, 6 Nov 2020 23:43:47 +0100 Subject: [PATCH] Check for more throughput values. --- extra/uarch/uarch.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/extra/uarch/uarch.cpp b/extra/uarch/uarch.cpp index b3ab0283..504e9b93 100644 --- a/extra/uarch/uarch.cpp +++ b/extra/uarch/uarch.cpp @@ -152,7 +152,11 @@ int main() auto& uai = uav[uaidx]; auto& opi = uai.ops[opidx]; - float tp = measurement.attribute( "TP" ) ? atof( measurement.attribute( "TP" ).value() ) : -1; + float tp = -1; + if( measurement.attribute( "TP" ) ) tp = atof( measurement.attribute( "TP" ).value() ); + else if( measurement.attribute( "TP_ports" ) ) tp = atof( measurement.attribute( "TP_ports" ).value() ); + else if( measurement.attribute( "TP_unrolled" ) ) tp = atof( measurement.attribute( "TP_unrolled" ).value() ); + int portid = measurement.attribute( "ports" ) ? ports.Get( measurement.attribute( "ports" ).value() ) : -1; int uops = measurement.attribute( "uops" ) ? atoi( measurement.attribute( "uops" ).value() ) : -1; assert( tp != -1 && uops != -1 );