fixes for profiler to work with ngsolve

This commit is contained in:
Christopher Lackner 2019-01-07 14:17:43 +01:00
parent e3a3efaf32
commit e46787dd5d
3 changed files with 12 additions and 10 deletions

View File

@ -22,8 +22,8 @@ namespace ngcore
std::shared_ptr<spdlog::logger> logger = GetLogger("PajeTrace");
private:
NGCORE_API static size_t max_tracefile_size;
static bool trace_thread_counter;
static bool trace_threads;
NGCORE_API static bool trace_thread_counter;
NGCORE_API static bool trace_threads;
bool tracing_enabled;
TTimePoint start_time;
@ -107,8 +107,8 @@ namespace ngcore
PajeTrace() = delete;
PajeTrace(const PajeTrace &) = delete;
PajeTrace(PajeTrace &&) = delete;
PajeTrace(int anthreads, std::string aname = "");
~PajeTrace();
NGCORE_API PajeTrace(int anthreads, std::string aname = "");
NGCORE_API ~PajeTrace();
void operator=(const PajeTrace &) = delete;
void operator=(PajeTrace &&) = delete;

View File

@ -8,10 +8,10 @@ namespace ngcore
std::string NgProfiler::filename;
size_t dummy_thread_times[NgProfiler::SIZE];
size_t * NgProfiler::thread_times = dummy_thread_times; // NOLINT
size_t dummy_thread_flops[NgProfiler::SIZE];
size_t * NgProfiler::thread_flops = dummy_thread_flops; // NOLINT
size_t NgProfiler::dummy_thread_times[NgProfiler::SIZE];
size_t * NgProfiler::thread_times = NgProfiler::dummy_thread_times; // NOLINT
size_t NgProfiler::dummy_thread_flops[NgProfiler::SIZE];
size_t * NgProfiler::thread_flops = NgProfiler::dummy_thread_flops; // NOLINT
std::shared_ptr<spdlog::logger> NgProfiler::logger = GetLogger("Profiler"); // NOLINT

View File

@ -35,9 +35,11 @@ namespace ngcore
NGCORE_API static TTimePoint * thread_times;
NGCORE_API static TTimePoint * thread_flops;
NGCORE_API static std::shared_ptr<spdlog::logger> logger;
NGCORE_API static size_t dummy_thread_times[NgProfiler::SIZE];
NGCORE_API static size_t dummy_thread_flops[NgProfiler::SIZE];
private:
static std::string filename;
NGCORE_API static std::string filename;
public:
NgProfiler();
~NgProfiler();
@ -143,7 +145,7 @@ namespace ngcore
class Timer
class NGCORE_API Timer
{
int timernr;
int priority;