1
0
mirror of https://github.com/wolfpld/tracy.git synced 2025-03-20 07:40:02 +08:00
Commit Graph

25 Commits

Author SHA1 Message Date
Bartosz Taudul 3a460d3183 Use _mm_pause() instead of std::this_thread::yield() if possible. 2019-12-31 14:59:54 +01:00
Bartosz Taudul 8b56386ccd Keep atomics on separate cache lines. 2019-12-31 14:46:01 +01:00
Bartosz Taudul 3e65532eaa Add Read3(), Read4() helpers. 2019-11-09 00:27:49 +01:00
Bartosz Taudul 2131eed4e7 Support multiple types in Read2(). 2019-11-09 00:25:12 +01:00
Bartosz Taudul c20da5ea70 Move unimportant fields to back of FileRead class. 2019-11-08 23:31:17 +01:00
Bartosz Taudul c6f320d2d8 Store file name in FileRead. 2019-10-07 21:32:27 +02:00
Bartosz Taudul fadf8e3e0a Can't read negative number of bytes.
This completely ignores error handling, which probably should be added.
The code behavior doesn't change, as the existing comparisons and
asserts already promoted the signed value to unsigned.
2019-06-22 14:08:48 +02:00
Bartosz Taudul 470600fbc2 Don't thrash memory bandwith during file load. 2019-02-16 20:42:50 +01:00
Bartosz Taudul a46d27f312 Parallelize file reading.
Use spin-locks for synchronization.

IsEOF() is now buggy, but the bug chance is fairly low (1/65536) - it
can happen when the last compressed block has exactly max decompressed
block size. Don't care about it much, as it's only used to open old
archives.
2018-05-03 17:56:43 +02:00
Bartosz Taudul 3d13ea09e8 Move block decompression to a separate function. 2018-05-03 17:29:58 +02:00
Bartosz Taudul 5deeb8426f Specialized Read function writing directly to registers. 2018-05-01 02:13:49 +02:00
Bartosz Taudul b598300186 Split FileRead::Skip into small and big part. 2018-04-30 02:31:03 +02:00
Bartosz Taudul fd46651c32 Remove one level of indirection in FileRead. 2018-04-30 02:26:15 +02:00
Bartosz Taudul 764792d8db Try to not crash when opening invalid files.
Tracy will now perform a number of checks when trying to read a dump
file:
1. The file must have at least 4 bytes of data.
2. There should be a 4 byte header to indicate the file was saved by
   tracy. This is a breaking change in file format.
3. Old header-less files are still supported, but there's a new check
   for data validity. The first 4 bytes of file (as an uint32) must be
   less or equal to max LZ4 data packet size. This requires the first
   two bytes to be 00 00 or 00 01, which should catch most invalid
   files.
2018-04-21 14:53:40 +02:00
Bartosz Taudul cc65e52663 Allow skipping data when reading file. 2018-04-20 14:27:20 +02:00
Bartosz Taudul 68acc30bdd Add support for determining FileRead EOF. 2018-04-02 02:05:39 +02:00
Bartosz Taudul a4d46219df File read buffer doesn't need to be preserved. 2018-03-17 14:22:36 +01:00
Bartosz Taudul 41d8ca0814 Split read/write functions into small and big variants. 2018-03-17 13:57:32 +01:00
Bartosz Taudul 43ed934204 Force inline file read and write functions. 2017-11-19 22:02:04 +01:00
Bartosz Taudul 75457c1465 Remove +x flag from files. 2017-10-10 21:56:15 +02:00
Bartosz Taudul 777e499f76 Missing includes. 2017-10-01 02:23:30 +02:00
Bartosz Taudul 7e0eac78e1 Fast read path. 2017-10-01 01:59:07 +02:00
Bartosz Taudul a8b41faaf4 Compress saved traces using LZ4. 2017-09-30 19:25:24 +02:00
Bartosz Taudul ddf2453cca Buffer reads. 2017-09-30 18:43:57 +02:00
Bartosz Taudul 2021b7460a Add file wrappers. 2017-09-30 16:19:50 +02:00