Skip to content
Snippets Groups Projects
Commit 93ff4a8c authored by Sebastian Hahta's avatar Sebastian Hahta
Browse files

Fix windows build for profiler and add profiler logging

parent 5eeef5a7
No related branches found
No related tags found
No related merge requests found
...@@ -38,3 +38,9 @@ ...@@ -38,3 +38,9 @@
#define FTL_Profile(LABEL, LIMIT) {} #define FTL_Profile(LABEL, LIMIT) {}
#endif #endif
inline void FTL_PROFILE_LOG(const std::string& message) {
#ifdef TRACY_ENABLE
TracyMessage(message.c_str(), message.size());
#endif
}
\ No newline at end of file
#ifdef WIN32 #ifdef WIN32
#include <Ws2tcpip.h> #include <Ws2tcpip.h>
#include <windows.h> #include <windows.h>
#include <string>
#endif #endif
#include <ftl/lib/ctpl_stl.hpp> #include <ftl/lib/ctpl_stl.hpp>
......
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
#include "netstream.hpp" #include "netstream.hpp"
#include <ftl/time.hpp> #include <ftl/time.hpp>
#include <ftl/counter.hpp> #include <ftl/counter.hpp>
#include <ftl/profiler.hpp>
#include "../uuidMSGPACK.hpp" #include "../uuidMSGPACK.hpp"
#include "packetMsgpack.hpp" #include "packetMsgpack.hpp"
...@@ -370,6 +371,8 @@ void Net::_run() { ...@@ -370,6 +371,8 @@ void Net::_run() {
c = std::move(ftl::Counter(&state->active)), c = std::move(ftl::Counter(&state->active)),
c2 = std::move(ftl::Counter(&jobs_)), c2 = std::move(ftl::Counter(&jobs_)),
framePackets](int ix) { framePackets](int ix) {
FTL_PROFILE_SCOPE("ProcessFramePackets");
for (auto buf : framePackets) { for (auto buf : framePackets) {
StreamPacket *spkt; StreamPacket *spkt;
DataPacket *pkt; DataPacket *pkt;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment