diff options
author | Nathan Binkert <binkertn@umich.edu> | 2004-05-23 12:53:34 -0400 |
---|---|---|
committer | Nathan Binkert <binkertn@umich.edu> | 2004-05-23 12:53:34 -0400 |
commit | 3a0dfc43d19255a04c74ef1b1017e978bc5b8796 (patch) | |
tree | cedd703b4501d46e77fbf3e6c91fa245c54f2371 /base/stats/mysql.cc | |
parent | 6cf04bf31e97cde528ad7eee18abdf64fcdfde42 (diff) | |
download | gem5-3a0dfc43d19255a04c74ef1b1017e978bc5b8796.tar.xz |
make the interaction of the stats event stuff with the
database work better.
base/stats/events.cc:
properly connect to the database
base/stats/mysql.cc:
cleanup the event stuff too
--HG--
extra : convert_revision : f05fd6456decc9c4f95beff5c12497439e45f886
Diffstat (limited to 'base/stats/mysql.cc')
-rw-r--r-- | base/stats/mysql.cc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/base/stats/mysql.cc b/base/stats/mysql.cc index 05808c211..77366beb0 100644 --- a/base/stats/mysql.cc +++ b/base/stats/mysql.cc @@ -134,6 +134,16 @@ MySqlRun::cleanup() "FROM bins " "LEFT JOIN data ON bn_id=dt_bin " "WHERE dt_bin IS NULL"); + + mysql.query("DELETE events" + "FROM events" + "LEFT JOIN runs ON ev_run=rn_id" + "WHERE rn_id IS NULL"); + + mysql.query("DELETE event_names" + "FROM event_names" + "LEFT JOIN events ON en_id=ev_event" + "WHERE ev_event IS NULL"); } void |