MCPcopy Create free account
hub / github.com/FEX-Emu/FEX / TraceObject

Function TraceObject

FEXCore/Source/Utils/Profiler.cpp:95–103  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

93}
94
95void TraceObject(const std::string_view Format, uint64_t Duration) {
96 if (TraceFD != -1) {
97 // Print the duration as something that began negative duration ago
98 const auto StringSize = Format.size() + strlen(" (lduration=-)\n") + 22;
99 auto Event = reinterpret_cast<char*>(alloca(StringSize));
100 auto Res = ::fmt::format_to_n(Event, StringSize, "{} (lduration=-{})\n", Format, Duration);
101 write(TraceFD, Event, Res.size);
102 }
103}
104
105void TraceObject(const std::string_view Format) {
106 if (TraceFD != -1) {

Callers 1

~ProfilerBlockMethod · 0.70

Calls 2

writeFunction · 0.50
sizeMethod · 0.45

Tested by

no test coverage detected