Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/wolfpld/tracy.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBartosz Taudul <wolf@nereid.pl>2022-10-09 22:59:18 +0300
committerBartosz Taudul <wolf@nereid.pl>2022-10-09 22:59:18 +0300
commit76213331f432f9f38983890905436670f8ac090a (patch)
tree39c639794c54a4bd62defcc2f12775a6c6b1fdf6 /profiler
parentf2f36876e1580e4871b6c6435edc3e3dbd161838 (diff)
Store PID in broadcasting clients data.
Diffstat (limited to 'profiler')
-rw-r--r--profiler/src/main.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/profiler/src/main.cpp b/profiler/src/main.cpp
index 5832dea1..40e7a8d7 100644
--- a/profiler/src/main.cpp
+++ b/profiler/src/main.cpp
@@ -62,6 +62,7 @@ struct ClientData
uint32_t protocolVersion;
int32_t activeTime;
uint16_t port;
+ uint64_t pid;
std::string procName;
std::string address;
};
@@ -295,6 +296,7 @@ static void DrawContents()
const auto procname = bm.programName;
const auto activeTime = bm.activeTime;
const auto listenPort = bm.listenPort;
+ const auto pid = bm.pid;
auto address = addr.GetText();
const auto ipNumerical = addr.GetNumber();
@@ -317,13 +319,14 @@ static void DrawContents()
} );
}
resolvLock.unlock();
- clients.emplace( clientId, ClientData { time, protoVer, activeTime, listenPort, procname, std::move( ip ) } );
+ clients.emplace( clientId, ClientData { time, protoVer, activeTime, listenPort, pid, procname, std::move( ip ) } );
}
else
{
it->second.time = time;
it->second.activeTime = activeTime;
it->second.port = listenPort;
+ it->second.pid = pid;
it->second.protocolVersion = protoVer;
if( strcmp( it->second.procName.c_str(), procname ) != 0 ) it->second.procName = procname;
}