diff options
author | Lisa Hsu <hsul@eecs.umich.edu> | 2003-11-07 00:14:38 -0500 |
---|---|---|
committer | Lisa Hsu <hsul@eecs.umich.edu> | 2003-11-07 00:14:38 -0500 |
commit | a03221b6caab5076f4d53def4d2fe30a45fa3e63 (patch) | |
tree | 16a35645e8890111d4476ead4f8ca369ef9941df /kern/tru64 | |
parent | 3a99657c8f2b46ad9a76752970a7dd673b4ca7fe (diff) | |
download | gem5-a03221b6caab5076f4d53def4d2fe30a45fa3e63.tar.xz |
track the idle_thread() function in the kernel, so that we can know if we are idle during a run.
kern/tru64/tru64_system.cc:
autogen for new tracked function
add to fn name map
kern/tru64/tru64_system.hh:
autogen
--HG--
extra : convert_revision : 322d54df3070824a039085dc3742660c82cf750d
Diffstat (limited to 'kern/tru64')
-rw-r--r-- | kern/tru64/tru64_system.cc | 12 | ||||
-rw-r--r-- | kern/tru64/tru64_system.hh | 2 |
2 files changed, 14 insertions, 0 deletions
diff --git a/kern/tru64/tru64_system.cc b/kern/tru64/tru64_system.cc index 5ec62b9ca..3fa07828b 100644 --- a/kern/tru64/tru64_system.cc +++ b/kern/tru64/tru64_system.cc @@ -185,6 +185,9 @@ Tru64System::Tru64System(const string _name, const uint64_t _init_param, esTxeofBin = new Statistics::MainBin(name() + " es_txeof"); fnBins.insert(make_pair("es_txeof", esTxeofBin)); + idleThreadBin = new Statistics::MainBin(name() + " idle_thread"); + fnBins.insert(make_pair("idle_thread", idleThreadBin)); + } //INSTRUMENTATION CODEGEN END #endif //FS_MEASURE @@ -236,6 +239,7 @@ Tru64System::Tru64System(const string _name, const uint64_t _init_param, esStartEvent = new FnEvent(&pcEventQueue, "es_start", this); esTransmitEvent = new FnEvent(&pcEventQueue, "es_transmit", this); esTxeofEvent = new FnEvent(&pcEventQueue, "es_txeof", this); + idleThreadEvent = new FnEvent(&pcEventQueue, "idle_thread", this); } //INSTRUMENTATION CODEGEN END #endif //FS_MEASURE @@ -444,6 +448,11 @@ Tru64System::Tru64System(const string _name, const uint64_t _init_param, else panic("could not find kernel symbol \'es_txeof\'"); + if (kernelSymtab->findAddress("idle_thread", addr)) + idleThreadEvent->schedule(addr); + else + panic("could not find kernel symbol \'idle_thread\'"); + } //INSTRUMENTATION CODEGEN END if (bin == true) { @@ -488,6 +497,8 @@ Tru64System::Tru64System(const string _name, const uint64_t _init_param, populateMap("es_transmit", "es_start"); populateMap("es_txeof", "es_intr"); + + populateMap("idle_thread", ""); } #endif //FS_MEASURE } @@ -543,6 +554,7 @@ Tru64System::~Tru64System() delete esStartEvent; delete esTransmitEvent; delete esTxeofEvent; + delete idleThreadEvent; } //INSTRUMENTATION CODEGEN END #endif //FS_MEASURE diff --git a/kern/tru64/tru64_system.hh b/kern/tru64/tru64_system.hh index 1240479dd..93cc908e3 100644 --- a/kern/tru64/tru64_system.hh +++ b/kern/tru64/tru64_system.hh @@ -94,6 +94,7 @@ class Tru64System : public System Statistics::MainBin *esStartBin; Statistics::MainBin *esTransmitBin; Statistics::MainBin *esTxeofBin; + Statistics::MainBin *idleThreadBin; //INSTRUMENTATION CODEGEN END #endif //FS_MEASURE @@ -138,6 +139,7 @@ class Tru64System : public System FnEvent *esStartEvent; FnEvent *esTransmitEvent; FnEvent *esTxeofEvent; + FnEvent *idleThreadEvent; //INSTRUMENTATION CODEGEN END #endif //FS_MEASURE |