#include <string.h>
#include "os.hpp"
-#include "os_path.hpp"
+#include "os_thread.hpp"
+#include "os_string.hpp"
#include "trace_file.hpp"
#include "trace_writer.hpp"
#include "trace_format.hpp"
void
LocalWriter::open(void) {
- os::Path szFileName;
+ os::String szFileName;
const char *lpFileName;
if (!lpFileName) {
static unsigned dwCounter = 0;
- os::Path process = os::getProcessName();
+ os::String process = os::getProcessName();
#ifdef _WIN32
process.trimExtension();
#endif
process.trimDirectory();
- os::Path prefix = os::getCurrentDir();
+ os::String prefix = os::getCurrentDir();
prefix.join(process);
for (;;) {
FILE *file;
if (dwCounter)
- szFileName = os::Path::format("%s.%u.trace", prefix.str(), dwCounter);
+ szFileName = os::String::format("%s.%u.trace", prefix.str(), dwCounter);
else
- szFileName = os::Path::format("%s.trace", prefix.str());
+ szFileName = os::String::format("%s.trace", prefix.str());
lpFileName = szFileName;
file = fopen(lpFileName, "rb");
open();
}
- return Writer::beginEnter(sig);
+ os::thread::id id = os::this_thread::get_id();
+
+ return Writer::beginEnter(sig, static_cast<unsigned>(id));
}
void LocalWriter::endEnter(void) {