summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNathan Binkert <nate@binkert.org>2010-06-14 23:24:46 -0700
committerNathan Binkert <nate@binkert.org>2010-06-14 23:24:46 -0700
commit54d813adcaf6d5eda4040c20bae1706b0a78324b (patch)
treef0a6062071673958771183320e5ddd7a8deca42d /src
parent420402c0a314f515ff1e84d6c6da4892e006c92e (diff)
downloadgem5-54d813adcaf6d5eda4040c20bae1706b0a78324b.tar.xz
stats: get rid of the never-really-used event stuff
Diffstat (limited to 'src')
-rw-r--r--src/arch/alpha/ev5.cc1
-rw-r--r--src/base/SConscript1
-rw-r--r--src/base/stats/events.cc62
-rw-r--r--src/base/stats/events.hh62
-rw-r--r--src/base/stats/mysql.cc111
-rw-r--r--src/base/stats/mysql.hh25
-rw-r--r--src/base/stats/output.hh1
-rw-r--r--src/base/stats/text.hh3
-rw-r--r--src/cpu/ozone/back_end.hh8
-rw-r--r--src/cpu/ozone/inorder_back_end.hh16
-rw-r--r--src/cpu/simple/base.cc1
-rw-r--r--src/sim/faults.cc1
-rw-r--r--src/sim/sim_object.cc7
-rw-r--r--src/sim/sim_object.hh3
14 files changed, 1 insertions, 301 deletions
diff --git a/src/arch/alpha/ev5.cc b/src/arch/alpha/ev5.cc
index 3056fc3d0..609b45957 100644
--- a/src/arch/alpha/ev5.cc
+++ b/src/arch/alpha/ev5.cc
@@ -36,7 +36,6 @@
#include "arch/alpha/tlb.hh"
#include "base/cp_annotate.hh"
#include "base/debug.hh"
-#include "base/stats/events.hh"
#include "config/full_system.hh"
#include "cpu/base.hh"
#include "cpu/simple_thread.hh"
diff --git a/src/base/SConscript b/src/base/SConscript
index bdc711ed1..9ddeb8705 100644
--- a/src/base/SConscript
+++ b/src/base/SConscript
@@ -75,7 +75,6 @@ Source('loader/object_file.cc')
Source('loader/raw_object.cc')
Source('loader/symtab.cc')
-Source('stats/events.cc')
Source('stats/output.cc')
Source('stats/text.cc')
Source('stats/visit.cc')
diff --git a/src/base/stats/events.cc b/src/base/stats/events.cc
deleted file mode 100644
index 29117b1e2..000000000
--- a/src/base/stats/events.cc
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Copyright (c) 2004-2005 The Regents of The University of Michigan
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met: redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer;
- * redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution;
- * neither the name of the copyright holders nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * Authors: Nathan Binkert
- */
-
-#include <vector>
-
-#include "base/stats/events.hh"
-#include "base/stats/output.hh"
-#include "base/types.hh"
-
-using namespace std;
-
-namespace Stats {
-
-Tick EventStart = MaxTick;
-
-extern list<Output *> OutputList;
-
-#if USE_MYSQL
-void
-__event(const string &event)
-{
- list<Output *>::iterator i = OutputList.begin();
- list<Output *>::iterator end = OutputList.end();
- for (; i != end; ++i) {
- Output *output = *i;
- if (!output->valid())
- continue;
-
- output->event(event);
- }
-}
-
-#endif
-
-/* namespace Stats */ }
diff --git a/src/base/stats/events.hh b/src/base/stats/events.hh
deleted file mode 100644
index 8ba9cece5..000000000
--- a/src/base/stats/events.hh
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Copyright (c) 2004-2005 The Regents of The University of Michigan
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met: redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer;
- * redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution;
- * neither the name of the copyright holders nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * Authors: Nathan Binkert
- */
-
-#ifndef __BASE_STATS_EVENTS_HH__
-#define __BASE_STATS_EVENTS_HH__
-
-#include <string>
-
-#include "base/trace.hh"
-#include "config/use_mysql.hh"
-
-namespace Stats {
-
-extern Tick EventStart;
-
-#if USE_MYSQL
-void __event(const std::string &stat);
-#else
-inline void __event(const std::string &stat) {}
-#endif
-
-inline void
-recordEvent(const std::string &stat)
-{
- if (EventStart > curTick)
- return;
-
- DPRINTF(StatEvents, "Statistics Event: %s\n", stat);
-
- __event(stat);
-}
-
-/* namespace Stats */ }
-
-#endif // __BASE_STATS_EVENTS_HH__
diff --git a/src/base/stats/mysql.cc b/src/base/stats/mysql.cc
index cfac9a226..91ab6dc15 100644
--- a/src/base/stats/mysql.cc
+++ b/src/base/stats/mysql.cc
@@ -150,22 +150,6 @@ MySqlRun::cleanup()
if (mysql.commit())
panic("could not commit transaction\n%s\n", mysql.error);
-
- mysql.query("DELETE events"
- "FROM events"
- "LEFT JOIN runs ON ev_run=rn_id"
- "WHERE rn_id IS NULL");
-
- if (mysql.commit())
- panic("could not commit transaction\n%s\n", mysql.error);
-
- mysql.query("DELETE event_names"
- "FROM event_names"
- "LEFT JOIN events ON en_id=ev_event"
- "WHERE ev_event IS NULL");
-
- if (mysql.commit())
- panic("could not commit transaction\n%s\n", mysql.error);
}
void
@@ -347,93 +331,6 @@ InsertData::insert()
data);
}
-InsertEvent::InsertEvent(MySqlRun *_run)
- : run(_run)
-{
- query = new char[maxsize + 1];
- size = 0;
- first = true;
- flush();
-}
-
-InsertEvent::~InsertEvent()
-{
- flush();
-}
-
-void
-InsertEvent::insert(const string &stat)
-{
- MySQL::Connection &mysql = run->conn();
- assert(mysql.connected());
-
- event_map_t::iterator i = events.find(stat);
- uint32_t event;
- if (i == events.end()) {
- mysql.query(
- csprintf("SELECT en_id "
- "from event_names "
- "where en_name=\"%s\"",
- stat));
-
- MySQL::Result result = mysql.store_result();
- if (!result)
- panic("could not get a run\n%s\n", mysql.error);
-
- assert(result.num_fields() == 1);
- MySQL::Row row = result.fetch_row();
- if (row) {
- if (!to_number(row[0], event))
- panic("invalid event id: %s\n", row[0]);
- } else {
- mysql.query(
- csprintf("INSERT INTO "
- "event_names(en_name)"
- "values(\"%s\")",
- stat));
-
- if (mysql.error)
- panic("could not get a run\n%s\n", mysql.error);
-
- event = mysql.insert_id();
- }
- } else {
- event = (*i).second;
- }
-
- if (size + 1024 > maxsize)
- flush();
-
- if (!first) {
- query[size++] = ',';
- query[size] = '\0';
- }
-
- first = false;
-
- size += sprintf(query + size, "(%u,%u,%llu)",
- event, run->run(), (unsigned long long)curTick);
-}
-
-void
-InsertEvent::flush()
-{
- static const char query_header[] = "INSERT INTO "
- "events(ev_event, ev_run, ev_tick)"
- "values";
-
- MySQL::Connection &mysql = run->conn();
- assert(mysql.connected());
-
- if (size)
- mysql.query(query);
-
- query[0] = '\0';
- size = sizeof(query_header);
- first = true;
- memcpy(query, query_header, size);
-}
-
struct InsertSubData
{
uint16_t stat;
@@ -465,7 +362,7 @@ InsertSubData::setup(MySqlRun *run)
}
MySql::MySql()
- : run(new MySqlRun), newdata(run), newevent(run)
+ : run(new MySqlRun), newdata(run)
{}
MySql::~MySql()
@@ -730,12 +627,6 @@ MySql::output()
}
void
-MySql::event(const std::string &event)
-{
- newevent.insert(event);
-}
-
-void
MySql::output(const ScalarInfo &info)
{
if (!(info.flags & print))
diff --git a/src/base/stats/mysql.hh b/src/base/stats/mysql.hh
index 45fda2982..687f030f2 100644
--- a/src/base/stats/mysql.hh
+++ b/src/base/stats/mysql.hh
@@ -92,27 +92,6 @@ class InsertData
void insert();
};
-class InsertEvent
-{
- private:
- char *query;
- size_type size;
- bool first;
- static const size_type maxsize = 1024*1024;
-
- typedef std::map<std::string, uint32_t> event_map_t;
- event_map_t events;
-
- MySqlRun *run;
-
- public:
- InsertEvent(MySqlRun *_run);
- ~InsertEvent();
-
- void flush();
- void insert(const std::string &stat);
-};
-
class MySql : public Output
{
protected:
@@ -121,7 +100,6 @@ class MySql : public Output
SetupStat stat;
InsertData newdata;
- InsertEvent newevent;
std::list<FormulaInfo *> formulas;
bool configured;
@@ -167,9 +145,6 @@ class MySql : public Output
virtual bool valid() const;
virtual void output();
- // Implement Event Output
- virtual void event(const std::string &event);
-
protected:
// Output helper
void output(const ScalarInfo &info);
diff --git a/src/base/stats/output.hh b/src/base/stats/output.hh
index c7ffcaade..4fe93791f 100644
--- a/src/base/stats/output.hh
+++ b/src/base/stats/output.hh
@@ -42,7 +42,6 @@ struct Output : public Visit
inline void operator()() { output(); }
virtual void output() = 0;
virtual bool valid() const = 0;
- virtual void event(const std::string &event) = 0;
};
/* namespace Stats */ }
diff --git a/src/base/stats/text.hh b/src/base/stats/text.hh
index 04b914ae9..0cb66ded8 100644
--- a/src/base/stats/text.hh
+++ b/src/base/stats/text.hh
@@ -71,9 +71,6 @@ class Text : public Output
// Implement Output
virtual bool valid() const;
virtual void output();
-
- // Implement Event Output
- virtual void event(const std::string &event) {}
};
bool initText(const std::string &filename, bool desc);
diff --git a/src/cpu/ozone/back_end.hh b/src/cpu/ozone/back_end.hh
index ca858ce2e..d8afb1526 100644
--- a/src/cpu/ozone/back_end.hh
+++ b/src/cpu/ozone/back_end.hh
@@ -492,10 +492,6 @@ BackEnd<Impl>::read(RequestPtr req, T &data, int load_idx)
}
}
*/
-/*
- if (!dcacheInterface && (memReq->isUncacheable()))
- recordEvent("Uncached Read");
-*/
return LSQ.read(req, data, load_idx);
}
@@ -533,10 +529,6 @@ BackEnd<Impl>::write(RequestPtr req, T &data, int store_idx)
if (res && (fault == NoFault))
*res = memReq->result;
*/
-/*
- if (!dcacheInterface && (memReq->isUncacheable()))
- recordEvent("Uncached Write");
-*/
return LSQ.write(req, data, store_idx);
}
diff --git a/src/cpu/ozone/inorder_back_end.hh b/src/cpu/ozone/inorder_back_end.hh
index f242645a2..28e02bafb 100644
--- a/src/cpu/ozone/inorder_back_end.hh
+++ b/src/cpu/ozone/inorder_back_end.hh
@@ -229,10 +229,6 @@ InorderBackEnd<Impl>::read(Addr addr, T &data, unsigned flags)
DPRINTF(IBE, "Dcache hit!\n");
}
}
-/*
- if (!dcacheInterface && (memReq->isUncacheable()))
- recordEvent("Uncached Read");
-*/
return fault;
}
@@ -269,10 +265,6 @@ InorderBackEnd<Impl>::write(T data, Addr addr, unsigned flags, uint64_t *res)
if (res && (fault == NoFault))
*res = memReq->result;
-/*
- if (!dcacheInterface && (memReq->isUncacheable()))
- recordEvent("Uncached Write");
-*/
return fault;
}
@@ -313,10 +305,6 @@ InorderBackEnd<Impl>::read(MemReqPtr &req, T &data, int load_idx)
}
}
-/*
- if (!dcacheInterface && (req->isUncacheable()))
- recordEvent("Uncached Read");
-*/
return NoFault;
}
@@ -390,10 +378,6 @@ InorderBackEnd<Impl>::write(MemReqPtr &req, T &data, int store_idx)
if (res && (fault == NoFault))
*res = req->result;
*/
-/*
- if (!dcacheInterface && (req->isUncacheable()))
- recordEvent("Uncached Write");
-*/
return NoFault;
}
diff --git a/src/cpu/simple/base.cc b/src/cpu/simple/base.cc
index 7f40138d2..d7fc81de6 100644
--- a/src/cpu/simple/base.cc
+++ b/src/cpu/simple/base.cc
@@ -49,7 +49,6 @@
#include "base/misc.hh"
#include "base/pollevent.hh"
#include "base/range.hh"
-#include "base/stats/events.hh"
#include "base/trace.hh"
#include "base/types.hh"
#include "config/the_isa.hh"
diff --git a/src/sim/faults.cc b/src/sim/faults.cc
index 6149a8335..10f0b9a66 100644
--- a/src/sim/faults.cc
+++ b/src/sim/faults.cc
@@ -46,7 +46,6 @@ void FaultBase::invoke(ThreadContext * tc)
void FaultBase::invoke(ThreadContext * tc)
{
DPRINTF(Fault, "Fault %s at PC: %#x\n", name(), tc->readPC());
- tc->getCpuPtr()->recordEvent(csprintf("Fault %s", name()));
assert(!tc->misspeculating());
}
diff --git a/src/sim/sim_object.cc b/src/sim/sim_object.cc
index f7f539774..c66d766f9 100644
--- a/src/sim/sim_object.cc
+++ b/src/sim/sim_object.cc
@@ -35,7 +35,6 @@
#include "base/inifile.hh"
#include "base/match.hh"
#include "base/misc.hh"
-#include "base/stats/events.hh"
#include "base/trace.hh"
#include "base/types.hh"
#include "sim/sim_object.hh"
@@ -220,12 +219,6 @@ debugObjectBreak(const char *objs)
}
#endif
-void
-SimObject::recordEvent(const std::string &stat)
-{
- Stats::recordEvent(stat);
-}
-
unsigned int
SimObject::drain(Event *drain_event)
{
diff --git a/src/sim/sim_object.hh b/src/sim/sim_object.hh
index d6d08f255..3a96cf8f6 100644
--- a/src/sim/sim_object.hh
+++ b/src/sim/sim_object.hh
@@ -136,9 +136,6 @@ class SimObject
* char* rather than std::string to make it callable from gdb.
*/
static SimObject *find(const char *name);
-
- public:
- void recordEvent(const std::string &stat);
};
#endif // __SIM_OBJECT_HH__