Commit Graph

421 Commits

Author SHA1 Message Date
Bartosz Taudul
72ce3ccf15 Allow issuing blocking connect calls on sockets. 2020-09-10 20:56:24 +02:00
Bartosz Taudul
813e45198d Cygwin uses BSD sockets API. 2020-09-06 14:11:29 +02:00
Graydon Hoare
2ea81a3ef9
Make TRACY_ONLY_IPV4 and TRACY_ONLY_LOCALHOST also settable with runtime env vars. 2020-08-27 11:21:24 -07:00
Graydon Hoare
30a6a5cdd1
Add support for TRACY_ONLY_IPV4 macro to exclude listening on IPv6 2020-08-27 11:21:24 -07:00
Bartosz Taudul
5239b706c3 Allow disabling code transfer. 2020-08-16 01:31:54 +02:00
Bartosz Taudul
9455c92712 Handle broken inet_ntop on old Windows SDKs. 2020-08-11 22:37:46 +02:00
Bartosz Taudul
2a61c0a45f
Merge pull request #83 from voysys/add-set-thread-name-to-c-api
Add set thread name to C API
2020-08-04 11:54:56 +02:00
Niclas Olmenius
826affb0b5 add set thread to c api 2020-08-04 11:51:48 +02:00
Jim Blandy
7bc8c6283a Factor out Unix build logic into shared files. 2020-07-31 11:08:36 -07:00
Jim Blandy
652582b119 Factor out makefile TBB detection, apply to all tools. 2020-07-31 09:14:12 -07:00
Bartosz Taudul
7e6a41e647 No need for lean alloc srcloc zone begin messages. 2020-07-26 14:35:04 +02:00
Bartosz Taudul
062bb3044f No need for lean callstack sample message. 2020-07-26 14:28:13 +02:00
Bartosz Taudul
4252cac654 No need for lean callstack alloc message. 2020-07-26 14:25:32 +02:00
Bartosz Taudul
18713de70c No need for lean frame image message. 2020-07-26 14:23:04 +02:00
Bartosz Taudul
b76726c597 No need for lean callstack, callstack memory messages. 2020-07-26 14:23:03 +02:00
Bartosz Taudul
14a15bf152 Order of lock events is now always well-defined. 2020-07-26 13:54:40 +02:00
Bartosz Taudul
b7af9a0860 Reduce frame images frame index to 32 bit. 2020-07-26 13:46:05 +02:00
Bartosz Taudul
03f46d7228 Custom string data is no longer needed. 2020-07-26 01:47:49 +02:00
Bartosz Taudul
c0b73c248f Add second single string transfer. 2020-07-26 01:47:49 +02:00
Bartosz Taudul
a7d2ab4d4f Send single string for lock name. 2020-07-26 01:47:49 +02:00
Bartosz Taudul
e91950f006 Send single string for messages. 2020-07-26 01:35:52 +02:00
Bartosz Taudul
5553761c02 Send single string for zone text and name. 2020-07-26 01:35:52 +02:00
Bartosz Taudul
309a151610 Symbol length no longer has to be packed. 2020-07-26 01:35:52 +02:00
Bartosz Taudul
88685440b6 Send single string for callstack frame. 2020-07-26 01:35:52 +02:00
Bartosz Taudul
61e3acde06 Send single string for callstack frame size. 2020-07-26 01:35:52 +02:00
Bartosz Taudul
06ca4e2d16 Send single string for symbol information. 2020-07-26 01:35:52 +02:00
Bartosz Taudul
14b180cd16 Send single string for code information. 2020-07-26 01:35:51 +02:00
Bartosz Taudul
81d5a8db5e Implement transport of single string data.
In most cases only one string is sent per message and no pointer
tracking is needed.

This is only plumbing work, no changes to messages have been made yet.
2020-07-26 01:35:51 +02:00
Bartosz Taudul
02e7893c75 Preserve messages size. 2020-07-21 20:58:58 +02:00
Bartosz Taudul
9d01fa86ab Preserve zone text, zone name string length. 2020-07-21 20:58:58 +02:00
Bartosz Taudul
1b6bc1b69a Send Vulkan GPU calibration messages. 2020-07-07 21:25:35 +02:00
Bartosz Taudul
384e2e3fa1 Reduce memory requirements of allocated call stacks. 2020-07-05 17:33:29 +02:00
Bartosz Taudul
d8466c5839 Fix typo. 2020-06-20 18:50:05 +02:00
Bartosz Taudul
f7727f3aa4 Workaround broken connect implementation. 2020-06-20 18:35:21 +02:00
Bartosz Taudul
0744355a67 Fix off-by-one (found by lispbub, #43). 2020-06-10 12:21:58 +02:00
Bartosz Taudul
8bbc40beb2 Bump version, protocol for D3D12. 2020-06-09 11:20:50 +02:00
Andrew Depke
39479b8d93
Merge branch 'master' into master 2020-06-08 23:50:20 -06:00
Andrew Depke
3282a8d27c Added server support for D3D12 contexts 2020-06-07 00:40:08 -06:00
Bartosz Taudul
d35d9b60ff Bump protocol and version for OpenCL support. 2020-06-06 14:57:48 +02:00
Thales Sabino
a46f83364e Add OpenCL trace support
- Adds the file TracyOpenCL.hpp which contains the API to annotate OpenCL applications
- It works in a similar fashion to the Vulkan annotations
- Adds an example OpenCL application in examples/OpenCLVectorAdd
- Adds "OpenCL Context" to the UI
- Manual entry for annotating OpenCL zones
2020-06-05 10:15:47 +01:00
Graydon Hoare
e76b8ae423
Add TRACY_ONLY_LOCALHOST macro to avoid listening on all interfaces. 2020-05-28 22:13:06 -07:00
Bartosz Taudul
54a029356d Explicitly store GPU context type. 2020-05-27 18:16:53 +02:00
Bartosz Taudul
2b304581cf Implement transfer of integral values for zones. 2020-05-24 16:13:09 +02:00
Bartosz Taudul
3a302c18bc Replace bsf with tzcnt. 2020-05-17 01:09:57 +02:00
Bartosz Taudul
d10ef8c501 Use non-blocking connect() call.
Exploit connect() error codes to determine whether connection was
established. Using poll/select proved to be problematic.
2020-05-14 02:27:04 +02:00
Bartosz Taudul
1fdae70cf8 Store socket handle in atomic. 2020-05-13 19:12:52 +02:00
Bartosz Taudul
e9f93f5bc7 Send lean frame images. 2020-05-10 20:16:08 +02:00
Bartosz Taudul
03b5dfacd6 Send lean callstack samples. 2020-05-10 20:00:51 +02:00
Bartosz Taudul
09388f3c99 Send lean callstack allocs. 2020-05-10 19:56:36 +02:00
Bartosz Taudul
5a774c82cc Send lean callstacks. 2020-05-10 19:43:12 +02:00
Bartosz Taudul
f0ade07be8 Send lean memory callstacks. 2020-05-10 19:28:08 +02:00
Bartosz Taudul
2dc07fca0b Send lean allocated source locations. 2020-05-10 19:20:59 +02:00
txfx
412d252eea Remove extra semicolons at the end of namespaces 2020-05-10 15:32:39 +02:00
Bartosz Taudul
a47c7d467f Send x86 processor info in welcome message. 2020-05-06 19:18:17 +02:00
Rokas Kupstys
6727cc2da4 Add empty TRACY_API instead of using dllexport for static builds on windows. Using dllexport is not correct, because it marks APIs in static lib for export and these APIs would get exported from a DLL that links to tracy.
Make API use TRACY_EXPORTS, and replace TRACYPROFILER_EXPORTS with TRACY_EXPORTS in vcxproj projects.

Swap dllimport with dllexport. Reason for this is a common idiom in CMake: target_compile_definitions(tracy PUBLIC -DTRACY_IMPORTS PRIVATE -DTRACY_EXPORTS). This idiom adds both defines in tracy target, but targets that link to tracy only get TRACY_IMPORTS. Swapped statements ensure that tracy always dllexports it's api and consuming targets always dllimport it.
2020-05-05 13:23:46 +03:00
Bartosz Taudul
1f3dc927c0 Close socket when listening fails. 2020-04-13 21:40:35 +02:00
Bartosz Taudul
5437976e65 Cosmetics. 2020-04-13 21:39:51 +02:00
Bartosz Taudul
1bbece649f Implement socket read without exit check. 2020-04-13 14:22:58 +02:00
Bartosz Taudul
e4ec666479 Don't use std::function in sockets. 2020-04-13 14:14:36 +02:00
Leander Beernaert
ac9f12a5f6 Review fixes
Update bracket style.

Remove erroneous else block.
2020-04-09 12:32:35 +02:00
Leander Beernaert
010376518f Fix incorrect handling of ipv4 case 2020-04-09 12:27:54 +02:00
Leander Beernaert
4201ebb28d ListenSocket: Fallback to ipv4
If we can't create a listener socket with the ipv6 protocol, try to
create one with the ipv4 protocol instead. This fixes the ListenSocket
on machines where ipv6 is not available or has been completely disabled.

This patch also exists ListenSocket::Listen() early if we fail to create
the socket.
2020-04-09 12:23:51 +02:00
Bartosz Taudul
69c5e667ae Dynamically load Get/SetThreadDescription. 2020-04-07 21:33:03 +02:00
Bartosz Taudul
b2a8b53efa Query source location of each assembly instruction. 2020-04-01 21:43:03 +02:00
Bartosz Taudul
add5b29d03 Report CPU architecture in welcome message. 2020-03-25 21:28:02 +01:00
Bartosz Taudul
ce449ac0e2 Notify server that parameter was handled. 2020-03-25 20:37:26 +01:00
Bartosz Taudul
ea507289c6 Add missing query space extensions. 2020-03-25 20:33:50 +01:00
Bartosz Taudul
f114ec3f80 Add code transfer from client to server. 2020-03-25 20:04:55 +01:00
Bartosz Taudul
3e0e120222 Add extra parameter to server queries. 2020-03-25 20:04:01 +01:00
Bartosz Taudul
c999a74d34 Symbol length transfer. 2020-03-25 18:32:36 +01:00
Bartosz Taudul
59e859e59a Remove benaphore, use std::mutex on cygwin. 2020-03-19 02:06:54 +01:00
Bartosz Taudul
127224acc6 Send listen port in broadcast message. 2020-03-08 14:37:59 +01:00
Bartosz Taudul
e7240cb77d Custom lock name transfer. 2020-03-08 13:47:38 +01:00
Bartosz Taudul
be5793987e Don't send symbol name. 2020-02-27 12:49:48 +01:00
Bartosz Taudul
26cee8acf0 Perform symbol information queries. 2020-02-26 22:35:15 +01:00
Bartosz Taudul
abf8c42a7c Send module name. 2020-02-26 00:33:09 +01:00
Bartosz Taudul
c5b2d14f8c Send sampling period in welcome message. 2020-02-25 23:12:31 +01:00
Bartosz Taudul
3402d16548 Send symbol base address. 2020-02-25 23:03:40 +01:00
Bartosz Taudul
6968a42abe Force inline LZ4_NbCommonBytes(). 2020-02-23 14:40:09 +01:00
Bartosz Taudul
13febeb902 Use dllimport/dllexport on cygwin. 2020-02-22 16:02:02 +01:00
Bartosz Taudul
9e9c7db5b1 Send sampled call stacks. 2020-02-22 13:42:09 +01:00
Bartosz Taudul
0d2e7f72a7 Move GetThreadHandleImpl() from header to source file.
This removes dependency on unistd.h header (required for syscall() on
linux), which includes a definition of getopt(), which may conflict with
a custom getopt implementation (for example, one that does work on
windows).
2020-02-11 14:40:49 +01:00
Bartosz Taudul
99f2734d28 Remove stack dependency. 2020-02-09 17:22:41 +01:00
Bartosz Taudul
78c2f68649 Force inline LZ4 read/write functions. 2020-02-09 17:22:41 +01:00
Bartosz Taudul
99613291fb Restore original 16 KB LZ4 hash table size. 2020-02-08 18:12:44 +01:00
Bartosz Taudul
aa94df0845 Replace rpmalloc_thread_initialize with InitRPMallocThread(). 2020-01-25 17:16:08 +01:00
Bartosz Taudul
a90004b983 Move Set/GetThreadName() to Tracy API. 2020-01-25 16:36:58 +01:00
Bartosz Taudul
6f31eb2a9d Disable MSVC idiocy. 2020-01-20 22:49:03 +01:00
Bartosz Taudul
77a6039e54 Force inline small functions in LZ4. 2020-01-17 01:08:06 +01:00
Bartosz Taudul
cb501298b5 Make QueueDataSize constexpr. 2020-01-14 19:42:11 +01:00
Bartosz Taudul
65d146ddca Allow checking if socket is valid. 2019-12-19 17:23:40 +01:00
Bartosz Taudul
4eaa3d90dd Thread ids are no longer pthread_t. 2019-12-13 15:57:08 +01:00
Bartosz Taudul
d4f4b73d56 Move socket buffer size from header to source file. 2019-12-08 23:14:48 +01:00
Bartosz Taudul
712403e9fd Transfer, display, save CPU topology data. 2019-11-29 22:41:41 +01:00
Bartosz Taudul
4551553eb4 Implement setting client parameters from server. 2019-11-25 23:59:48 +01:00
Bartosz Taudul
3e4913dc8a Reuse socket address also on BSD. 2019-11-21 20:41:57 +01:00
Bartosz Taudul
3c4a7463b8 Retrieve proper thread ids on BSD. 2019-11-21 02:29:17 +01:00
Bartosz Taudul
3282360382 Bind on both IPv6 and IPv4 on BSD. 2019-11-21 02:03:32 +01:00
Bartosz Taudul
a9cd5b331f BSD needs netinet/in.h for struct sockaddr_in and friends. 2019-11-21 01:28:48 +01:00
Bartosz Taudul
31e1558467 Use standard includes. 2019-11-15 20:17:55 +01:00