Commit Graph

18 Commits

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