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

51 Commits

Author SHA1 Message Date
Bartosz Taudul c5dc5f4455 Bump zstd to 1.5.7, use CPM to download. 2025-02-19 23:47:37 +01:00
Bartosz Taudul 0b5b674e1f Fix indentation. 2024-09-20 01:02:48 +02:00
Bartosz Taudul 277ec25a8d Spin when waiting for decompressed data instead of using lock + cv. 2024-06-02 15:06:16 +02:00
Bartosz Taudul ce240ddfc1 Loading multi-stream data. 2024-06-02 14:32:33 +02:00
Bartosz Taudul 048ff8213a Support loading single-stream new format traces. 2024-06-02 14:32:32 +02:00
Bartosz Taudul eb1cbb454a Move common file buffer sizes to a separate header. 2024-06-02 14:32:32 +02:00
Bartosz Taudul c00d8c6211 FreeBSD has 64-bit stat with no need for stat64. 2023-05-23 23:41:39 +02:00
Bartosz Taudul 1dfe36e962 Implement reading 10 elements at once. 2022-07-24 13:40:06 +02:00
Bartosz Taudul 06c7984a16 Move all client headers and sources to public/ directory. 2022-07-17 15:47:38 +02:00
Bartosz Taudul 07bc665d8c Drop support for Cygwin. 2021-10-07 23:28:40 +02:00
Bartosz Taudul 9e28f441c8 Cosmetics. 2021-06-09 21:12:42 +02:00
Bartosz Taudul 94ec6a0d9d Move TracyYield.hpp to common. 2021-05-31 02:19:35 +02:00
Bartosz Taudul 2b3405b9c7 Fix usage of deprecated stat64 on apple. 2021-01-26 20:09:34 +01:00
Bartosz Taudul c515a53986 Wrapper for reading nine elements at once. 2020-03-25 18:35:48 +01:00
Bartosz Taudul abd44069ae Fix off-by-one. 2020-03-01 14:04:10 +01:00
Bartosz Taudul 2e5ce52086 Implement reading 7 elements. 2020-02-27 15:07:29 +01:00
Bartosz Taudul 3140dbb34a Size is never zero at start. 2020-02-13 18:41:32 +01:00
Bartosz Taudul c870b10387 Offset in just-read block is always zero. 2020-02-13 18:39:46 +01:00
Bartosz Taudul ebf2c3ad5b No need to check if file has ended. 2020-02-13 15:41:20 +01:00
Bartosz Taudul 4d892cbae9 Preload next block size. 2020-02-13 15:37:37 +01:00
Bartosz Taudul 51e04673c6 8-element reader wrapper. 2020-02-13 00:35:20 +01:00
Bartosz Taudul eb79507501 Read files using mmap. 2020-02-12 19:43:05 +01:00
Bartosz Taudul 3b345aab37 FileRead::IsEOF() is no longer used. 2020-02-12 19:27:15 +01:00
Bartosz Taudul 925909aa3a Wrapper for reading 6 elements at once. 2020-02-12 02:13:50 +01:00
Bartosz Taudul 6cab3dcd3a Helper for reading 5 variables. 2020-02-12 00:32:00 +01:00
Bartosz Taudul ec5c7cf8a7 Reading zstd compressed traces. 2020-02-08 16:14:43 +01:00
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