From: Kshitij Bansal Date: Tue, 1 Jul 2014 18:27:50 +0000 (-0400) Subject: chat about thread creation X-Git-Tag: cvc5-1.0.0~6700^2~2 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=99cae2a7cac2019d432a01c07f94faac370abdda;p=cvc5.git chat about thread creation --- diff --git a/src/main/portfolio.cpp b/src/main/portfolio.cpp index b6b2ac348..8bfbeff7c 100644 --- a/src/main/portfolio.cpp +++ b/src/main/portfolio.cpp @@ -20,6 +20,7 @@ #include #include "smt/smt_engine.h" +#include "util/output.h" #include "util/result.h" #include "util/statistics_registry.h" #include "options/options.h" @@ -79,14 +80,15 @@ std::pair runPortfolio(int numThreads, threads[t] = boost::thread(attrs, boost::bind(runThread, t, threadFns[t], boost::ref(threads_returnValue[t]) ) ); - /* - void *stackaddr; - size_t stacksize; - pthread_attr_t attr; - pthread_getattr_np(threads[t].native_handle(), &attr); - pthread_attr_getstack(&attr, &stackaddr, &stacksize); - std::cerr << "I am " << t << " with stack size " << stacksize << std::endl; - */ + + if(Chat.isOn()) { + void *stackaddr; + size_t stacksize; + pthread_attr_t attr; + pthread_getattr_np(threads[t].native_handle(), &attr); + pthread_attr_getstack(&attr, &stackaddr, &stacksize); + Chat() << "Created worker thread " << t << " with stack size " << stacksize << std::endl; + } } if(not driverFn.empty())