serialize.cc (4000:9bf49767a9e4) serialize.cc (4078:3f73f808bbd4)
1/*
2 * Copyright (c) 2002-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;

--- 393 unchanged lines hidden (view full) ---

402}
403
404
405bool
406Checkpoint::sectionExists(const std::string &section)
407{
408 return db->sectionExists(section);
409}
1/*
2 * Copyright (c) 2002-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;

--- 393 unchanged lines hidden (view full) ---

402}
403
404
405bool
406Checkpoint::sectionExists(const std::string &section)
407{
408 return db->sectionExists(section);
409}
410
411/** Hacked stat reset event */
412
413class StatresetParamContext : public ParamContext
414{
415 public:
416 StatresetParamContext(const string &section);
417 ~StatresetParamContext();
418 void startup();
419};
420
421StatresetParamContext statParams("statsreset");
422
423Param<Tick> reset_cycle(&statParams, "reset_cycle",
424 "Cycle to reset stats on", 0);
425
426StatresetParamContext::StatresetParamContext(const string &section)
427 : ParamContext(section)
428{ }
429
430StatresetParamContext::~StatresetParamContext()
431{
432}
433
434void
435StatresetParamContext::startup()
436{
437 if (reset_cycle > 0) {
438 Stats::SetupEvent(Stats::Reset, curTick + reset_cycle, 0);
439 cprintf("Stats reset event scheduled for %lli\n",
440 curTick + reset_cycle);
441 }
442}