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; --- 178 unchanged lines hidden (view full) --- 187 if (!(flags & Stats::init)) { 188#ifdef DEBUG 189 cprintf("this is stat number %d\n", id); 190#endif 191 panic("Not all stats have been initialized"); 192 return false; 193 } 194 |
195 if ((flags & display) && name.empty()) { |
196 panic("all printable stats must be named"); 197 return false; 198 } 199 200 return true; 201} 202 203void --- 122 unchanged lines hidden (view full) --- 326 assert(info); 327 if (!info->check() || !info->baseCheck()) 328 panic("stat check failed for '%s' %d\n", info->name, info->id); 329 } 330 331 off_t j = 0; 332 for (i = statsList().begin(); i != end; ++i) { 333 Info *info = *i; |
334 if (!(info->flags & display)) |
335 info->name = "__Stat" + to_string(j++); 336 } 337 338 statsList().sort(Info::less); 339 340 for (i = statsList().begin(); i != end; ++i) { 341 Info *info = *i; 342 info->enable(); --- 38 unchanged lines hidden --- |