Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Instrumentation fixes for #176 and #181 #179

Merged
merged 12 commits into from
Jan 12, 2020
Next Next commit
Avoid std::hash hack on ProfileResult::ThreadId
  • Loading branch information
0xworks committed Nov 29, 2019
commit e324aee9ecf7e9e0a52ee7752d0391f05c28ebfc
5 changes: 2 additions & 3 deletions Hazel/src/Hazel/Debug/Instrumentor.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ namespace Hazel {
{
std::string Name;
long long Start, End;
uint32_t ThreadID;
std::thread::id ThreadID;
};

struct InstrumentationSession
Expand Down Expand Up @@ -110,8 +110,7 @@ namespace Hazel {
long long start = std::chrono::time_point_cast<std::chrono::microseconds>(m_StartTimepoint).time_since_epoch().count();
long long end = std::chrono::time_point_cast<std::chrono::microseconds>(endTimepoint).time_since_epoch().count();

uint32_t threadID = std::hash<std::thread::id>{}(std::this_thread::get_id());
Instrumentor::Get().WriteProfile({ m_Name, start, end, threadID });
Instrumentor::Get().WriteProfile({ m_Name, start, end, std::this_thread::get_id()});

m_Stopped = true;
}
Expand Down