2016-12-08 08:52:44 -05:00
// Copyright 1998-2017 Epic Games, Inc. All Rights Reserved.
2015-08-10 08:14:45 -04:00
Copying //UE4/Dev-Build to //UE4/Dev-Main (Source: //UE4/Dev-Build @ 3209340)
#lockdown Nick.Penwarden
#rb none
==========================
MAJOR FEATURES + CHANGES
==========================
Change 3209340 on 2016/11/23 by Ben.Marsh
Convert UE4 codebase to an "include what you use" model - where every header just includes the dependencies it needs, rather than every source file including large monolithic headers like Engine.h and UnrealEd.h.
Measured full rebuild times around 2x faster using XGE on Windows, and improvements of 25% or more for incremental builds and full rebuilds on most other platforms.
* Every header now includes everything it needs to compile.
* There's a CoreMinimal.h header that gets you a set of ubiquitous types from Core (eg. FString, FName, TArray, FVector, etc...). Most headers now include this first.
* There's a CoreTypes.h header that sets up primitive UE4 types and build macros (int32, PLATFORM_WIN64, etc...). All headers in Core include this first, as does CoreMinimal.h.
* Every .cpp file includes its matching .h file first.
* This helps validate that each header is including everything it needs to compile.
* No engine code includes a monolithic header such as Engine.h or UnrealEd.h any more.
* You will get a warning if you try to include one of these from the engine. They still exist for compatibility with game projects and do not produce warnings when included there.
* There have only been minor changes to our internal games down to accommodate these changes. The intent is for this to be as seamless as possible.
* No engine code explicitly includes a precompiled header any more.
* We still use PCHs, but they're force-included on the compiler command line by UnrealBuildTool instead. This lets us tune what they contain without breaking any existing include dependencies.
* PCHs are generated by a tool to get a statistical amount of coverage for the source files using it, and I've seeded the new shared PCHs to contain any header included by > 15% of source files.
Tool used to generate this transform is at Engine\Source\Programs\IncludeTool.
[CL 3209342 by Ben Marsh in Main branch]
2016-11-23 15:48:37 -05:00
# include "CoreMinimal.h"
# include "Misc/MessageDialog.h"
# include "HAL/FileManager.h"
# include "Misc/CommandLine.h"
# include "Misc/FileHelper.h"
# include "Misc/Paths.h"
# include "Misc/Guid.h"
2015-08-10 08:14:45 -04:00
# include "DerivedDataBackendInterface.h"
# include "DDCCleanup.h"
Copying //UE4/Dev-Build to //UE4/Dev-Main (Source: //UE4/Dev-Build @ 3209340)
#lockdown Nick.Penwarden
#rb none
==========================
MAJOR FEATURES + CHANGES
==========================
Change 3209340 on 2016/11/23 by Ben.Marsh
Convert UE4 codebase to an "include what you use" model - where every header just includes the dependencies it needs, rather than every source file including large monolithic headers like Engine.h and UnrealEd.h.
Measured full rebuild times around 2x faster using XGE on Windows, and improvements of 25% or more for incremental builds and full rebuilds on most other platforms.
* Every header now includes everything it needs to compile.
* There's a CoreMinimal.h header that gets you a set of ubiquitous types from Core (eg. FString, FName, TArray, FVector, etc...). Most headers now include this first.
* There's a CoreTypes.h header that sets up primitive UE4 types and build macros (int32, PLATFORM_WIN64, etc...). All headers in Core include this first, as does CoreMinimal.h.
* Every .cpp file includes its matching .h file first.
* This helps validate that each header is including everything it needs to compile.
* No engine code includes a monolithic header such as Engine.h or UnrealEd.h any more.
* You will get a warning if you try to include one of these from the engine. They still exist for compatibility with game projects and do not produce warnings when included there.
* There have only been minor changes to our internal games down to accommodate these changes. The intent is for this to be as seamless as possible.
* No engine code explicitly includes a precompiled header any more.
* We still use PCHs, but they're force-included on the compiler command line by UnrealBuildTool instead. This lets us tune what they contain without breaking any existing include dependencies.
* PCHs are generated by a tool to get a statistical amount of coverage for the source files using it, and I've seeded the new shared PCHs to contain any header included by > 15% of source files.
Tool used to generate this transform is at Engine\Source\Programs\IncludeTool.
[CL 3209342 by Ben Marsh in Main branch]
2016-11-23 15:48:37 -05:00
# include "ProfilingDebugging/CookStats.h"
Copying //UE4/Orion-Staging to //UE4/Main (Origin //Orion/Dev-General @ 2870388)
#lockdown Nick.Penwarden
==========================
MAJOR FEATURES + CHANGES
==========================
Change 2870336 on 2016/02/17 by Marc.Audy
Continued splitting up Orion Build
* Restructure from platform based MakeBuild steps in to a PS4, Server, and Windows Client MakeBuild
* Cook server data only once for both Windows and Linux (windows reuses Linux server data)
* Split compilation of Win64 Client and Server such that MakeBuild_Server only builds Server and MakeBuild_WindowsClient only builds Client
#jira UEB-580
#rb Ben.Marsh
#tests Preflight and generated Windows Client and Server work to play game
Change 2870026 on 2016/02/17 by Wes.Hunt
Don't allow array shrinking when removing the corruption wrapper trailer.
#rb none
Updating CIS Counter
Change 2869725 on 2016/02/17 by Dmitry.Rekman
More analytics and QoS stats added for 0.19.
#rb none
#tests Ran Windows client and Linux server on compatible content.
Change 2869705 on 2016/02/16 by Ryan.Gerleve
Fix replicated properties and call RepNotifies of startup actors when scrubbing in replays.
This is the engine support for fixing OR-6817, towers not respawning when rewinding replays.
#rb john.pollard
#tests golden path, replays, ps4 nomcp
Change 2869644 on 2016/02/16 by Jason.Bestimt
#ORION_DEV - Merge MAIN (0.18) at CL# 2869635
#Tests:none
#RB:none
Change 2869586 on 2016/02/16 by Marcus.Wassmer
Fix texturestreaming RHI flushes.
#rb none
#test goldenpath
#codereview Gil.Gribb
Change 2869279 on 2016/02/16 by Lukasz.Furman
fixed minion hit reaction directions
#orion OR-13953
#rb Mieszko.Zielinski
#tests PIE: hit minions with various abilities from different angles, checked velocity of death particles when killed by abilities and towers
#codereview Dan.Youhon
Change 2869277 on 2016/02/16 by Wes.Hunt
During cook, when a package is not ready to save, actually early out of the saving code. Saves somewhere in the 130s to 200s range for cooks.
#rb daniel.lamb
#tests local windows cooks, preflight PS4 cooks
Change 2869132 on 2016/02/16 by Mieszko.Zielinski
Added a function to AISenseConfig allowing native-code MaxAge configuration #UE4
#rb Lukasz.Furman
#test none required
Change 2868981 on 2016/02/16 by Wes.Hunt
remove -LogCookStats cmdline check, always log cook stats. -SendCookAnalytics flag is still used.
This was requested by NickP.
#rb none
#tests local windows cooks
Change 2868975 on 2016/02/16 by Wes.Hunt
Don't submit DDC usage stats for zero-sized events.
#rb none
#tests local windows cook
Change 2868956 on 2016/02/16 by Jason.Bestimt
#ORION_DEV - Merge MAIN (0.18) at CL# 2868926
#RB:none
#Tests:none
Change 2868889 on 2016/02/16 by Max.Chen
Sequencer: Only allow transport control binding when editing level editor sequencers.
#rb none
#tests none
Change 2868663 on 2016/02/16 by David.Ratti
downgrade warning to display
#rb none
#tests compile
Change 2868624 on 2016/02/16 by Marcus.Wassmer
Re-Enable Defrag validation for devgeneral
#rb none
#test none
Change 2868493 on 2016/02/16 by Benn.Gallagher
Added a few more stats to morph target updates to try and narrow down hitches
#rb Bruce.Nesbit
#tests pie, -game Win64
Change 2868445 on 2016/02/16 by Dmitry.Rekman
Linux: report crashes due to stack overflow (OR-14519).
- Reserve memory for alternative stack for signal handlers. Adds about 128KB memory per thread.
- Force process spawning to use vfork() when no pipes are needed.
- Ignore all signals except explicitly handled.
- Prevent signals from being raised while another one is handled.
- Added "debug threadrecurse" and "debug threadstackoverflow" to test that.
[CL 2873763 by Andrew Grant in Main branch]
2016-02-19 12:03:17 -05:00
# include "DerivedDataCacheUsageStats.h"
2015-08-10 08:14:45 -04:00
# define MAX_BACKEND_KEY_LENGTH (120)
# define MAX_BACKEND_NUMBERED_SUBFOLDER_LENGTH (9)
# if PLATFORM_LINUX // PATH_MAX on Linux is 4096 (getconf PATH_MAX /, also see limits.h), so this value can be larger (note that it is still arbitrary).
// This should not affect sharing the cache between platforms as the absolute paths will be different anyway.
# define MAX_CACHE_DIR_LEN (3119)
# else
# define MAX_CACHE_DIR_LEN (119)
# endif // PLATFORM_LINUX
# define MAX_CACHE_EXTENTION_LEN (4)
/**
* Cache server that uses the OS filesystem
* The entire API should be callable from any thread ( except the singleton can be assumed to be called at least once before concurrent access ) .
* */
class FFileSystemDerivedDataBackend : public FDerivedDataBackendInterface
{
public :
/**
* Constructor that should only be called once by the singleton , grabs the cache path from the ini
* @ param InCacheDirectory directory to store the cache in
* @ param bForceReadOnly if true , do not attempt to write to this cache
*/
FFileSystemDerivedDataBackend ( const TCHAR * InCacheDirectory , bool bForceReadOnly , bool bTouchFiles , bool bPurgeTransientData , bool bDeleteOldFiles , int32 InDaysToDeleteUnusedFiles , int32 InMaxNumFoldersToCheck , int32 InMaxContinuousFileChecks )
: CachePath ( InCacheDirectory )
, bReadOnly ( bForceReadOnly )
, bFailed ( true )
, bTouch ( bTouchFiles )
, bPurgeTransient ( bPurgeTransientData )
, DaysToDeleteUnusedFiles ( InDaysToDeleteUnusedFiles )
{
// If we find a platform that has more stingent limits, this needs to be rethought.
static_assert ( MAX_BACKEND_KEY_LENGTH + MAX_CACHE_DIR_LEN + MAX_BACKEND_NUMBERED_SUBFOLDER_LENGTH + MAX_CACHE_EXTENTION_LEN < PLATFORM_MAX_FILEPATH_LENGTH ,
" Not enough room left for cache keys in max path. " ) ;
const double SlowInitDuration = 10.0 ;
double AccessDuration = 0.0 ;
check ( CachePath . Len ( ) ) ;
FPaths : : NormalizeFilename ( CachePath ) ;
const FString AbsoluteCachePath = IFileManager : : Get ( ) . ConvertToAbsolutePathForExternalAppForRead ( * CachePath ) ;
if ( AbsoluteCachePath . Len ( ) > MAX_CACHE_DIR_LEN )
{
const FText ErrorMessage = FText : : Format ( NSLOCTEXT ( " DerivedDataCache " , " PathTooLong " , " Cache path {0} is longer than {1} characters...please adjust [DerivedDataBackendGraph] paths to be shorter (this leaves more room for cache keys). " ) , FText : : FromString ( AbsoluteCachePath ) , FText : : AsNumber ( MAX_CACHE_DIR_LEN ) ) ;
FMessageDialog : : Open ( EAppMsgType : : Ok , ErrorMessage ) ;
UE_LOG ( LogDerivedDataCache , Fatal , TEXT ( " %s " ) , * ErrorMessage . ToString ( ) ) ;
}
if ( ! bReadOnly )
{
double TestStart = FPlatformTime : : Seconds ( ) ;
FString TempFilename = CachePath / FGuid : : NewGuid ( ) . ToString ( ) + " .tmp " ;
FFileHelper : : SaveStringToFile ( FString ( " TEST " ) , * TempFilename ) ;
int32 TestFileSize = IFileManager : : Get ( ) . FileSize ( * TempFilename ) ;
if ( TestFileSize < 4 )
{
UE_LOG ( LogDerivedDataCache , Warning , TEXT ( " Fail to write to %s, derived data cache to this directory will be read only. " ) , * CachePath ) ;
}
else
{
bFailed = false ;
}
if ( TestFileSize > = 0 )
{
IFileManager : : Get ( ) . Delete ( * TempFilename , false , false , true ) ;
}
AccessDuration = FPlatformTime : : Seconds ( ) - TestStart ;
}
if ( bFailed )
{
double StartTime = FPlatformTime : : Seconds ( ) ;
TArray < FString > FilesAndDirectories ;
IFileManager : : Get ( ) . FindFiles ( FilesAndDirectories , * ( CachePath / TEXT ( " *.* " ) ) , true , true ) ;
AccessDuration = FPlatformTime : : Seconds ( ) - StartTime ;
if ( FilesAndDirectories . Num ( ) > 0 )
{
bReadOnly = true ;
bFailed = false ;
}
}
if ( FString ( FCommandLine : : Get ( ) ) . Contains ( TEXT ( " DerivedDataCache " ) ) )
{
bTouch = true ; // we always touch files when running the DDC commandlet
}
// The command line (-ddctouch) enables touch on all filesystem backends if specified.
bTouch = bTouch | | FParse : : Param ( FCommandLine : : Get ( ) , TEXT ( " DDCTOUCH " ) ) ;
if ( bReadOnly )
{
bTouch = false ; // we won't touch read only paths
}
if ( bTouch )
{
UE_LOG ( LogDerivedDataCache , Display , TEXT ( " Files in %s will be touched. " ) , * CachePath ) ;
}
2016-02-15 11:18:53 -05:00
if ( ! bFailed & & AccessDuration > SlowInitDuration & & ! GIsBuildMachine )
2015-08-10 08:14:45 -04:00
{
UE_LOG ( LogDerivedDataCache , Warning , TEXT ( " %s access is very slow (initialization took %.2lf seconds), consider disabling it. " ) , * CachePath , AccessDuration ) ;
}
if ( ! bReadOnly & & ! bFailed & & bDeleteOldFiles & & ! FParse : : Param ( FCommandLine : : Get ( ) , TEXT ( " NODDCCLEANUP " ) ) & & FDDCCleanup : : Get ( ) )
{
FDDCCleanup : : Get ( ) - > AddFilesystem ( CachePath , InDaysToDeleteUnusedFiles , InMaxNumFoldersToCheck , InMaxContinuousFileChecks ) ;
}
}
/** return true if the cache is usable **/
bool IsUsable ( )
{
return ! bFailed ;
}
/** return true if this cache is writable **/
virtual bool IsWritable ( ) override
{
return ! bReadOnly ;
}
/**
* Synchronous test for the existence of a cache item
*
* @ param CacheKey Alphanumeric + underscore key of this cache item
* @ return true if the data probably will be found , this can ' t be guaranteed because of concurrency in the backends , corruption , etc
*/
virtual bool CachedDataProbablyExists ( const TCHAR * CacheKey ) override
{
Copying //UE4/Orion-Staging to //UE4/Main (Origin //Orion/Dev-General @ 2870388)
#lockdown Nick.Penwarden
==========================
MAJOR FEATURES + CHANGES
==========================
Change 2870336 on 2016/02/17 by Marc.Audy
Continued splitting up Orion Build
* Restructure from platform based MakeBuild steps in to a PS4, Server, and Windows Client MakeBuild
* Cook server data only once for both Windows and Linux (windows reuses Linux server data)
* Split compilation of Win64 Client and Server such that MakeBuild_Server only builds Server and MakeBuild_WindowsClient only builds Client
#jira UEB-580
#rb Ben.Marsh
#tests Preflight and generated Windows Client and Server work to play game
Change 2870026 on 2016/02/17 by Wes.Hunt
Don't allow array shrinking when removing the corruption wrapper trailer.
#rb none
Updating CIS Counter
Change 2869725 on 2016/02/17 by Dmitry.Rekman
More analytics and QoS stats added for 0.19.
#rb none
#tests Ran Windows client and Linux server on compatible content.
Change 2869705 on 2016/02/16 by Ryan.Gerleve
Fix replicated properties and call RepNotifies of startup actors when scrubbing in replays.
This is the engine support for fixing OR-6817, towers not respawning when rewinding replays.
#rb john.pollard
#tests golden path, replays, ps4 nomcp
Change 2869644 on 2016/02/16 by Jason.Bestimt
#ORION_DEV - Merge MAIN (0.18) at CL# 2869635
#Tests:none
#RB:none
Change 2869586 on 2016/02/16 by Marcus.Wassmer
Fix texturestreaming RHI flushes.
#rb none
#test goldenpath
#codereview Gil.Gribb
Change 2869279 on 2016/02/16 by Lukasz.Furman
fixed minion hit reaction directions
#orion OR-13953
#rb Mieszko.Zielinski
#tests PIE: hit minions with various abilities from different angles, checked velocity of death particles when killed by abilities and towers
#codereview Dan.Youhon
Change 2869277 on 2016/02/16 by Wes.Hunt
During cook, when a package is not ready to save, actually early out of the saving code. Saves somewhere in the 130s to 200s range for cooks.
#rb daniel.lamb
#tests local windows cooks, preflight PS4 cooks
Change 2869132 on 2016/02/16 by Mieszko.Zielinski
Added a function to AISenseConfig allowing native-code MaxAge configuration #UE4
#rb Lukasz.Furman
#test none required
Change 2868981 on 2016/02/16 by Wes.Hunt
remove -LogCookStats cmdline check, always log cook stats. -SendCookAnalytics flag is still used.
This was requested by NickP.
#rb none
#tests local windows cooks
Change 2868975 on 2016/02/16 by Wes.Hunt
Don't submit DDC usage stats for zero-sized events.
#rb none
#tests local windows cook
Change 2868956 on 2016/02/16 by Jason.Bestimt
#ORION_DEV - Merge MAIN (0.18) at CL# 2868926
#RB:none
#Tests:none
Change 2868889 on 2016/02/16 by Max.Chen
Sequencer: Only allow transport control binding when editing level editor sequencers.
#rb none
#tests none
Change 2868663 on 2016/02/16 by David.Ratti
downgrade warning to display
#rb none
#tests compile
Change 2868624 on 2016/02/16 by Marcus.Wassmer
Re-Enable Defrag validation for devgeneral
#rb none
#test none
Change 2868493 on 2016/02/16 by Benn.Gallagher
Added a few more stats to morph target updates to try and narrow down hitches
#rb Bruce.Nesbit
#tests pie, -game Win64
Change 2868445 on 2016/02/16 by Dmitry.Rekman
Linux: report crashes due to stack overflow (OR-14519).
- Reserve memory for alternative stack for signal handlers. Adds about 128KB memory per thread.
- Force process spawning to use vfork() when no pipes are needed.
- Ignore all signals except explicitly handled.
- Prevent signals from being raised while another one is handled.
- Added "debug threadrecurse" and "debug threadstackoverflow" to test that.
[CL 2873763 by Andrew Grant in Main branch]
2016-02-19 12:03:17 -05:00
COOK_STAT ( auto Timer = UsageStats . TimeProbablyExists ( ) ) ;
2015-08-10 08:14:45 -04:00
check ( ! bFailed ) ;
FString Filename = BuildFilename ( CacheKey ) ;
FDateTime TimeStamp = IFileManager : : Get ( ) . GetTimeStamp ( * Filename ) ;
bool bExists = TimeStamp > FDateTime : : MinValue ( ) ;
if ( bExists )
{
// Update file timestamp to prevent it from being deleted by DDC Cleanup.
if ( bTouch | |
( ! bReadOnly & & ( FDateTime : : UtcNow ( ) - TimeStamp ) . GetDays ( ) > ( DaysToDeleteUnusedFiles / 4 ) ) )
{
IFileManager : : Get ( ) . SetTimeStamp ( * Filename , FDateTime : : UtcNow ( ) ) ;
}
2017-06-15 17:45:03 -04:00
Copying //UE4/Orion-Staging to //UE4/Main (Origin //Orion/Dev-General @ 2870388)
#lockdown Nick.Penwarden
==========================
MAJOR FEATURES + CHANGES
==========================
Change 2870336 on 2016/02/17 by Marc.Audy
Continued splitting up Orion Build
* Restructure from platform based MakeBuild steps in to a PS4, Server, and Windows Client MakeBuild
* Cook server data only once for both Windows and Linux (windows reuses Linux server data)
* Split compilation of Win64 Client and Server such that MakeBuild_Server only builds Server and MakeBuild_WindowsClient only builds Client
#jira UEB-580
#rb Ben.Marsh
#tests Preflight and generated Windows Client and Server work to play game
Change 2870026 on 2016/02/17 by Wes.Hunt
Don't allow array shrinking when removing the corruption wrapper trailer.
#rb none
Updating CIS Counter
Change 2869725 on 2016/02/17 by Dmitry.Rekman
More analytics and QoS stats added for 0.19.
#rb none
#tests Ran Windows client and Linux server on compatible content.
Change 2869705 on 2016/02/16 by Ryan.Gerleve
Fix replicated properties and call RepNotifies of startup actors when scrubbing in replays.
This is the engine support for fixing OR-6817, towers not respawning when rewinding replays.
#rb john.pollard
#tests golden path, replays, ps4 nomcp
Change 2869644 on 2016/02/16 by Jason.Bestimt
#ORION_DEV - Merge MAIN (0.18) at CL# 2869635
#Tests:none
#RB:none
Change 2869586 on 2016/02/16 by Marcus.Wassmer
Fix texturestreaming RHI flushes.
#rb none
#test goldenpath
#codereview Gil.Gribb
Change 2869279 on 2016/02/16 by Lukasz.Furman
fixed minion hit reaction directions
#orion OR-13953
#rb Mieszko.Zielinski
#tests PIE: hit minions with various abilities from different angles, checked velocity of death particles when killed by abilities and towers
#codereview Dan.Youhon
Change 2869277 on 2016/02/16 by Wes.Hunt
During cook, when a package is not ready to save, actually early out of the saving code. Saves somewhere in the 130s to 200s range for cooks.
#rb daniel.lamb
#tests local windows cooks, preflight PS4 cooks
Change 2869132 on 2016/02/16 by Mieszko.Zielinski
Added a function to AISenseConfig allowing native-code MaxAge configuration #UE4
#rb Lukasz.Furman
#test none required
Change 2868981 on 2016/02/16 by Wes.Hunt
remove -LogCookStats cmdline check, always log cook stats. -SendCookAnalytics flag is still used.
This was requested by NickP.
#rb none
#tests local windows cooks
Change 2868975 on 2016/02/16 by Wes.Hunt
Don't submit DDC usage stats for zero-sized events.
#rb none
#tests local windows cook
Change 2868956 on 2016/02/16 by Jason.Bestimt
#ORION_DEV - Merge MAIN (0.18) at CL# 2868926
#RB:none
#Tests:none
Change 2868889 on 2016/02/16 by Max.Chen
Sequencer: Only allow transport control binding when editing level editor sequencers.
#rb none
#tests none
Change 2868663 on 2016/02/16 by David.Ratti
downgrade warning to display
#rb none
#tests compile
Change 2868624 on 2016/02/16 by Marcus.Wassmer
Re-Enable Defrag validation for devgeneral
#rb none
#test none
Change 2868493 on 2016/02/16 by Benn.Gallagher
Added a few more stats to morph target updates to try and narrow down hitches
#rb Bruce.Nesbit
#tests pie, -game Win64
Change 2868445 on 2016/02/16 by Dmitry.Rekman
Linux: report crashes due to stack overflow (OR-14519).
- Reserve memory for alternative stack for signal handlers. Adds about 128KB memory per thread.
- Force process spawning to use vfork() when no pipes are needed.
- Ignore all signals except explicitly handled.
- Prevent signals from being raised while another one is handled.
- Added "debug threadrecurse" and "debug threadstackoverflow" to test that.
[CL 2873763 by Andrew Grant in Main branch]
2016-02-19 12:03:17 -05:00
COOK_STAT ( Timer . AddHit ( 0 ) ) ;
}
2015-08-10 08:14:45 -04:00
return bExists ;
}
/**
* Synchronous retrieve of a cache item
*
* @ param CacheKey Alphanumeric + underscore key of this cache item
* @ param OutData Buffer to receive the results , if any were found
* @ return true if any data was found , and in this case OutData is non - empty
*/
2015-12-10 16:56:55 -05:00
virtual bool GetCachedData ( const TCHAR * CacheKey , TArray < uint8 > & Data ) override
2015-08-10 08:14:45 -04:00
{
Copying //UE4/Orion-Staging to //UE4/Main (Origin //Orion/Dev-General @ 2870388)
#lockdown Nick.Penwarden
==========================
MAJOR FEATURES + CHANGES
==========================
Change 2870336 on 2016/02/17 by Marc.Audy
Continued splitting up Orion Build
* Restructure from platform based MakeBuild steps in to a PS4, Server, and Windows Client MakeBuild
* Cook server data only once for both Windows and Linux (windows reuses Linux server data)
* Split compilation of Win64 Client and Server such that MakeBuild_Server only builds Server and MakeBuild_WindowsClient only builds Client
#jira UEB-580
#rb Ben.Marsh
#tests Preflight and generated Windows Client and Server work to play game
Change 2870026 on 2016/02/17 by Wes.Hunt
Don't allow array shrinking when removing the corruption wrapper trailer.
#rb none
Updating CIS Counter
Change 2869725 on 2016/02/17 by Dmitry.Rekman
More analytics and QoS stats added for 0.19.
#rb none
#tests Ran Windows client and Linux server on compatible content.
Change 2869705 on 2016/02/16 by Ryan.Gerleve
Fix replicated properties and call RepNotifies of startup actors when scrubbing in replays.
This is the engine support for fixing OR-6817, towers not respawning when rewinding replays.
#rb john.pollard
#tests golden path, replays, ps4 nomcp
Change 2869644 on 2016/02/16 by Jason.Bestimt
#ORION_DEV - Merge MAIN (0.18) at CL# 2869635
#Tests:none
#RB:none
Change 2869586 on 2016/02/16 by Marcus.Wassmer
Fix texturestreaming RHI flushes.
#rb none
#test goldenpath
#codereview Gil.Gribb
Change 2869279 on 2016/02/16 by Lukasz.Furman
fixed minion hit reaction directions
#orion OR-13953
#rb Mieszko.Zielinski
#tests PIE: hit minions with various abilities from different angles, checked velocity of death particles when killed by abilities and towers
#codereview Dan.Youhon
Change 2869277 on 2016/02/16 by Wes.Hunt
During cook, when a package is not ready to save, actually early out of the saving code. Saves somewhere in the 130s to 200s range for cooks.
#rb daniel.lamb
#tests local windows cooks, preflight PS4 cooks
Change 2869132 on 2016/02/16 by Mieszko.Zielinski
Added a function to AISenseConfig allowing native-code MaxAge configuration #UE4
#rb Lukasz.Furman
#test none required
Change 2868981 on 2016/02/16 by Wes.Hunt
remove -LogCookStats cmdline check, always log cook stats. -SendCookAnalytics flag is still used.
This was requested by NickP.
#rb none
#tests local windows cooks
Change 2868975 on 2016/02/16 by Wes.Hunt
Don't submit DDC usage stats for zero-sized events.
#rb none
#tests local windows cook
Change 2868956 on 2016/02/16 by Jason.Bestimt
#ORION_DEV - Merge MAIN (0.18) at CL# 2868926
#RB:none
#Tests:none
Change 2868889 on 2016/02/16 by Max.Chen
Sequencer: Only allow transport control binding when editing level editor sequencers.
#rb none
#tests none
Change 2868663 on 2016/02/16 by David.Ratti
downgrade warning to display
#rb none
#tests compile
Change 2868624 on 2016/02/16 by Marcus.Wassmer
Re-Enable Defrag validation for devgeneral
#rb none
#test none
Change 2868493 on 2016/02/16 by Benn.Gallagher
Added a few more stats to morph target updates to try and narrow down hitches
#rb Bruce.Nesbit
#tests pie, -game Win64
Change 2868445 on 2016/02/16 by Dmitry.Rekman
Linux: report crashes due to stack overflow (OR-14519).
- Reserve memory for alternative stack for signal handlers. Adds about 128KB memory per thread.
- Force process spawning to use vfork() when no pipes are needed.
- Ignore all signals except explicitly handled.
- Prevent signals from being raised while another one is handled.
- Added "debug threadrecurse" and "debug threadstackoverflow" to test that.
[CL 2873763 by Andrew Grant in Main branch]
2016-02-19 12:03:17 -05:00
COOK_STAT ( auto Timer = UsageStats . TimeGet ( ) ) ;
2015-08-10 08:14:45 -04:00
check ( ! bFailed ) ;
FString Filename = BuildFilename ( CacheKey ) ;
double StartTime = FPlatformTime : : Seconds ( ) ;
if ( FFileHelper : : LoadFileToArray ( Data , * Filename , FILEREAD_Silent ) )
{
2016-02-15 11:18:53 -05:00
if ( ! GIsBuildMachine )
{
double ReadDuration = FPlatformTime : : Seconds ( ) - StartTime ;
double ReadSpeed = ReadDuration > 5.0 ? ( Data . Num ( ) / ReadDuration ) / ( 1024.0 * 1024.0 ) : 100.0 ;
// Slower than 0.5MB/s?
UE_CLOG ( ReadSpeed < 0.5 , LogDerivedDataCache , Warning , TEXT ( " %s is very slow (%.2lfMB/s) when accessing %s, consider disabling it. " ) , * CachePath , ReadSpeed , * Filename ) ;
}
2015-08-10 08:14:45 -04:00
UE_LOG ( LogDerivedDataCache , Verbose , TEXT ( " FileSystemDerivedDataBackend: Cache hit on %s " ) , * Filename ) ;
Copying //UE4/Orion-Staging to //UE4/Main (Origin //Orion/Dev-General @ 2870388)
#lockdown Nick.Penwarden
==========================
MAJOR FEATURES + CHANGES
==========================
Change 2870336 on 2016/02/17 by Marc.Audy
Continued splitting up Orion Build
* Restructure from platform based MakeBuild steps in to a PS4, Server, and Windows Client MakeBuild
* Cook server data only once for both Windows and Linux (windows reuses Linux server data)
* Split compilation of Win64 Client and Server such that MakeBuild_Server only builds Server and MakeBuild_WindowsClient only builds Client
#jira UEB-580
#rb Ben.Marsh
#tests Preflight and generated Windows Client and Server work to play game
Change 2870026 on 2016/02/17 by Wes.Hunt
Don't allow array shrinking when removing the corruption wrapper trailer.
#rb none
Updating CIS Counter
Change 2869725 on 2016/02/17 by Dmitry.Rekman
More analytics and QoS stats added for 0.19.
#rb none
#tests Ran Windows client and Linux server on compatible content.
Change 2869705 on 2016/02/16 by Ryan.Gerleve
Fix replicated properties and call RepNotifies of startup actors when scrubbing in replays.
This is the engine support for fixing OR-6817, towers not respawning when rewinding replays.
#rb john.pollard
#tests golden path, replays, ps4 nomcp
Change 2869644 on 2016/02/16 by Jason.Bestimt
#ORION_DEV - Merge MAIN (0.18) at CL# 2869635
#Tests:none
#RB:none
Change 2869586 on 2016/02/16 by Marcus.Wassmer
Fix texturestreaming RHI flushes.
#rb none
#test goldenpath
#codereview Gil.Gribb
Change 2869279 on 2016/02/16 by Lukasz.Furman
fixed minion hit reaction directions
#orion OR-13953
#rb Mieszko.Zielinski
#tests PIE: hit minions with various abilities from different angles, checked velocity of death particles when killed by abilities and towers
#codereview Dan.Youhon
Change 2869277 on 2016/02/16 by Wes.Hunt
During cook, when a package is not ready to save, actually early out of the saving code. Saves somewhere in the 130s to 200s range for cooks.
#rb daniel.lamb
#tests local windows cooks, preflight PS4 cooks
Change 2869132 on 2016/02/16 by Mieszko.Zielinski
Added a function to AISenseConfig allowing native-code MaxAge configuration #UE4
#rb Lukasz.Furman
#test none required
Change 2868981 on 2016/02/16 by Wes.Hunt
remove -LogCookStats cmdline check, always log cook stats. -SendCookAnalytics flag is still used.
This was requested by NickP.
#rb none
#tests local windows cooks
Change 2868975 on 2016/02/16 by Wes.Hunt
Don't submit DDC usage stats for zero-sized events.
#rb none
#tests local windows cook
Change 2868956 on 2016/02/16 by Jason.Bestimt
#ORION_DEV - Merge MAIN (0.18) at CL# 2868926
#RB:none
#Tests:none
Change 2868889 on 2016/02/16 by Max.Chen
Sequencer: Only allow transport control binding when editing level editor sequencers.
#rb none
#tests none
Change 2868663 on 2016/02/16 by David.Ratti
downgrade warning to display
#rb none
#tests compile
Change 2868624 on 2016/02/16 by Marcus.Wassmer
Re-Enable Defrag validation for devgeneral
#rb none
#test none
Change 2868493 on 2016/02/16 by Benn.Gallagher
Added a few more stats to morph target updates to try and narrow down hitches
#rb Bruce.Nesbit
#tests pie, -game Win64
Change 2868445 on 2016/02/16 by Dmitry.Rekman
Linux: report crashes due to stack overflow (OR-14519).
- Reserve memory for alternative stack for signal handlers. Adds about 128KB memory per thread.
- Force process spawning to use vfork() when no pipes are needed.
- Ignore all signals except explicitly handled.
- Prevent signals from being raised while another one is handled.
- Added "debug threadrecurse" and "debug threadstackoverflow" to test that.
[CL 2873763 by Andrew Grant in Main branch]
2016-02-19 12:03:17 -05:00
COOK_STAT ( Timer . AddHit ( Data . Num ( ) ) ) ;
2015-08-10 08:14:45 -04:00
return true ;
}
UE_LOG ( LogDerivedDataCache , Verbose , TEXT ( " FileSystemDerivedDataBackend: Cache miss on %s " ) , * Filename ) ;
Data . Empty ( ) ;
return false ;
}
/**
* Asynchronous , fire - and - forget placement of a cache item
*
* @ param CacheKey Alphanumeric + underscore key of this cache item
* @ param OutData Buffer containing the data to cache , can be destroyed after the call returns , immediately
* @ param bPutEvenIfExists If true , then do not attempt skip the put even if CachedDataProbablyExists returns true
*/
2015-12-10 16:56:55 -05:00
virtual void PutCachedData ( const TCHAR * CacheKey , TArray < uint8 > & Data , bool bPutEvenIfExists ) override
2015-08-10 08:14:45 -04:00
{
Copying //UE4/Orion-Staging to //UE4/Main (Origin //Orion/Dev-General @ 2870388)
#lockdown Nick.Penwarden
==========================
MAJOR FEATURES + CHANGES
==========================
Change 2870336 on 2016/02/17 by Marc.Audy
Continued splitting up Orion Build
* Restructure from platform based MakeBuild steps in to a PS4, Server, and Windows Client MakeBuild
* Cook server data only once for both Windows and Linux (windows reuses Linux server data)
* Split compilation of Win64 Client and Server such that MakeBuild_Server only builds Server and MakeBuild_WindowsClient only builds Client
#jira UEB-580
#rb Ben.Marsh
#tests Preflight and generated Windows Client and Server work to play game
Change 2870026 on 2016/02/17 by Wes.Hunt
Don't allow array shrinking when removing the corruption wrapper trailer.
#rb none
Updating CIS Counter
Change 2869725 on 2016/02/17 by Dmitry.Rekman
More analytics and QoS stats added for 0.19.
#rb none
#tests Ran Windows client and Linux server on compatible content.
Change 2869705 on 2016/02/16 by Ryan.Gerleve
Fix replicated properties and call RepNotifies of startup actors when scrubbing in replays.
This is the engine support for fixing OR-6817, towers not respawning when rewinding replays.
#rb john.pollard
#tests golden path, replays, ps4 nomcp
Change 2869644 on 2016/02/16 by Jason.Bestimt
#ORION_DEV - Merge MAIN (0.18) at CL# 2869635
#Tests:none
#RB:none
Change 2869586 on 2016/02/16 by Marcus.Wassmer
Fix texturestreaming RHI flushes.
#rb none
#test goldenpath
#codereview Gil.Gribb
Change 2869279 on 2016/02/16 by Lukasz.Furman
fixed minion hit reaction directions
#orion OR-13953
#rb Mieszko.Zielinski
#tests PIE: hit minions with various abilities from different angles, checked velocity of death particles when killed by abilities and towers
#codereview Dan.Youhon
Change 2869277 on 2016/02/16 by Wes.Hunt
During cook, when a package is not ready to save, actually early out of the saving code. Saves somewhere in the 130s to 200s range for cooks.
#rb daniel.lamb
#tests local windows cooks, preflight PS4 cooks
Change 2869132 on 2016/02/16 by Mieszko.Zielinski
Added a function to AISenseConfig allowing native-code MaxAge configuration #UE4
#rb Lukasz.Furman
#test none required
Change 2868981 on 2016/02/16 by Wes.Hunt
remove -LogCookStats cmdline check, always log cook stats. -SendCookAnalytics flag is still used.
This was requested by NickP.
#rb none
#tests local windows cooks
Change 2868975 on 2016/02/16 by Wes.Hunt
Don't submit DDC usage stats for zero-sized events.
#rb none
#tests local windows cook
Change 2868956 on 2016/02/16 by Jason.Bestimt
#ORION_DEV - Merge MAIN (0.18) at CL# 2868926
#RB:none
#Tests:none
Change 2868889 on 2016/02/16 by Max.Chen
Sequencer: Only allow transport control binding when editing level editor sequencers.
#rb none
#tests none
Change 2868663 on 2016/02/16 by David.Ratti
downgrade warning to display
#rb none
#tests compile
Change 2868624 on 2016/02/16 by Marcus.Wassmer
Re-Enable Defrag validation for devgeneral
#rb none
#test none
Change 2868493 on 2016/02/16 by Benn.Gallagher
Added a few more stats to morph target updates to try and narrow down hitches
#rb Bruce.Nesbit
#tests pie, -game Win64
Change 2868445 on 2016/02/16 by Dmitry.Rekman
Linux: report crashes due to stack overflow (OR-14519).
- Reserve memory for alternative stack for signal handlers. Adds about 128KB memory per thread.
- Force process spawning to use vfork() when no pipes are needed.
- Ignore all signals except explicitly handled.
- Prevent signals from being raised while another one is handled.
- Added "debug threadrecurse" and "debug threadstackoverflow" to test that.
[CL 2873763 by Andrew Grant in Main branch]
2016-02-19 12:03:17 -05:00
COOK_STAT ( auto Timer = UsageStats . TimePut ( ) ) ;
2015-08-10 08:14:45 -04:00
check ( ! bFailed ) ;
if ( ! bReadOnly )
{
if ( bPutEvenIfExists | | ! CachedDataProbablyExists ( CacheKey ) )
{
Copying //UE4/Orion-Staging to //UE4/Main (Origin //Orion/Dev-General @ 2870388)
#lockdown Nick.Penwarden
==========================
MAJOR FEATURES + CHANGES
==========================
Change 2870336 on 2016/02/17 by Marc.Audy
Continued splitting up Orion Build
* Restructure from platform based MakeBuild steps in to a PS4, Server, and Windows Client MakeBuild
* Cook server data only once for both Windows and Linux (windows reuses Linux server data)
* Split compilation of Win64 Client and Server such that MakeBuild_Server only builds Server and MakeBuild_WindowsClient only builds Client
#jira UEB-580
#rb Ben.Marsh
#tests Preflight and generated Windows Client and Server work to play game
Change 2870026 on 2016/02/17 by Wes.Hunt
Don't allow array shrinking when removing the corruption wrapper trailer.
#rb none
Updating CIS Counter
Change 2869725 on 2016/02/17 by Dmitry.Rekman
More analytics and QoS stats added for 0.19.
#rb none
#tests Ran Windows client and Linux server on compatible content.
Change 2869705 on 2016/02/16 by Ryan.Gerleve
Fix replicated properties and call RepNotifies of startup actors when scrubbing in replays.
This is the engine support for fixing OR-6817, towers not respawning when rewinding replays.
#rb john.pollard
#tests golden path, replays, ps4 nomcp
Change 2869644 on 2016/02/16 by Jason.Bestimt
#ORION_DEV - Merge MAIN (0.18) at CL# 2869635
#Tests:none
#RB:none
Change 2869586 on 2016/02/16 by Marcus.Wassmer
Fix texturestreaming RHI flushes.
#rb none
#test goldenpath
#codereview Gil.Gribb
Change 2869279 on 2016/02/16 by Lukasz.Furman
fixed minion hit reaction directions
#orion OR-13953
#rb Mieszko.Zielinski
#tests PIE: hit minions with various abilities from different angles, checked velocity of death particles when killed by abilities and towers
#codereview Dan.Youhon
Change 2869277 on 2016/02/16 by Wes.Hunt
During cook, when a package is not ready to save, actually early out of the saving code. Saves somewhere in the 130s to 200s range for cooks.
#rb daniel.lamb
#tests local windows cooks, preflight PS4 cooks
Change 2869132 on 2016/02/16 by Mieszko.Zielinski
Added a function to AISenseConfig allowing native-code MaxAge configuration #UE4
#rb Lukasz.Furman
#test none required
Change 2868981 on 2016/02/16 by Wes.Hunt
remove -LogCookStats cmdline check, always log cook stats. -SendCookAnalytics flag is still used.
This was requested by NickP.
#rb none
#tests local windows cooks
Change 2868975 on 2016/02/16 by Wes.Hunt
Don't submit DDC usage stats for zero-sized events.
#rb none
#tests local windows cook
Change 2868956 on 2016/02/16 by Jason.Bestimt
#ORION_DEV - Merge MAIN (0.18) at CL# 2868926
#RB:none
#Tests:none
Change 2868889 on 2016/02/16 by Max.Chen
Sequencer: Only allow transport control binding when editing level editor sequencers.
#rb none
#tests none
Change 2868663 on 2016/02/16 by David.Ratti
downgrade warning to display
#rb none
#tests compile
Change 2868624 on 2016/02/16 by Marcus.Wassmer
Re-Enable Defrag validation for devgeneral
#rb none
#test none
Change 2868493 on 2016/02/16 by Benn.Gallagher
Added a few more stats to morph target updates to try and narrow down hitches
#rb Bruce.Nesbit
#tests pie, -game Win64
Change 2868445 on 2016/02/16 by Dmitry.Rekman
Linux: report crashes due to stack overflow (OR-14519).
- Reserve memory for alternative stack for signal handlers. Adds about 128KB memory per thread.
- Force process spawning to use vfork() when no pipes are needed.
- Ignore all signals except explicitly handled.
- Prevent signals from being raised while another one is handled.
- Added "debug threadrecurse" and "debug threadstackoverflow" to test that.
[CL 2873763 by Andrew Grant in Main branch]
2016-02-19 12:03:17 -05:00
COOK_STAT ( Timer . AddHit ( Data . Num ( ) ) ) ;
2015-08-10 08:14:45 -04:00
check ( Data . Num ( ) ) ;
FString Filename = BuildFilename ( CacheKey ) ;
FString TempFilename ( TEXT ( " temp. " ) ) ;
TempFilename + = FGuid : : NewGuid ( ) . ToString ( ) ;
TempFilename = FPaths : : GetPath ( Filename ) / TempFilename ;
bool bResult ;
{
bResult = FFileHelper : : SaveArrayToFile ( Data , * TempFilename ) ;
}
if ( bResult )
{
if ( IFileManager : : Get ( ) . FileSize ( * TempFilename ) = = Data . Num ( ) )
{
bool DoMove = ! CachedDataProbablyExists ( CacheKey ) ;
if ( bPutEvenIfExists & & ! DoMove )
{
DoMove = true ;
RemoveCachedData ( CacheKey , /*bTransient=*/ false ) ;
}
if ( DoMove )
{
if ( ! IFileManager : : Get ( ) . Move ( * Filename , * TempFilename , true , true , false , true ) )
{
UE_LOG ( LogDerivedDataCache , Log , TEXT ( " FFileSystemDerivedDataBackend: Move collision, attempt at redundant update, OK %s. " ) , * Filename ) ;
}
else
{
UE_LOG ( LogDerivedDataCache , Verbose , TEXT ( " FFileSystemDerivedDataBackend: Successful cache put to %s " ) , * Filename ) ;
}
}
}
else
{
UE_LOG ( LogDerivedDataCache , Warning , TEXT ( " FFileSystemDerivedDataBackend: Temp file is short %s! " ) , * TempFilename ) ;
}
}
else
{
UE_LOG ( LogDerivedDataCache , Warning , TEXT ( " FFileSystemDerivedDataBackend: Could not write temp file %s! " ) , * TempFilename ) ;
}
// if everything worked, this is not necessary, but we will make every effort to avoid leaving junk in the cache
if ( FPaths : : FileExists ( TempFilename ) )
{
IFileManager : : Get ( ) . Delete ( * TempFilename , false , false , true ) ;
}
}
}
}
void RemoveCachedData ( const TCHAR * CacheKey , bool bTransient ) override
{
check ( ! bFailed ) ;
if ( ! bReadOnly & & ( ! bTransient | | bPurgeTransient ) )
{
FString Filename = BuildFilename ( CacheKey ) ;
if ( bTransient )
{
UE_LOG ( LogDerivedDataCache , Verbose , TEXT ( " Deleting transient cached data. Key=%s Filename=%s " ) , CacheKey , * Filename ) ;
}
IFileManager : : Get ( ) . Delete ( * Filename , false , false , true ) ;
}
}
Copying //UE4/Orion-Staging to //UE4/Main (Origin //Orion/Dev-General @ 2870388)
#lockdown Nick.Penwarden
==========================
MAJOR FEATURES + CHANGES
==========================
Change 2870336 on 2016/02/17 by Marc.Audy
Continued splitting up Orion Build
* Restructure from platform based MakeBuild steps in to a PS4, Server, and Windows Client MakeBuild
* Cook server data only once for both Windows and Linux (windows reuses Linux server data)
* Split compilation of Win64 Client and Server such that MakeBuild_Server only builds Server and MakeBuild_WindowsClient only builds Client
#jira UEB-580
#rb Ben.Marsh
#tests Preflight and generated Windows Client and Server work to play game
Change 2870026 on 2016/02/17 by Wes.Hunt
Don't allow array shrinking when removing the corruption wrapper trailer.
#rb none
Updating CIS Counter
Change 2869725 on 2016/02/17 by Dmitry.Rekman
More analytics and QoS stats added for 0.19.
#rb none
#tests Ran Windows client and Linux server on compatible content.
Change 2869705 on 2016/02/16 by Ryan.Gerleve
Fix replicated properties and call RepNotifies of startup actors when scrubbing in replays.
This is the engine support for fixing OR-6817, towers not respawning when rewinding replays.
#rb john.pollard
#tests golden path, replays, ps4 nomcp
Change 2869644 on 2016/02/16 by Jason.Bestimt
#ORION_DEV - Merge MAIN (0.18) at CL# 2869635
#Tests:none
#RB:none
Change 2869586 on 2016/02/16 by Marcus.Wassmer
Fix texturestreaming RHI flushes.
#rb none
#test goldenpath
#codereview Gil.Gribb
Change 2869279 on 2016/02/16 by Lukasz.Furman
fixed minion hit reaction directions
#orion OR-13953
#rb Mieszko.Zielinski
#tests PIE: hit minions with various abilities from different angles, checked velocity of death particles when killed by abilities and towers
#codereview Dan.Youhon
Change 2869277 on 2016/02/16 by Wes.Hunt
During cook, when a package is not ready to save, actually early out of the saving code. Saves somewhere in the 130s to 200s range for cooks.
#rb daniel.lamb
#tests local windows cooks, preflight PS4 cooks
Change 2869132 on 2016/02/16 by Mieszko.Zielinski
Added a function to AISenseConfig allowing native-code MaxAge configuration #UE4
#rb Lukasz.Furman
#test none required
Change 2868981 on 2016/02/16 by Wes.Hunt
remove -LogCookStats cmdline check, always log cook stats. -SendCookAnalytics flag is still used.
This was requested by NickP.
#rb none
#tests local windows cooks
Change 2868975 on 2016/02/16 by Wes.Hunt
Don't submit DDC usage stats for zero-sized events.
#rb none
#tests local windows cook
Change 2868956 on 2016/02/16 by Jason.Bestimt
#ORION_DEV - Merge MAIN (0.18) at CL# 2868926
#RB:none
#Tests:none
Change 2868889 on 2016/02/16 by Max.Chen
Sequencer: Only allow transport control binding when editing level editor sequencers.
#rb none
#tests none
Change 2868663 on 2016/02/16 by David.Ratti
downgrade warning to display
#rb none
#tests compile
Change 2868624 on 2016/02/16 by Marcus.Wassmer
Re-Enable Defrag validation for devgeneral
#rb none
#test none
Change 2868493 on 2016/02/16 by Benn.Gallagher
Added a few more stats to morph target updates to try and narrow down hitches
#rb Bruce.Nesbit
#tests pie, -game Win64
Change 2868445 on 2016/02/16 by Dmitry.Rekman
Linux: report crashes due to stack overflow (OR-14519).
- Reserve memory for alternative stack for signal handlers. Adds about 128KB memory per thread.
- Force process spawning to use vfork() when no pipes are needed.
- Ignore all signals except explicitly handled.
- Prevent signals from being raised while another one is handled.
- Added "debug threadrecurse" and "debug threadstackoverflow" to test that.
[CL 2873763 by Andrew Grant in Main branch]
2016-02-19 12:03:17 -05:00
virtual void GatherUsageStats ( TMap < FString , FDerivedDataCacheUsageStats > & UsageStatsMap , FString & & GraphPath ) override
{
COOK_STAT ( UsageStatsMap . Add ( FString : : Printf ( TEXT ( " %s: %s.%s " ) , * GraphPath , TEXT ( " FileSystem " ) , * CachePath ) , UsageStats ) ) ;
}
2015-08-10 08:14:45 -04:00
private :
Copying //UE4/Orion-Staging to //UE4/Main (Origin //Orion/Dev-General @ 2870388)
#lockdown Nick.Penwarden
==========================
MAJOR FEATURES + CHANGES
==========================
Change 2870336 on 2016/02/17 by Marc.Audy
Continued splitting up Orion Build
* Restructure from platform based MakeBuild steps in to a PS4, Server, and Windows Client MakeBuild
* Cook server data only once for both Windows and Linux (windows reuses Linux server data)
* Split compilation of Win64 Client and Server such that MakeBuild_Server only builds Server and MakeBuild_WindowsClient only builds Client
#jira UEB-580
#rb Ben.Marsh
#tests Preflight and generated Windows Client and Server work to play game
Change 2870026 on 2016/02/17 by Wes.Hunt
Don't allow array shrinking when removing the corruption wrapper trailer.
#rb none
Updating CIS Counter
Change 2869725 on 2016/02/17 by Dmitry.Rekman
More analytics and QoS stats added for 0.19.
#rb none
#tests Ran Windows client and Linux server on compatible content.
Change 2869705 on 2016/02/16 by Ryan.Gerleve
Fix replicated properties and call RepNotifies of startup actors when scrubbing in replays.
This is the engine support for fixing OR-6817, towers not respawning when rewinding replays.
#rb john.pollard
#tests golden path, replays, ps4 nomcp
Change 2869644 on 2016/02/16 by Jason.Bestimt
#ORION_DEV - Merge MAIN (0.18) at CL# 2869635
#Tests:none
#RB:none
Change 2869586 on 2016/02/16 by Marcus.Wassmer
Fix texturestreaming RHI flushes.
#rb none
#test goldenpath
#codereview Gil.Gribb
Change 2869279 on 2016/02/16 by Lukasz.Furman
fixed minion hit reaction directions
#orion OR-13953
#rb Mieszko.Zielinski
#tests PIE: hit minions with various abilities from different angles, checked velocity of death particles when killed by abilities and towers
#codereview Dan.Youhon
Change 2869277 on 2016/02/16 by Wes.Hunt
During cook, when a package is not ready to save, actually early out of the saving code. Saves somewhere in the 130s to 200s range for cooks.
#rb daniel.lamb
#tests local windows cooks, preflight PS4 cooks
Change 2869132 on 2016/02/16 by Mieszko.Zielinski
Added a function to AISenseConfig allowing native-code MaxAge configuration #UE4
#rb Lukasz.Furman
#test none required
Change 2868981 on 2016/02/16 by Wes.Hunt
remove -LogCookStats cmdline check, always log cook stats. -SendCookAnalytics flag is still used.
This was requested by NickP.
#rb none
#tests local windows cooks
Change 2868975 on 2016/02/16 by Wes.Hunt
Don't submit DDC usage stats for zero-sized events.
#rb none
#tests local windows cook
Change 2868956 on 2016/02/16 by Jason.Bestimt
#ORION_DEV - Merge MAIN (0.18) at CL# 2868926
#RB:none
#Tests:none
Change 2868889 on 2016/02/16 by Max.Chen
Sequencer: Only allow transport control binding when editing level editor sequencers.
#rb none
#tests none
Change 2868663 on 2016/02/16 by David.Ratti
downgrade warning to display
#rb none
#tests compile
Change 2868624 on 2016/02/16 by Marcus.Wassmer
Re-Enable Defrag validation for devgeneral
#rb none
#test none
Change 2868493 on 2016/02/16 by Benn.Gallagher
Added a few more stats to morph target updates to try and narrow down hitches
#rb Bruce.Nesbit
#tests pie, -game Win64
Change 2868445 on 2016/02/16 by Dmitry.Rekman
Linux: report crashes due to stack overflow (OR-14519).
- Reserve memory for alternative stack for signal handlers. Adds about 128KB memory per thread.
- Force process spawning to use vfork() when no pipes are needed.
- Ignore all signals except explicitly handled.
- Prevent signals from being raised while another one is handled.
- Added "debug threadrecurse" and "debug threadstackoverflow" to test that.
[CL 2873763 by Andrew Grant in Main branch]
2016-02-19 12:03:17 -05:00
FDerivedDataCacheUsageStats UsageStats ;
2015-08-10 08:14:45 -04:00
/**
* Threadsafe method to compute the filename from the cachekey , currently just adds a path and an extension .
*
* @ param CacheKey Alphanumeric + underscore key of this cache item
* @ return filename built from the cache key
*/
FString BuildFilename ( const TCHAR * CacheKey )
{
FString Key = FString ( CacheKey ) . ToUpper ( ) ;
for ( int32 i = 0 ; i < Key . Len ( ) ; i + + )
{
check ( FChar : : IsAlnum ( Key [ i ] ) | | FChar : : IsUnderscore ( Key [ i ] ) | | Key [ i ] = = L ' $ ' ) ;
}
uint32 Hash = FCrc : : StrCrc_DEPRECATED ( * Key ) ;
// this creates a tree of 1000 directories
FString HashPath = FString : : Printf ( TEXT ( " %1d/%1d/%1d/ " ) , ( Hash / 100 ) % 10 , ( Hash / 10 ) % 10 , Hash % 10 ) ;
return CachePath / HashPath / Key + TEXT ( " .udd " ) ;
}
/** Base path we are storing the cache files in. **/
FString CachePath ;
/** If true, do not attempt to write to this cache **/
bool bReadOnly ;
/** If true, we failed to write to this directory and it did not contain anything so we should not be used **/
bool bFailed ;
/** If true, CachedDataProbablyExists will update the file timestamps. */
bool bTouch ;
/** If true, allow transient data to be removed from the cache. */
bool bPurgeTransient ;
/** Age of file when it should be deleted from DDC cache. */
int32 DaysToDeleteUnusedFiles ;
} ;
FDerivedDataBackendInterface * CreateFileSystemDerivedDataBackend ( const TCHAR * CacheDirectory , bool bForceReadOnly /*= false*/ , bool bTouchFiles /*= false*/ , bool bPurgeTransient /*= false*/ , bool bDeleteOldFiles /*= false*/ , int32 InDaysToDeleteUnusedFiles /*= 60*/ , int32 InMaxNumFoldersToCheck /*= -1*/ , int32 InMaxContinuousFileChecks /*= -1*/ )
{
FFileSystemDerivedDataBackend * FileDDB = new FFileSystemDerivedDataBackend ( CacheDirectory , bForceReadOnly , bTouchFiles , bPurgeTransient , bDeleteOldFiles , InDaysToDeleteUnusedFiles , InMaxNumFoldersToCheck , InMaxContinuousFileChecks ) ;
if ( ! FileDDB - > IsUsable ( ) )
{
delete FileDDB ;
FileDDB = NULL ;
}
return FileDDB ;
}