Skip to content

Commit aa512a9

Browse files
committed
vprof: show ids
Tf is going on...
1 parent 9e62c6f commit aa512a9

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

source/modules/vprof.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66
#include <iomanip>
77
#include <map>
88
#include <vprof.h>
9+
#ifdef ARCHITECTURE_X86_64
10+
#include <pthread.h>
11+
#endif
912

1013
class CVProfModule : public IModule
1114
{
@@ -749,8 +752,8 @@ void CVProfModule::Init(CreateInterfaceFn* appfn, CreateInterfaceFn* gamefn)
749752

750753
if (!g_VProfCurrentProfile.InTargetThread())
751754
{
752-
Msg("Setting new targeted Thread\n");
753-
g_VProfCurrentProfile.SetTargetThreadId(ThreadGetCurrentId());
755+
Msg("Setting new targeted Thread (%u, %u)\n", (int)ThreadGetCurrentId(), g_VProfCurrentProfile.GetTargetThreadId(), (uint)pthread_self());
756+
g_VProfCurrentProfile.SetTargetThreadId((uint)pthread_self());
754757
}
755758

756759
Msg("Entering Scope (%s %s %s)\n", (prof->m_enabled != 0) ? "true" : "false", prof->m_fAtRoot ? "true" : "false", g_VProfCurrentProfile.InTargetThread() ? "true" : "false");

0 commit comments

Comments
 (0)