From 838273a196c66f3c6ee834ae865db14f313ef1bc Mon Sep 17 00:00:00 2001 From: Nathan Binkert Date: Mon, 28 Jun 2004 16:49:35 -0400 Subject: fix up the recordEvent stuff to support ignoring events arch/alpha/ev5.cc: cpu/simple_cpu/simple_cpu.cc: update for new event interface base/stats/events.cc: implement the ignore event function which matches sim objects from which to ignore events. Make insert event like insert data and make it able to insert many events in a single transaction with the database. base/stats/events.hh: Make it possible to ignore events sim/sim_object.cc: make recordEvent a member function of SimObject to implement the ignore function easily sim/sim_object.hh: implement the ignore event stuff in the sim object. This is a bit of a hack, but an easy place to put it. --HG-- extra : convert_revision : ba3f25a14ad03662c53fb35514860d69be8cd4f0 --- sim/sim_object.cc | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'sim/sim_object.cc') diff --git a/sim/sim_object.cc b/sim/sim_object.cc index cab629f8d..39219b500 100644 --- a/sim/sim_object.cc +++ b/sim/sim_object.cc @@ -32,6 +32,7 @@ #include "base/inifile.hh" #include "base/misc.hh" #include "base/trace.hh" +#include "base/stats/events.hh" #include "sim/configfile.hh" #include "sim/host.hh" #include "sim/sim_object.hh" @@ -58,6 +59,7 @@ SimObject::SimObjectList SimObject::simObjectList; SimObject::SimObject(const string &_name) : objName(_name) { + doRecordEvent = !Stats::ignoreEvent(_name); simObjectList.push_back(this); } @@ -170,4 +172,11 @@ SimObject::serializeAll(ostream &os) } } +void +SimObject::recordEvent(const std::string &stat) +{ + if (doRecordEvent) + Stats::recordEvent(stat); +} + DEFINE_SIM_OBJECT_CLASS_NAME("SimObject", SimObject) -- cgit v1.2.3