Commit Graph

67 Commits

Author SHA1 Message Date
ionut matasaru
6cdd7de1dd Fixed support for unicode file names (for trace files) in UnrealTraceServer. Increased minor version to 12 and updated binaries for UnrealTraceServer.exe/.pdb.
#jira UE-155288
#rb Martin.Ridgers
#preflight skip

[CL 21664812 by ionut matasaru in ue5-main branch]
2022-08-29 03:50:07 -04:00
ionut matasaru
5b3af1dc9f Updated icon for UnrealTraceServer.exe
#jira UE-157650
#rb Martin.Ridgers
#preflight skip

[CL 21664702 by ionut matasaru in ue5-main branch]
2022-08-29 03:48:31 -04:00
Martin Ridgers
6999c6960c Reinstated FTrace::GetName() encapsulation
7ae9c1e / Martin Ridgers / 2022-07-06 10:55:04 +0200

#rb im
#rnx
#preflight none
#jira UE-158352

[CL 20981125 by Martin Ridgers in ue5-main branch]
2022-07-07 02:17:15 -04:00
Martin Ridgers
773ded0f89 Updated Readme.md
#rnx
#rb trivial
#preflight none

[CL 20965103 by Martin Ridgers in ue5-main branch]
2022-07-06 08:04:29 -04:00
Martin Ridgers
3ccb638c4c Version bump
a863182 / Martin Ridgers / 2022-07-06 10:55:47 +0200

#rnx
#rb trivial
#preflight none

[CL 20965094 by Martin Ridgers in ue5-main branch]
2022-07-06 08:02:52 -04:00
Martin Ridgers
0fb3237839 Deleted traces were not being removed from the store
b257466 / Martin Ridgers / 2022-07-06 11:35:28 +0200

#rnx
#rb trivial
#jira ue-158352
#preflight none

[CL 20965070 by Martin Ridgers in ue5-main branch]
2022-07-06 08:01:02 -04:00
Martin Ridgers
5879c2117c Fixed possible stack overflow
abb645f / Martin Ridgers / 2022-07-06 11:06:47 +0200

#preflight none
#rnx
#rb trivial

[CL 20964964 by Martin Ridgers in ue5-main branch]
2022-07-06 07:44:02 -04:00
Johan Berg
7312d001c4 Add UnrealTraceServer solution and project file.
#rb none
#preflight 62bf543a1c0b7587977a52f1
#robomerge EngineMerge

[CL 20920658 by Johan Berg in ue5-main branch]
2022-07-01 16:27:06 -04:00
Johan Berg
50f1edb33e [UnrealTraceServer] Use std::filesystem::path throughout the process.
In order to support UTF-8 compatible filenames, keep the path representation of trace files as long as possible. When transmitting them as CBOR convert them using `u8string` function.

Also use non throwing overloads of some `std::filesystem` functions to avoid crashing the server if a file is deleted before a file operation is performed.

#jira UE-155288, UE-151250
#robomerge EngineMerge
#preflight 62bedb6bb447118888501429

[CL 20912946 by Johan Berg in ue5-main branch]
2022-07-01 07:38:06 -04:00
Martin Ridgers
211fae8a95 UnrealTraceServer Linux/Mac implementation and more.
- Forward fork's command line arguments to the daemon (9c481e3)
- Added command line options to control store dir and ports (6ffd7db)
- Added cxxopts (544d33a)
- Treat some store paths as fs::path objects instead of char strings (7ebe3d4)
- Version bump (57e3d65)
- Daemon no longer needs to expect the lock file to not exist (f5625a1)
- Added a timeout when waiting on a daemon (1ac42fd)
- Wait for the daemon by waiting on child processes or signals (d212f29)
- Completely daemonise by detaching from the parent and any terminal (b9c51ce)
- Correctly respond to SIGTERM and SIGINT signals (039fd43)
- Use the PID returned by the lock query as that more robust (44ff23e)
- Delete orphaned lock files (d227389)
- Use fcntl locks instead of flock ones. (d59bdff)
- Missed a few close() calls (4e54cbc)
- Keep the lock file somemore more global and make sure all users have access (fe2a578)
- There is no longer a need to validate the binary path (1d76482)
- Use flock() to have the daemon hold an exclusive lock on the lock file (ca54648)
- Moved 3rdparty to thirdparty inline with TPS expectations (4574f3e)
- Make sure FMount::Id is set (818ea56)
- Removed superfluous argument to GetMountCount() (74ff594)
- Allow the store to mount more than one directory to read traces from (f11459a)
- Have GetStoreDir() return a string instead of a pointer to one (0456c9d)
- Keep methods and members grouped (cf9f322)
- Removed an unused block of code (891eefa)
- Added funciton to convery fs::path to a FString (287cc70)
- Aliased std::filesystem to fs as the former is very wordy (b5eac19)
- Added a conversion constructor (942f8ef)
- Drop down to C++17 as that matches Ubuntu LTS' current best version (46f7c02)
- Deleted dummy dir-watcher impl (30b9976)
- Removed directory-watcher preprocessor conditions (e36679b)
- Integrated change 19143970 (75d0f6f)
- Integrated change 19143744 (dad341b)
- Integrated change 19070550 (3384a7d)

#rb jb
#rnx
#preflight 6238792dbe1e4104d345181e

[CL 19451192 by Martin Ridgers in ue5-main branch]
2022-03-21 09:36:32 -04:00
Martin Ridgers
eb605a5a71 Version bump
(git:8795212 - Martin Ridgers - 2021-11-04 08:46:10 +0100)

[CL 18048957 by Martin Ridgers in ue5-main branch]
2021-11-04 04:12:41 -04:00
Martin Ridgers
f1a46b0fa4 Added a way to spawn an unelvated child process from an elevated parent
(git:d7ac559 - Martin Ridgers - 2021-11-03 15:26:34 +0100)

[CL 18048953 by Martin Ridgers in ue5-main branch]
2021-11-04 04:12:30 -04:00
Martin Ridgers
87ad5622d7 Split the two schemes of starting a child UnrealTraceServer process into separate functions
(git:2778f91 - Martin Ridgers - 2021-11-03 15:25:32 +0100)

[CL 18048949 by Martin Ridgers in ue5-main branch]
2021-11-04 04:12:22 -04:00
Martin Ridgers
b6a2e8a78a Added missing include
9a52de8 / Martin Ridgers / 2021-09-09 10:18:14 +0200

[CL 17470666 by Martin Ridgers in ue5-main branch]
2021-09-09 06:23:37 -04:00
Martin Ridgers
817c79dc99 Version bump
7046877 / Martin Ridgers / 2021-09-06 13:37:34 +0200

[CL 17437719 by Martin Ridgers in ue5-main branch]
2021-09-06 08:09:01 -04:00
Martin Ridgers
aa5694a26f Fallback to %USERPROFILE% if SHGetFolderPath() fails
899150b / Martin Ridgers / 2021-09-06 13:36:21 +0200

[CL 17437718 by Martin Ridgers in ue5-main branch]
2021-09-06 08:08:55 -04:00
Martin Ridgers
142f49d912 Include GetLastError() just in case setting the working directory happens to fail
223e89d / Martin Ridgers / 2021-09-06 13:30:04 +0200

[CL 17437711 by Martin Ridgers in ue5-main branch]
2021-09-06 08:08:06 -04:00
Martin Ridgers
25e863fc8c Remove any administrator privileges from the daemon. Not that the token is still considered elevated for now.
ff3b45c / Martin Ridgers / 2021-09-06 13:28:52 +0200

[CL 17437652 by Martin Ridgers in ue5-main branch]
2021-09-06 08:02:38 -04:00
Martin Ridgers
1fbfc3a502 Use the error_code variant in case create_directories throws an exception
88a366f / Martin Ridgers / 2021-09-06 13:27:55 +0200

[CL 17437649 by Martin Ridgers in ue5-main branch]
2021-09-06 08:02:30 -04:00
Martin Ridgers
9fded1be28 Debug builds always copy the trace server's binary out of the tree
6f913e7 / Martin Ridgers / 2021-09-06 13:27:18 +0200

[CL 17437644 by Martin Ridgers in ue5-main branch]
2021-09-06 08:01:28 -04:00
Martin Ridgers
6324f56b11 Put the threaded mode of the daemon behind its own define
b0ad3b6 / Martin Ridgers / 2021-09-06 13:26:33 +0200

[CL 17437630 by Martin Ridgers in ue5-main branch]
2021-09-06 07:58:29 -04:00
Martin Ridgers
3de0c803d8 UnrealTraceStore was locking the directory it was launched from
229bc59 / Martin Ridgers / 2021-09-06 11:01:30 +0200

[CL 17437627 by Martin Ridgers in ue5-main branch]
2021-09-06 07:58:21 -04:00
Martin Ridgers
e42372b04b Use a lock file instead of a shared-memory and semaphores as they orphan easily
d0ce7dd / Martin Ridgers / 2021-08-31 11:30:14 +0200

[CL 17416636 by Martin Ridgers in ue5-main branch]
2021-09-03 01:31:43 -04:00
Martin Ridgers
c094a7aee2 Flush log file writes
8c5de4f / Martin Ridgers / 2021-08-31 10:03:40 +0200

[CL 17416621 by Martin Ridgers in ue5-main branch]
2021-09-03 01:31:34 -04:00
Martin Ridgers
2b01886f39 Use the same "home" location for logs and lock files
ab6f020 / Martin Ridgers / 2021-08-31 10:03:09 +0200

[CL 17405999 by Martin Ridgers in ue5-main branch]
2021-09-02 14:10:51 -04:00