Profiler work
This commit is contained in:
parent
0d376171c8
commit
7bb64c0489
5 changed files with 9 additions and 21 deletions
|
|
@ -6,7 +6,7 @@
|
|||
#include "event.hpp"
|
||||
#include "heap.hpp"
|
||||
|
||||
using namespace std;
|
||||
// using namespace std;
|
||||
|
||||
namespace GC {
|
||||
|
||||
|
|
@ -22,12 +22,7 @@ namespace GC {
|
|||
return m_chunk;
|
||||
}
|
||||
|
||||
void GCEvent::printShort() {
|
||||
void GCEvent::print(std::ostream &out) {
|
||||
assert(false && "TODO: unimplemented");
|
||||
}
|
||||
|
||||
void GCEvent::printFull() {
|
||||
assert(false && "TODO: unimplemented");
|
||||
ostream s1 = cout;
|
||||
}
|
||||
}
|
||||
|
|
@ -19,16 +19,13 @@ namespace GC {
|
|||
profiler->m_events.push_back(event);
|
||||
}
|
||||
|
||||
void Profiler::printTrace(PrintTraceOptions opt) {
|
||||
void Profiler::printTrace() {
|
||||
auto profiler = Profiler::the();
|
||||
auto start = profiler->m_events.begin();
|
||||
auto end = profiler->m_events.end();
|
||||
while (start != end) {
|
||||
auto event = *start++;
|
||||
if (opt == Short)
|
||||
event->printShort();
|
||||
else
|
||||
event->printFull();
|
||||
event->print(std::cout);
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue