Commit Graph

23 Commits

Author SHA1 Message Date
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