X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fbase%2Fstats%2Fmysql.cc;h=d257de7434aba62a13584824a67016ac2d1d274b;hb=6f1187943cf78c2fd0334bd7e4372ae79a587fa4;hp=6ef173f50106de395b9f8c5344d42aeccb1f0488;hpb=f90319d3b850e6bb773b3bf8548508529970aea2;p=gem5.git diff --git a/src/base/stats/mysql.cc b/src/base/stats/mysql.cc index 6ef173f50..d257de743 100644 --- a/src/base/stats/mysql.cc +++ b/src/base/stats/mysql.cc @@ -481,9 +481,10 @@ MySql::configure(const DistInfo &info) if (!configure(info, "DIST")) return; - const DistParams *params = - safe_cast(info.storageParams); - if (params->type == Dist) { + const DistStor::Params *params = + dynamic_cast(info.storageParams); + if (params) { + assert(params->type == Dist); stat.size = params->buckets; stat.min = params->min; stat.max = params->max; @@ -498,9 +499,10 @@ MySql::configure(const VectorDistInfo &info) if (!configure(info, "VECTORDIST")) return; - const DistParams *params = - safe_cast(info.storageParams); - if (params->type == Dist) { + const DistStor::Params *params = + dynamic_cast(info.storageParams); + if (params) { + assert(params->type == Dist); stat.size = params->buckets; stat.min = params->min; stat.max = params->max; @@ -611,7 +613,7 @@ MySql::output() configure(); // store sample # - newdata.tick = curTick; + newdata.tick = curTick(); MySQL::Connection &mysql = run->conn(); @@ -834,4 +836,4 @@ initMySQL(string host, string user, string password, string database, return true; } -/* end namespace Stats */ } +} // namespace Stats