Code cleanup
This commit is contained in:
parent
8081bc5d67
commit
7105c570d9
9 changed files with 106 additions and 138 deletions
|
|
@ -9,30 +9,32 @@ namespace GC {
|
|||
|
||||
class Profiler {
|
||||
private:
|
||||
Profiler() { }
|
||||
~Profiler() {
|
||||
Profiler() {}
|
||||
~Profiler()
|
||||
{
|
||||
for (GCEvent *c : m_events)
|
||||
delete c;
|
||||
}
|
||||
|
||||
inline static Profiler *the() {
|
||||
static Profiler *the()
|
||||
{
|
||||
if (m_instance)
|
||||
return m_instance;
|
||||
m_instance = new Profiler();
|
||||
return m_instance;
|
||||
}
|
||||
|
||||
inline static Profiler *m_instance = nullptr;
|
||||
inline static Profiler *m_instance {nullptr};
|
||||
std::vector<GCEvent *> m_events;
|
||||
|
||||
std::ofstream create_file_stream();
|
||||
std::string get_log_folder();
|
||||
std::string get_log_folder();
|
||||
static void dump_trace();
|
||||
|
||||
public:
|
||||
static void record(GCEventType type);
|
||||
static void record(GCEventType type, size_t size);
|
||||
static void record(GCEventType type, Chunk *chunk);
|
||||
static void dump_trace();
|
||||
static void dispose();
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue