1/* 2 * Copyright (c) 2003-2005 The Regents of The University of Michigan 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 18 unchanged lines hidden (view full) --- 27 * 28 * Authors: Nathan Binkert 29 */ 30 31#include <iomanip> 32#include <fstream> 33#include <list> 34#include <map> |
35#include <set> |
36#include <string> 37 38#include "base/callback.hh" 39#include "base/cprintf.hh" 40#include "base/debug.hh" 41#include "base/hostinfo.hh" 42#include "base/misc.hh" 43#include "base/statistics.hh" --- 126 unchanged lines hidden (view full) --- 170 if ((flags & print) && name.empty()) { 171 panic("all printable stats must be named"); 172 return false; 173 } 174 175 return true; 176} 177 |
178void 179Info::enable() 180{ 181} |
182 |
183void 184VectorInfoBase::enable() 185{ 186 size_type s = size(); 187 if (subnames.size() < s) 188 subnames.resize(s); 189 if (subdescs.size() < s) 190 subdescs.resize(s); 191} 192 193void 194VectorDistInfoBase::enable() 195{ 196 size_type s = size(); 197 if (subnames.size() < s) 198 subnames.resize(s); 199 if (subdescs.size() < s) 200 subdescs.resize(s); 201} 202 203void 204Vector2dInfoBase::enable() 205{ 206 if (subnames.size() < x) 207 subnames.resize(x); 208 if (subdescs.size() < x) 209 subdescs.resize(x); 210 if (y_subnames.size() < y) 211 y_subnames.resize(y); 212} 213 |
214Formula::Formula() 215{ 216 setInit(); 217} 218 219Formula::Formula(Temp r) 220{ 221 root = r; --- 53 unchanged lines hidden (view full) --- 275 VResult vec; 276 result(vec); 277 for (off_t i = 0; i < vec.size(); ++i) 278 if (vec[i] != 0.0) 279 return false; 280 return true; 281} 282 |
283string 284Formula::str() const 285{ 286 return root ? root->str() : ""; 287} 288 289void |
290enable() |
291{ 292 typedef list<Info *>::iterator iter_t; 293 294 iter_t i, end = statsList().end(); 295 for (i = statsList().begin(); i != end; ++i) { 296 Info *info = *i; 297 assert(info); 298 if (!info->check() || !info->baseCheck()) --- 4 unchanged lines hidden (view full) --- 303 for (i = statsList().begin(); i != end; ++i) { 304 Info *info = *i; 305 if (!(info->flags & print)) 306 info->name = "__Stat" + to_string(j++); 307 } 308 309 statsList().sort(Info::less); 310 |
311 for (i = statsList().begin(); i != end; ++i) { |
312 Info *info = *i; 313 info->enable(); 314 } 315} |
316 |
317void 318prepare() 319{ 320 list<Info *>::iterator i = statsList().begin(); 321 list<Info *>::iterator end = statsList().end(); 322 while (i != end) { 323 Info *info = *i; 324 info->prepare(); 325 ++i; |
326 } 327} 328 329CallbackQueue resetQueue; 330 331void 332reset() 333{ --- 18 unchanged lines hidden --- |