Commit Graph

380 Commits

Author SHA1 Message Date
andriy tylychko
d938d346bd fixed crash in AsyncFileHandle with unimplemented EnsureCompletion()
#jira UE-195894
#rb danny.couture, francis.hurteau

[CL 28313586 by andriy tylychko in ue5-main branch]
2023-09-28 07:09:26 -04:00
andriy tylychko
58db28f5d2 "any task" support
#rb luke.thatcher, danny.coutrue

[CL 28232583 by andriy tylychko in ue5-main branch]
2023-09-26 12:17:47 -04:00
henrik karlsson
d5bf11be3a Fixed for header units
#rb steve.robb

[CL 28171593 by henrik karlsson in ue5-main branch]
2023-09-23 02:37:45 -04:00
andriy tylychko
a0b79d2c56 removed tasks LLM instrumentation because they are not useful and steal data from other tags. tasks are a low-level thing that shouldn't be represented in a high-level mem usage overview
#rb trivial

[CL 27380009 by andriy tylychko in ue5-main branch]
2023-08-25 12:25:28 -04:00
devin doucette
50b48a4f7c UniqueLock: Added comments to TUniqueLock and TDynamicUniqueLock
#rb Matt.Peters
#rnx

[CL 26518616 by devin doucette in ue5-main branch]
2023-07-21 13:46:34 -04:00
andriy tylychko
c136b16937 a workaround to avoid "deadlock by busy-waiting" in ShaderCodeArchive: the existing IAsyncReadRequest::WaitCompletion() didn't guarantee completion, only that the request is done and the result is ready. It was used in IMemoryReadStream::EnsureReadNonBlocking() to ensure the following read will be non-blocking, and this can fail and actually block on reading -> busy-waiting -> deadlock. The new method EnsureCompletion() was added instead of "fixing" existing WaitCompletion() because other use cases don't need completion guarantee and the new method is theoretically slower
#rb danny.couture,arciel.rekman

[CL 26281551 by andriy tylychko in ue5-main branch]
2023-06-28 07:23:02 -04:00
andriy tylychko
ab120cd9e3 adjusted LLM tracing for tasks
#rb francis.hurteau

[CL 26230373 by andriy tylychko in ue5-main branch]
2023-06-26 06:01:47 -04:00
henrik karlsson
e7a889441d [Core]
* Moved dllexport from type to methods/staticvar. This improves compile times, memory and performance in dll builds

#rb

[CL 26081848 by henrik karlsson in ue5-main branch]
2023-06-17 15:59:58 -04:00
andriy tylychko
f61a337275 Tasks System: simplified the control flow of task execution, this removes 2 function calls for every task execution while doing the same
#rb none

[CL 26043799 by andriy tylychko in ue5-main branch]
2023-06-16 05:35:28 -04:00
andriy tylychko
1c7043bcd8 Tasks integration: minor profiler-guided optimisations
#rb none

[CL 25973709 by andriy tylychko in ue5-main branch]
2023-06-14 06:11:37 -04:00
andriy tylychko
5d64d56d0c Tasks integration: destroying task body as soon as it's executed. Some systems rely on this (probably a bug), but this also improves mem usage. Same approach is used by Tasks System and TaskGraph. Tasks integration is disabled so this change is compiled out for now
#rb none

[CL 25951865 by andriy tylychko in ue5-main branch]
2023-06-13 10:52:59 -04:00
Wojciech Krywult
d1baf24722 AsyncIO: Fixed incorrect handling of the STAT_AsyncFileMemory stat.
I've reviewed all code using async requests and we had multiple places incorrectly handling the stat: some placed failed to decrease the counter, while others would decrease it when they shouldn't. The main cause was the fact that when we create an async request and pass nullptr as the target memory, the request allocates the memory itself and increases the STAT_AsyncFileMemory. However, when we call GetReadResults() on such requests, the responsibility is on the caller to balance the calls and decrease the stat, which is not very obvious and leads to the mentioned bugs. On top of that, when we call GetReadResults() we may not have the knowledge as to whether the returned memory was allocated by the request or not (which may affect whether we should touch the stat at all).

Resolved by adding IAsyncReadRequest::ReleaseMemoryOwnershipImpl member, which may be used by request implementations to do the proper clean up (balance the stat). This way requests take the full responsibility for their changes and users of the requests don't need to know their implementation details.

#preflight none
#rb Patrick.Laflamme
#jira UE-185064

[CL 25664733 by Wojciech Krywult in ue5-main branch]
2023-05-29 12:11:37 -04:00
allan bentham
fbc142f928 Add GLES PSO precache support.
- When PSO precaching is enabled:
   - the binary program cache is continually appended with new PSOs.
   - all encountered PSOs are added to the binary cache.
   - The binary program cache is mmapped after the cache has grown beyond a cvar specified size.
   - rudimentary cache size controls (deletes after going over cvar controlled size threshold on startup).
   - any non-precache caches are deleted on startup.
#rb jack.porter
#preflight 6466121df602a4c404daea06

[CL 25531662 by allan bentham in ue5-main branch]
2023-05-18 15:28:02 -04:00
devin doucette
cd050ee69a CompressedBuffer: Added parallel decoding for targets with editor-only data
#jira UE-183996
#preflight 645eaf63cf788a25587d9c0c
#rb Zousar.Shaker, Dan.Thompson

[CL 25474141 by devin doucette in ue5-main branch]
2023-05-15 11:07:39 -04:00
Andriy Tylychko
a06d09e9f7 Tasks System: fixed tasks integration that rotted a bit since it was used last time
#preflight 645cdacc8e01daf0e501e30f
#rb none

[CL 25427116 by Andriy Tylychko in ue5-main branch]
2023-05-11 10:48:42 -04:00
Andriy Tylychko
28e264700e LLM tags for tasks
#preflight 645cd2872c180971eefa0322
#rb none

[CL 25424808 by Andriy Tylychko in ue5-main branch]
2023-05-11 07:52:16 -04:00
robert millar
6fecab183e Early return from ParallelFor when there is no work to do.
Avoids making very small profiling scopes in some cases.

#rb Andriy.Tylychko

[CL 25411030 by robert millar in ue5-main branch]
2023-05-10 14:11:57 -04:00
Steve Robb
c1216b9280 Replaced some operator TArray new usage - enough to make BlankProgram compile if operator new is deprecated.
#rb james.hopkin
#jira none
#preflight 6452372a0722d4f6a2d71e8e

[CL 25315828 by Steve Robb in ue5-main branch]
2023-05-03 07:02:43 -04:00
Andriy Tylychko
623986fd4d TaskGraph: fixed tracing of standalone graph events that don't have nested tasks at the moment of dispatching subsequents. because of this issue a lot of graph events weren't shown in TasksInsights
This is a rather "hacky" fix. The old task implementation (TaskGraph API) is on a life support so there's no point of spending too much time for this
#preflight 644be99f1c2846595c45a4f2
#rb danny.couture

[CL 25235003 by Andriy Tylychko in ue5-main branch]
2023-04-28 13:09:16 -04:00
Andriy Tylychko
26796466a2 fixed tracing completion and destruction of old "fire and forgot" tasks
#rb danny.couture
#preflight trivial

[CL 25184557 by Andriy Tylychko in ue5-main branch]
2023-04-25 13:54:50 -04:00
devin doucette
3c3f2f50c2 Optimized code generation for FMutex and FRecursiveMutex
Avoiding duplicate conditions, restructuring loops, and using LIKELY/UNLIKELY allows the compiler to generate shorter and faster code.

#rb Zousar.Shaker
#rnx

[CL 24995086 by devin doucette in ue5-main branch]
2023-04-11 14:27:08 -04:00
devin doucette
fe6b602e32 Moved FRecursiveMutex implementation details out of the header
#rb none
#rnx

[CL 24876592 by devin doucette in ue5-main branch]
2023-03-31 15:19:00 -04:00
devin doucette
c490ca95eb Added FRecursiveMutex
This is an 8-byte unfair recursive mutex built on top of ParkingLot.
Provides the same API as FCriticalSection which allows it to be used as a drop-in replacement.

#preflight 6422fde4803cb466e85619b0
#rb Andriy.Tylychko, Phil.Pizlo

[CL 24873014 by devin doucette in ue5-main branch]
2023-03-31 12:05:51 -04:00
phil pizlo
41c948e98a Add back IsLocked, we'll need it for assertions (and !TryLock is not a performant replacement).
#rb saam.barati
#rb devin.doucette
#preflight 642322b85e52099fe3f1fba9

[CL 24849605 by phil pizlo in ue5-main branch]
2023-03-29 21:52:42 -04:00
devin doucette
0ffce57d11 ParkingLot: Moved Wait and WaitFor out of the header
#rb Zousar.Shaker
#rnx

[CL 24811680 by devin doucette in ue5-main branch]
2023-03-27 18:51:41 -04:00