Commit Graph

24 Commits

Author SHA1 Message Date
Bartosz Taudul
813e265bc3 Initialize rpmalloc in SetThreadName().
There's no guarantee that rpmalloc will be initialized when the thread
calls SetThreadName, due to thread_local storage initialization rules.
2018-03-30 14:39:25 +02:00
Bartosz Taudul
ab1f93194e No thread names on emscripten. 2017-11-29 11:11:16 +01:00
Bartosz Taudul
f71af873c0 Proper function name. 2017-11-03 11:13:02 +01:00
Bartosz Taudul
7ecc6b54d4 Proper pthread_threadid_np call. 2017-11-03 11:12:17 +01:00
Bartosz Taudul
c7cb89307f Use proper __APPLE__ macro. 2017-11-03 11:09:31 +01:00
Bartosz Taudul
1d9542ea25 Fix thread ids on osx, iphone. 2017-11-03 10:49:49 +01:00
Bartosz Taudul
3051b8d27c Don't use rpmalloc directly. 2017-11-02 12:58:38 +01:00
Bartosz Taudul
391571a2da Fix android with tracy disabled. 2017-10-31 11:36:43 +01:00
Bartosz Taudul
aa12a3bf94 Missing include. 2017-10-30 21:51:24 +01:00
Bartosz Taudul
cf3d8eb810 Manual collection of thread names on android. 2017-10-30 20:45:00 +01:00
Bartosz Taudul
5cf962e03d Android has pthread_setname_np, but not getname... 2017-10-30 13:48:52 +01:00
Bartosz Taudul
d21040e3d8 pthread_{get,set}name_np is not standard. 2017-10-28 12:16:52 +02:00
Bartosz Taudul
1788408ceb Allow setting thread name using thread handle. 2017-10-16 21:17:58 +02:00
Bartosz Taudul
f156cd922b OpenThread may fail. 2017-10-15 13:26:05 +02:00
Bartosz Taudul
75457c1465 Remove +x flag from files. 2017-10-10 21:56:15 +02:00
Bartosz Taudul
809d98162b Do the same trick as concurrentqueue.h for GetCurrentThreadId(). 2017-09-26 00:46:46 +02:00
Bartosz Taudul
1c4dcf7e52 Use consistent ifdefs. 2017-09-26 00:42:47 +02:00
Bartosz Taudul
206305fbd2 Merge TracyThread.hpp to TracySystem.cpp.
Keeping threading functions inside a source file prevents poisoning by
including windows.h.
2017-09-25 21:13:59 +02:00
Bartosz Taudul
e1a63dbb53 Drop constant merging check.
While without constant merging the profiler operates sub-optimally, it's
not that essential to be enabled. And there are problems with it on some
platforms, for example cygwin.
2017-09-23 20:16:42 +02:00
Bartosz Taudul
6c1d014aa3 Fix implementation errors. 2017-09-22 21:48:21 +02:00
Bartosz Taudul
bd622c304a Limit pthread thread name to 16 bytes.
This is a documented pthread restriction. Passing longer strings has no
effect (i.e. thread name is not set).
2017-09-22 21:45:35 +02:00
Bartosz Taudul
6885dc3fd3 Restore support for old SDK versions. 2017-09-22 00:37:28 +02:00
Bartosz Taudul
0c0b18615a Use winapi function to set thread name.
Fairly recent Windows SDK is required, unfortunately.
2017-09-21 22:54:44 +02:00
Bartosz Taudul
45646c4f45 Move TracySystem to a common directory. 2017-09-13 01:32:11 +02:00