mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
CONFIG: cpu/sys information in profiling now OFF by default (issue #526)
- since the cpu/sys information is invariant, it doesn't make much sense to emit by default at every time-step.
This commit is contained in:
@ -109,9 +109,9 @@ OptimisationSwitches
|
||||
profiling
|
||||
{
|
||||
active true;
|
||||
cpuInfo true;
|
||||
cpuInfo false;
|
||||
memInfo false;
|
||||
sysInfo true;
|
||||
sysInfo false;
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
@ -357,7 +357,7 @@ void Foam::Time::setMonitoring(const bool forceProfiling)
|
||||
else if
|
||||
(
|
||||
profilingDict
|
||||
&& profilingDict->lookupOrDefault<Switch>("active", true)
|
||||
&& profilingDict->lookupOrDefault<bool>("active", true)
|
||||
)
|
||||
{
|
||||
profiling::initialize
|
||||
|
||||
@ -38,7 +38,7 @@ int Foam::profiling::allowed
|
||||
Foam::debug::infoSwitch("allowProfiling", 1)
|
||||
);
|
||||
|
||||
Foam::profiling* Foam::profiling::pool_(0);
|
||||
Foam::profiling* Foam::profiling::pool_(nullptr);
|
||||
|
||||
// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
|
||||
|
||||
@ -179,7 +179,7 @@ void Foam::profiling::stop(const Time& owner)
|
||||
if (pool_ && &owner == &(pool_->owner_))
|
||||
{
|
||||
delete pool_;
|
||||
pool_ = 0;
|
||||
pool_ = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
@ -274,18 +274,18 @@ Foam::profiling::profiling
|
||||
timers_(),
|
||||
sysInfo_
|
||||
(
|
||||
dict.lookupOrDefault<Switch>("sysInfo", true)
|
||||
? new profilingSysInfo() : 0
|
||||
dict.lookupOrDefault<bool>("sysInfo", false)
|
||||
? new profilingSysInfo() : nullptr
|
||||
),
|
||||
cpuInfo_
|
||||
(
|
||||
dict.lookupOrDefault<Switch>("cpuInfo", true)
|
||||
? new cpuInfo() : 0
|
||||
dict.lookupOrDefault<bool>("cpuInfo", false)
|
||||
? new cpuInfo() : nullptr
|
||||
),
|
||||
memInfo_
|
||||
(
|
||||
dict.lookupOrDefault<Switch>("memInfo", false)
|
||||
? new memInfo() : 0
|
||||
dict.lookupOrDefault<bool>("memInfo", false)
|
||||
? new memInfo() : nullptr
|
||||
)
|
||||
{}
|
||||
|
||||
@ -300,7 +300,7 @@ Foam::profiling::~profiling()
|
||||
|
||||
if (pool_ == this)
|
||||
{
|
||||
pool_ = 0;
|
||||
pool_ = nullptr;
|
||||
profilingInformation::nextId_ = 0;
|
||||
}
|
||||
}
|
||||
|
||||
@ -200,14 +200,14 @@ protected:
|
||||
profilingInformation* find(const string& descr, const label parentId);
|
||||
|
||||
//- Add to hashed storage,
|
||||
// returns pointer to newly stored element for chaining
|
||||
// \return pointer to newly stored element for chaining
|
||||
profilingInformation* store(profilingInformation* info);
|
||||
|
||||
//- Add to stack and set timer lookup (based on Id)
|
||||
void push(profilingInformation* info, clockTime& timer);
|
||||
|
||||
//- Remove from stack and remove timer lookup (based on Id).
|
||||
// Returns pointer to profiling information element
|
||||
// \return pointer to profiling information element
|
||||
profilingInformation* pop();
|
||||
|
||||
|
||||
|
||||
@ -150,11 +150,7 @@ Foam::Ostream& Foam::profilingInformation::write
|
||||
|
||||
// * * * * * * * * * * * * * * * Friend Operators * * * * * * * * * * * * * //
|
||||
|
||||
Foam::Ostream& Foam::operator<<
|
||||
(
|
||||
Ostream& os,
|
||||
const profilingInformation& info
|
||||
)
|
||||
Foam::Ostream& Foam::operator<<(Ostream& os, const profilingInformation& info)
|
||||
{
|
||||
return info.write(os);
|
||||
}
|
||||
|
||||
@ -68,7 +68,7 @@ void Foam::profilingTrigger::stop()
|
||||
profiling::unstack(ptr_);
|
||||
// pointer is managed by pool storage -> thus no delete here
|
||||
}
|
||||
ptr_ = 0;
|
||||
ptr_ = nullptr;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user