summaryrefslogtreecommitdiff
path: root/source/slang-record-replay/record/record-manager.cpp
diff options
context:
space:
mode:
authorkaizhangNV <149626564+kaizhangNV@users.noreply.github.com>2024-07-31 15:03:27 -0500
committerGitHub <noreply@github.com>2024-07-31 13:03:27 -0700
commitbab4b821dc6bcee4ff86751743762584c17e9103 (patch)
treef67eb2e1d4825cc45808cca285b0936b3f25827f /source/slang-record-replay/record/record-manager.cpp
parent93a3ba812dd33b10f166f9172bd781e84d938e21 (diff)
Feature/replayer (#4750)
* record/replay: Implement the json consumer Finish the implementation of json consumer. Fix some bug in the block processing as Tailer is not a necessary block so if the Magic bit is "HEAD", we should keep processing. * record/replay: Implement the replayer component Implement the replayer consumer, and also finish the slang-replay standalone app that will run the while replayer. It can take an option "--convert-json | -cj" which will convert the record binary file to a human readable json file. If there is no option provided, it will replay the record file by default. TODO: #4764 is created to remove the std::filesystem usage.
Diffstat (limited to 'source/slang-record-replay/record/record-manager.cpp')
-rw-r--r--source/slang-record-replay/record/record-manager.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/source/slang-record-replay/record/record-manager.cpp b/source/slang-record-replay/record/record-manager.cpp
index f10d2c704..0979a170f 100644
--- a/source/slang-record-replay/record/record-manager.cpp
+++ b/source/slang-record-replay/record/record-manager.cpp
@@ -4,6 +4,7 @@
#include <thread>
#include "../util/record-utility.h"
#include "record-manager.h"
+#include "../../core/slang-io.h"
namespace SlangRecord
{
@@ -15,7 +16,8 @@ namespace SlangRecord
m_recordFileDirectory = m_recordFileDirectory / "slang-record";
- if (!std::filesystem::exists(m_recordFileDirectory))
+ Slang::String recordFileDirectory {m_recordFileDirectory.string().c_str()};
+ if (!Slang::File::exists(recordFileDirectory))
{
std::error_code ec;
if (!std::filesystem::create_directory(m_recordFileDirectory, ec))
@@ -78,7 +80,7 @@ namespace SlangRecord
return &m_recorder;
}
- void RecordManager::endMethodRecordAppendOutput()
+ void RecordManager::apendOutput()
{
FunctionTailer* pTailer = const_cast<FunctionTailer*>(
reinterpret_cast<const FunctionTailer*>(m_memoryStream.getData()));