openthread: silence some log output
This commit is contained in:
parent
56cbef8428
commit
b843fb19fc
@ -112,8 +112,7 @@ namespace OpenThreads
|
||||
#if defined(HAVE_PTHREAD_SETAFFINITY_NP) || defined(HAVE_THREE_PARAM_SCHED_SETAFFINITY) || defined(HAVE_TWO_PARAM_SCHED_SETAFFINITY)
|
||||
static void setAffinity(const Affinity& affinity)
|
||||
{
|
||||
|
||||
std::cout<<"setProcessAffinity : "<< affinity.activeCPUs.size() <<std::endl;
|
||||
//std::cout<<"setProcessAffinity : "<< affinity.activeCPUs.size() <<std::endl;
|
||||
cpu_set_t cpumask;
|
||||
CPU_ZERO( &cpumask );
|
||||
unsigned int numprocessors = OpenThreads::GetNumberOfProcessors();
|
||||
@ -125,7 +124,7 @@ static void setAffinity(const Affinity& affinity)
|
||||
{
|
||||
if (*itr<numprocessors)
|
||||
{
|
||||
std::cout<<" setting CPU : "<< *itr<<std::endl;
|
||||
//std::cout<<" setting CPU : "<< *itr<<std::endl;
|
||||
CPU_SET( *itr, &cpumask );
|
||||
}
|
||||
}
|
||||
@ -137,7 +136,7 @@ static void setAffinity(const Affinity& affinity)
|
||||
// We need to explicitly set it to all CPUs, if no affinity was specified.
|
||||
for (unsigned int i = 0; i < numprocessors; ++i)
|
||||
{
|
||||
std::cout<<" Fallback setting CPU : "<< i<<std::endl;
|
||||
//std::cout<<" Fallback setting CPU : "<< i<<std::endl;
|
||||
|
||||
CPU_SET( i, &cpumask );
|
||||
}
|
||||
|
@ -570,7 +570,7 @@ size_t Thread::getStackSize() {
|
||||
static int SetThreadAffinity(HANDLE tid, const Affinity& affinity)
|
||||
{
|
||||
unsigned int numprocessors = OpenThreads::GetNumberOfProcessors();
|
||||
std::cout << "SetThreadAffinity() : affinity.activeCPUs.size()=" << affinity.activeCPUs.size() << ", numprocessors=" << numprocessors << std::endl;
|
||||
//std::cout << "SetThreadAffinity() : affinity.activeCPUs.size()=" << affinity.activeCPUs.size() << ", numprocessors=" << numprocessors << std::endl;
|
||||
|
||||
DWORD_PTR affinityMask = 0x0;
|
||||
DWORD_PTR maskBit = 0x1;
|
||||
@ -586,7 +586,7 @@ static int SetThreadAffinity(HANDLE tid, const Affinity& affinity)
|
||||
affinityMask |= (maskBit << cpunum);
|
||||
}
|
||||
}
|
||||
std::cout << " Setting affinityMask : 0x" << std::hex << affinityMask << std::dec << std::endl;
|
||||
//std::cout << " Setting affinityMask : 0x" << std::hex << affinityMask << std::dec << std::endl;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -595,7 +595,7 @@ static int SetThreadAffinity(HANDLE tid, const Affinity& affinity)
|
||||
|
||||
affinityMask |= (maskBit << cpunum);
|
||||
}
|
||||
std::cout << " Fallback setting affinityMask : 0x" << std::hex << affinityMask << std::dec << std::endl;
|
||||
//std::cout << " Fallback setting affinityMask : 0x" << std::hex << affinityMask << std::dec << std::endl;
|
||||
}
|
||||
|
||||
DWORD_PTR res = SetThreadAffinityMask ( tid, affinityMask );
|
||||
|
Loading…
Reference in New Issue
Block a user