1/*
2 * Copyright (c) 2004-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;
9 * redistributions in binary form must reproduce the above copyright
--- 11 unchanged lines hidden (view full) ---
21 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 *
28 * Authors: Nathan Binkert
29 */
30
31// This file will contain default statistics for the simulator that
32// don't really belong to a specific simulator object
33
34#include <fstream>
35#include <iostream>
36#include <list>
--- 19 unchanged lines hidden (view full) ---
56Stats::Value finalTick;
57Stats::Value simFreq;
58
59namespace Stats {
60
61Time statTime(true);
62Tick startTick;
63
64struct SimTicksReset : public Callback
65{
66 void process()
67 {
68 statTime.setTimer();
69 startTick = curTick();
70 }
71};
--- 121 unchanged lines hidden (view full) ---
193}
194
195void
196initSimStats()
197{
198 static Global global;
199}
200
201class StatEvent : public Event
202{
203 private:
204 bool dump;
205 bool reset;
206 Tick repeat;
207
208 public:
--- 16 unchanged lines hidden (view full) ---
225 Stats::schedStatEvent(dump, reset, curTick() + repeat, repeat);
226 }
227 }
228};
229
230void
231schedStatEvent(bool dump, bool reset, Tick when, Tick repeat)
232{
233 Event *event = new StatEvent(dump, reset, repeat);
234 mainEventQueue.schedule(event, when);
235}
236
237} // namespace Stats
2 * Copyright (c) 2004-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;
9 * redistributions in binary form must reproduce the above copyright
--- 11 unchanged lines hidden (view full) ---
21 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 *
28 * Authors: Nathan Binkert
29 */
30
31// This file will contain default statistics for the simulator that
32// don't really belong to a specific simulator object
33
34#include <fstream>
35#include <iostream>
36#include <list>
--- 19 unchanged lines hidden (view full) ---
56Stats::Value finalTick;
57Stats::Value simFreq;
58
59namespace Stats {
60
61Time statTime(true);
62Tick startTick;
63
64struct SimTicksReset : public Callback
65{
66 void process()
67 {
68 statTime.setTimer();
69 startTick = curTick();
70 }
71};
--- 121 unchanged lines hidden (view full) ---
193}
194
195void
196initSimStats()
197{
198 static Global global;
199}
200
201class StatEvent : public Event
202{
203 private:
204 bool dump;
205 bool reset;
206 Tick repeat;
207
208 public:
--- 16 unchanged lines hidden (view full) ---
225 Stats::schedStatEvent(dump, reset, curTick() + repeat, repeat);
226 }
227 }
228};
229
230void
231schedStatEvent(bool dump, bool reset, Tick when, Tick repeat)
232{
233 Event *event = new StatEvent(dump, reset, repeat);
234 mainEventQueue.schedule(event, when);
235}
236
237} // namespace Stats