Dbg:Threading: prefix thread names with "smo:" so they group
This commit is contained in:
@@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
int main(int argc, char *argv[], char *envp[])
|
int main(int argc, char *argv[], char *envp[])
|
||||||
{
|
{
|
||||||
pthread_setname_np(pthread_self(), "CRT:main");
|
pthread_setname_np(pthread_self(), "smo:CRT:main");
|
||||||
/* We don't do anything inside of main()
|
/* We don't do anything inside of main()
|
||||||
* Main merely waits for the marionette thread to exit.
|
* Main merely waits for the marionette thread to exit.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
#include <boostAsioLinkageFix.h>
|
#include <boostAsioLinkageFix.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
#include <string>
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
#include <sched.h>
|
#include <sched.h>
|
||||||
#include <boost/asio/io_service.hpp>
|
#include <boost/asio/io_service.hpp>
|
||||||
@@ -45,7 +46,8 @@ const std::shared_ptr<ComponentThread> ComponentThread::getSelf(void)
|
|||||||
|
|
||||||
void MindThread::main(MindThread& self)
|
void MindThread::main(MindThread& self)
|
||||||
{
|
{
|
||||||
pthread_setname_np(pthread_self(), self.name.c_str());
|
std::string threadName = "smo:" + self.name;
|
||||||
|
pthread_setname_np(pthread_self(), threadName.c_str());
|
||||||
|
|
||||||
if (OptionParser::getOptions().verbose)
|
if (OptionParser::getOptions().verbose)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
#include <config.h>
|
#include <config.h>
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
#include <string>
|
||||||
#include <exception>
|
#include <exception>
|
||||||
#include <opts.h>
|
#include <opts.h>
|
||||||
#include <typeinfo>
|
#include <typeinfo>
|
||||||
@@ -66,7 +67,8 @@ void marionetteInitializeReqCb(bool success)
|
|||||||
|
|
||||||
void MarionetteThread::main(MarionetteThread& self)
|
void MarionetteThread::main(MarionetteThread& self)
|
||||||
{
|
{
|
||||||
pthread_setname_np(pthread_self(), self.name.c_str());
|
std::string threadName = "smo:" + self.name;
|
||||||
|
pthread_setname_np(pthread_self(), threadName.c_str());
|
||||||
// Wait for CRT's main() to post us the command line args.
|
// Wait for CRT's main() to post us the command line args.
|
||||||
std::cout << __func__ << ": Waiting for command line JOLT" << std::endl;
|
std::cout << __func__ << ": Waiting for command line JOLT" << std::endl;
|
||||||
self.getIoService().run();
|
self.getIoService().run();
|
||||||
|
|||||||
Reference in New Issue
Block a user