Work on the profiler

This commit is contained in:
Victor Olin 2023-03-10 09:24:32 +01:00
parent cdc802476d
commit 51765f4d0c
6 changed files with 101 additions and 49 deletions

View file

@ -6,21 +6,36 @@
#include "event.hpp"
#include "heap.hpp"
namespace GC {
GCEventType GCEvent::getType() {
namespace GC
{
GCEventType GCEvent::getType()
{
return m_type;
}
TimeStamp GCEvent::getTimeStamp() {
std::time_t GCEvent::getTimeStamp()
{
return m_timestamp;
}
Chunk *GCEvent::getChunk() {
Chunk *GCEvent::getChunk()
{
return m_chunk;
}
void GCEvent::print(std::ostream &out) {
assert(false && "TODO: unimplemented");
inline const char *GCEvent::TypeToString()
{
switch (m_type)
{
case CollectStart: return "CollectStart";
case MarkStart: return "MarkStart";
case ChunkMarked: return "ChunkMarked";
case ChunkSwept: return "ChunkSwept";
case ChunkFreed: return "ChunkFreed";
case NewChunk: return "NewChunk";
case ReusedChunk: return "ReusedChunk";
default: return "[Unknown]";
}
}
}