Commit Graph

49 Commits

Author SHA1 Message Date
Bartosz Taudul
14a15bf152 Order of lock events is now always well-defined. 2020-07-26 13:54:40 +02:00
Bartosz Taudul
3e3aa80fa7 Completely serialize lock events. 2020-07-26 13:46:05 +02:00
Bartosz Taudul
a7d2ab4d4f Send single string for lock name. 2020-07-26 01:47:49 +02:00
txfx
412d252eea Remove extra semicolons at the end of namespaces 2020-05-10 15:32:39 +02:00
Bartosz Taudul
2ffaa88c9e Fix typo. 2020-03-08 14:19:08 +01:00
Bartosz Taudul
e7240cb77d Custom lock name transfer. 2020-03-08 13:47:38 +01:00
Bartosz Taudul
55d03cb03e Hide async queue setup/commit behind macros. 2020-01-19 15:06:11 +01:00
Bartosz Taudul
a221f121ba Extract lock state handling to a separate context class. 2019-09-21 14:55:14 +02:00
Bartosz Taudul
d6f32a0839 Serialize lock processing.
This makes is much easier to process on the server and opens new
optimization possibilities. It also fixes theoretical problems, which
may be caused by invalid ordering of events with the same timestamp.
2019-08-12 13:51:01 +02:00
Bartosz Taudul
a6a3f45810 Fill in thread id during dequeue, not during enqueue. 2019-07-30 01:15:14 +02:00
Bartosz Taudul
89928fde7b Queue must be always able to alloc. 2019-07-29 22:13:16 +02:00
Bartosz Taudul
06a41708a7 Move TLS accesses close together. 2019-06-24 19:38:44 +02:00
Bartosz Taudul
3f914834b7 Hide rest of statics. 2019-02-19 19:33:37 +01:00
Bartosz Taudul
2421e05c27 Prevent direct access to s_profiler. 2019-02-19 18:38:08 +01:00
Bartosz Taudul
d865d1cc87 Disallow direct access to s_token. 2019-02-19 18:27:00 +01:00
Bartosz Taudul
0b816ce0b7 Add lock termination event. 2018-12-16 20:46:33 +01:00
Bartosz Taudul
61ac0b8afc Send lock creation time. 2018-12-16 20:33:18 +01:00
Bartosz Taudul
31c2ddb8ac Rename client's SourceLocation to SourceLocationData. 2018-07-28 00:34:04 +02:00
Bartosz Taudul
26f2cb336e Return value from non-void function. 2018-07-13 20:12:39 +02:00
Arvid Gerstmann
6b87aecdce Wrap concurrentqueue in tracy namespace 2018-07-13 20:01:27 +02:00
Bartosz Taudul
26d5c4b302 Fix copy pasta. 2018-07-11 14:43:38 +02:00
Bartosz Taudul
96f39281a1 Implement on-demand locks. 2018-07-11 14:17:20 +02:00
Bartosz Taudul
ad0a75da7d Defer lock announcements. 2018-07-11 12:24:58 +02:00
Bartosz Taudul
e5b133073c Disable all tracing if TRACY_ON_DEMAND is defined. 2018-07-10 20:49:51 +02:00
Bartosz Taudul
7a35e8facc Fix typo. 2018-03-31 14:19:45 +02:00
Bartosz Taudul
a677048d2b Fix try_lock(). 2018-03-31 14:15:04 +02:00
Bartosz Taudul
3b03e849f0 Harden client code against unaligned memory access.
There shouldn't be any changes in generated code on modern
architectures, as the memcpy will be reduced to a store/load operation
identical to the one generated with plain struct member access.

GetTime( cpu ) needs special handling, as the MSVC intrinsic for rdtscp
can't store cpu identifier in a register. Using intermediate variable
would cause store to stack, read from stack, store to the destination
address. Since rdtscp is only available on x86, which handles unaligned
stores without any problems, we can have one place with direct struct
member access.
2018-03-31 14:15:04 +02:00
Bartosz Taudul
c3a32f9c35 Send lock type in LockWait/LockSharedWait events.
This will be needed for proper construction of LockMap on the server, in
case the LockAnnounce message hasn't arrived yet.
2017-12-17 18:30:34 +01:00
Bartosz Taudul
bcf2bf1c5c Shared lock events (still using old functionality). 2017-12-10 22:04:49 +01:00
Bartosz Taudul
a9e14c8990 Add standard lock events to shared locking. 2017-12-10 21:56:19 +01:00
Bartosz Taudul
782231b048 Shared lockable skeleton. 2017-12-10 21:49:45 +01:00
Bartosz Taudul
3567d7edd8 Reintroduce lock announce events. 2017-12-10 21:40:48 +01:00
Bartosz Taudul
a220043114 Add no-cpu GetTime() variant.
In this version the address of cpu output variable is const, so there's
no stack address calculation involved.
2017-10-29 16:12:16 +01:00
Bartosz Taudul
03289175ab Lock counter also must be initialized early. 2017-10-24 22:02:49 +02:00
Bartosz Taudul
1aaab3c5e4 Use 32 bits to store lock id.
This makes queue item size 32 bytes. Queue operations can now be faster,
because multiplication by 33 is replaced by shift by 5.
2017-10-13 20:05:38 +02:00
Bartosz Taudul
737671adbf Remove lock announce message.
This removes problem with static initialization order of mutices vs
tracy.

Lock source location is now transferred in lock wait message.
2017-10-12 20:14:17 +02:00
Bartosz Taudul
e23da05a65 Workaround gcc stupidity. 2017-10-11 01:44:35 +02:00
Bartosz Taudul
77dfefb5d0 Remove one stack address load. 2017-10-11 01:27:22 +02:00
Bartosz Taudul
af3773dc9a Remove one level of indirection. 2017-10-11 01:04:21 +02:00
Bartosz Taudul
cc8b357f09 Avoid excessive stack operations for cpu query. 2017-10-10 23:21:30 +02:00
Bartosz Taudul
75457c1465 Remove +x flag from files. 2017-10-10 21:56:15 +02:00
Bartosz Taudul
ef525067c5 Mark tracy::Lockable<>::Mark() as const. 2017-10-06 17:14:57 +02:00
Bartosz Taudul
9736be0321 Force inline lock operations. 2017-10-06 17:05:31 +02:00
Bartosz Taudul
dcd89f894c Add lock marking. 2017-10-06 16:32:32 +02:00
Bartosz Taudul
5f9228d4e6 Fix typo. 2017-10-05 03:07:26 +02:00
Bartosz Taudul
8c90eab044 Let's not worry about lock memory reuse. 2017-10-04 16:51:51 +02:00
Bartosz Taudul
0011573fa9 Send lock events. 2017-10-04 16:45:46 +02:00
Bartosz Taudul
78f8425dc7 Announce lock creation. 2017-10-04 16:16:40 +02:00
Bartosz Taudul
a3ef369a56 Lockable wrapper. 2017-10-04 15:41:02 +02:00