module volt.util.perf

Code Map

module volt.util.perf;


class Accumulator
{
public:
	accum: i64;
	then: i64;
	below: Accumulator;
	next: Accumulator;
	name: string;


public:
	this(name: string) { }
	fn start() { }
	fn stop() { }
}

class Counter
{
public:
	name: string;
	count: u64;
	next: Counter;


public:
	this(name: string) { }
}

class GCAccumulator : Accumulator
{
public:
	mAllocDg: AllocDg;


public:
	this() { }
	fn alloc(ti: TypeInfo, c: size_t) void* { }
}

//! Very simple perfing code, just gets timing info.
struct Perf
{
public:
	enum Mark
	{
		SETUP,
		PARSING,
		PHASE1,
		PHASE2,
		PHASE3,
		BACKEND,
		BITCODE,
		ASSEMBLE,
		LINK,
		EXIT,
		DONE,
		NUM_MARKS,
	}


public:
	pos: i32;
	times: i64[];
	counter: Counter;
	stack: Accumulator;
	accum: Accumulator;


public:
	fn perfInit() { }
	fn close() { }
	//! Place a mark in time, allows to skip phases.
	fn mark(mark: Mark) { }
	fn print(file: string, name: string) { }
}

global perf: Perf;
struct Perf

Very simple perfing code, just gets timing info.

Yes these times are not super accurate and will drift a lot over time. So don't be using these for missile guidence.

fn mark(mark: Mark)

Place a mark in time, allows to skip phases.