a few new profiles and code to ensure they get written better...more incoming later

This commit is contained in:
DarthArgus
2018-06-03 20:10:08 +00:00
parent a2460861a3
commit ba669fcb39
11 changed files with 107 additions and 3 deletions
@@ -28,8 +28,17 @@
#include "LocalizationManager.h"
#include "UnicodeUtils.h"
#ifdef ENABLE_PROFILING
extern "C" int __llvm_profile_write_file(void);
#endif
inline void signalHandler(int s){
printf("CommoditiesServer terminating, signal %d\n",s);
#ifdef ENABLE_PROFILING
__llvm_profile_write_file();
#endif
exit(0);
}
@@ -86,6 +95,10 @@ int main(int argc, char ** argv)
SetupSharedFoundation::remove();
SetupSharedThread::remove();
#ifdef ENABLE_PROFILING
__llvm_profile_write_file();
#endif
return 0;
}
@@ -14,8 +14,17 @@
#include "sharedRandom/SetupSharedRandom.h"
#include "sharedThread/SetupSharedThread.h"
#ifdef ENABLE_PROFILING
extern "C" int __llvm_profile_write_file(void);
#endif
inline void signalHandler(int s){
printf("ConnectionServer terminating, signal %d\n",s);
#ifdef ENABLE_PROFILING
__llvm_profile_write_file();
#endif
exit(0);
}
@@ -66,6 +75,10 @@ int main(int argc, char ** argv)
NetworkHandler::remove();
SetupSharedFoundation::remove();
SetupSharedThread::remove();
#ifdef ENABLE_PROFILING
__llvm_profile_write_file();
#endif
return 0;
}
@@ -20,17 +20,25 @@
#include "sharedThread/SetupSharedThread.h"
#ifdef ENABLE_PROFILING
extern "C" int __llvm_profile_write_file(void);
#endif
inline void signalHandler(int s){
printf("LogServer terminating, signal %d\n",s);
#ifdef ENABLE_PROFILING
__llvm_profile_write_file();
#endif
exit(0);
}
#endif
// ======================================================================
int main(int argc, char **argv)
{
struct sigaction sigIntHandler;
struct sigaction sigIntHandler;
sigIntHandler.sa_handler = signalHandler;
sigemptyset(&sigIntHandler.sa_mask);
sigIntHandler.sa_flags = 0;
@@ -62,6 +70,10 @@ int main(int argc, char **argv)
SetupSharedFoundation::remove();
SetupSharedThread::remove();
#ifdef ENABLE_PROFILING
__llvm_profile_write_file();
#endif
return 0;
}
@@ -14,10 +14,19 @@
#include "sharedRandom/SetupSharedRandom.h"
#include "sharedThread/SetupSharedThread.h"
#ifdef ENABLE_PROFILING
extern "C" int __llvm_profile_write_file(void);
#endif
// ======================================================================
inline void signalHandler(int s){
printf("LoginServer terminating, signal %d\n",s);
#ifdef ENABLE_PROFILING
__llvm_profile_write_file();
#endif
exit(0);
}
@@ -56,5 +65,9 @@ int main(int argc, char **argv) {
SetupSharedFoundation::callbackWithExceptionHandling(LoginServer::run);
SetupSharedFoundation::remove();
#ifdef ENABLE_PROFILING
__llvm_profile_write_file();
#endif
return 0;
}
@@ -16,8 +16,17 @@
#include "sharedThread/SetupSharedThread.h"
#include "sharedUtility/SetupSharedUtility.h"
#ifdef ENABLE_PROFILING
extern "C" int __llvm_profile_write_file(void);
#endif
inline void signalHandler(int s){
printf("PlanetServer terminating, signal %d\n",s);
#ifdef ENABLE_PROFILING
__llvm_profile_write_file();
#endif
exit(0);
}
@@ -79,5 +88,9 @@ int main(int argc, char ** argv)
SetupSharedFoundation::remove();
SetupSharedThread::remove();
#ifdef ENABLE_PROFILING
__llvm_profile_write_file();
#endif
return 0;
}
@@ -15,8 +15,17 @@
#include "sharedRandom/SetupSharedRandom.h"
#include "sharedThread/SetupSharedThread.h"
#ifdef ENABLE_PROFILING
extern "C" int __llvm_profile_write_file(void);
#endif
inline void signalHandler(int s){
printf("TaskManager terminating, signal %d\n",s);
#ifdef ENABLE_PROFILING
__llvm_profile_write_file();
#endif
exit(0);
}
@@ -24,7 +33,7 @@ inline void signalHandler(int s){
int main(int argc, char ** argv)
{
struct sigaction sigIntHandler;
struct sigaction sigIntHandler;
sigIntHandler.sa_handler = signalHandler;
sigemptyset(&sigIntHandler.sa_mask);
sigIntHandler.sa_flags = 0;
@@ -54,5 +63,9 @@ int main(int argc, char ** argv)
TaskManager::remove();
SetupSharedFoundation::remove();
#ifdef ENABLE_PROFILING
__llvm_profile_write_file();
#endif
return 0;
}
@@ -21,8 +21,17 @@
#include "swgSharedNetworkMessages/SetupSwgSharedNetworkMessages.h"
#include "swgServerNetworkMessages/SetupSwgServerNetworkMessages.h"
#ifdef ENABLE_PROFILING
extern "C" int __llvm_profile_write_file(void);
#endif
inline void signalHandler(int s){
printf("SwgDatabaseServer terminating, signal %d\n",s);
#ifdef ENABLE_PROFILING
__llvm_profile_write_file();
#endif
exit(0);
}
@@ -85,5 +94,9 @@ int main(int argc, char ** argv)
SetupSharedFoundation::remove();
SetupSharedThread::remove();
#ifdef ENABLE_PROFILING
__llvm_profile_write_file();
#endif
return 0;
}
@@ -34,8 +34,18 @@
#include "swgSharedNetworkMessages/SetupSwgSharedNetworkMessages.h"
#include "swgServerNetworkMessages/SetupSwgServerNetworkMessages.h"
#ifdef ENABLE_PROFILING
extern "C" int __llvm_profile_write_file(void);
#endif
inline void signalHandler(int s){
printf("LoginServer terminating, signal %d\n",s);
#ifdef ENABLE_PROFILING
__llvm_profile_write_file();
#endif
exit(0);
}
@@ -148,6 +158,10 @@ int main(int argc, char ** argv)
SetupSharedFoundation::remove();
SetupSharedThread::remove ();
#ifdef ENABLE_PROFILING
__llvm_profile_write_file();
#endif
return 0;
}