Code profiling. More...
Public Types | |
typedef profilingInformation | Information |
typedef profilingTrigger | Trigger |
![]() | |
enum | objectState : char { GOOD, BAD } |
enum | readOption : char { MUST_READ, MUST_READ_IF_MODIFIED, READ_IF_PRESENT, NO_READ } |
enum | writeOption : char { AUTO_WRITE = 0, NO_WRITE = 1 } |
enum | fileCheckTypes : char { timeStamp, timeStampMaster, inotify, inotifyMaster } |
![]() | |
typedef Searcher< true > | const_searcher |
typedef Searcher< false > | searcher |
Public Member Functions | |
~profiling () | |
const Time & | owner () const |
label | size () const noexcept |
virtual bool | writeData (Ostream &os) const |
virtual bool | writeObject (IOstreamOption, const bool valid) const |
![]() | |
IOdictionary (const IOobject &io, const dictionary *fallback=nullptr) | |
IOdictionary (const IOobject &io, const dictionary &dict) | |
IOdictionary (const IOobject &io, const word &wantedType, const dictionary *fallback=nullptr) | |
IOdictionary (const IOobject &io, Istream &is) | |
virtual | ~IOdictionary ()=default |
virtual bool | global () const |
virtual fileName | filePath () const |
![]() | |
TypeName ("dictionary") | |
baseIOdictionary (const baseIOdictionary &)=default | |
baseIOdictionary (baseIOdictionary &&)=default | |
virtual | ~baseIOdictionary ()=default |
baseIOdictionary (const IOobject &io, const dictionary *fallback=nullptr) | |
baseIOdictionary (const IOobject &io, const dictionary &dict) | |
baseIOdictionary (const IOobject &io, Istream &is) | |
const word & | name () const |
virtual bool | readData (Istream &) |
void | operator= (const baseIOdictionary &rhs) |
void | operator= (const dictionary &rhs) |
![]() | |
TypeName ("regIOobject") | |
regIOobject (const IOobject &io, const bool isTimeObject=false) | |
regIOobject (const regIOobject &rio) | |
regIOobject (const regIOobject &rio, bool registerCopy) | |
regIOobject (const word &newName, const regIOobject &, bool registerCopy) | |
regIOobject (const IOobject &io, const regIOobject &rio) | |
virtual | ~regIOobject () |
bool | checkIn () |
bool | checkOut () |
virtual void | addWatch () |
bool | ownedByRegistry () const |
bool | store () |
void | release (const bool unregister=false) |
label | eventNo () const |
label & | eventNo () |
bool | upToDate (const regIOobject &) const |
bool | upToDate (const regIOobject &, const regIOobject &) const |
bool | upToDate (const regIOobject &, const regIOobject &, const regIOobject &) const |
bool | upToDate (const regIOobject &, const regIOobject &, const regIOobject &, const regIOobject &) const |
void | setUpToDate () |
virtual void | rename (const word &newName) |
const dictionary * | findMetaData () const noexcept |
dictionary & | getMetaData () noexcept |
void | removeMetaData () |
virtual void | updateMetaData () |
bool | headerOk () |
Istream & | readStream (const word &, const bool valid=true) |
void | close () |
virtual bool | read () |
virtual label | addWatch (const fileName &) |
const labelList & | watchIndices () const |
labelList & | watchIndices () |
virtual bool | modified () const |
virtual bool | readIfModified () |
virtual bool | write (const bool valid=true) const |
void | operator= (const IOobject &io) |
virtual bool | writeObject (IOstreamOption::streamFormat fmt, IOstreamOption::versionNumber ver, IOstreamOption::compressionType comp, const bool valid) const |
![]() | |
TypeName ("IOobject") | |
IOobject (const IOobject &)=default | |
virtual | ~IOobject ()=default |
IOobject (const word &name, const fileName &instance, const objectRegistry ®istry, readOption r=NO_READ, writeOption w=NO_WRITE, bool registerObject=true, bool globalObject=false) | |
IOobject (const word &name, const fileName &instance, const fileName &local, const objectRegistry ®istry, readOption r=NO_READ, writeOption w=NO_WRITE, bool registerObject=true, bool globalObject=false) | |
IOobject (const fileName &path, const objectRegistry ®istry, readOption r=NO_READ, writeOption w=NO_WRITE, bool registerObject=true, bool globalObject=false) | |
IOobject (const IOobject &io, const objectRegistry ®istry) | |
IOobject (const IOobject &io, const word &name) | |
IOobject (const IOobject &io, readOption, writeOption) | |
autoPtr< IOobject > | clone () const |
autoPtr< IOobject > | clone (const objectRegistry ®istry) const |
const objectRegistry & | db () const noexcept |
const Time & | time () const |
const word & | name () const noexcept |
const word & | headerClassName () const noexcept |
word & | headerClassName () noexcept |
const string & | note () const noexcept |
string & | note () noexcept |
bool | registerObject () const noexcept |
bool | registerObject (bool on) noexcept |
bool | globalObject () const noexcept |
bool | globalObject (bool on) noexcept |
unsigned | labelByteSize () const noexcept |
unsigned | scalarByteSize () const noexcept |
bool | isHeaderClassName (const word &clsName) const |
template<class Type > | |
bool | isHeaderClassName () const |
readOption | readOpt () const noexcept |
readOption | readOpt (readOption opt) noexcept |
writeOption | writeOpt () const noexcept |
writeOption | writeOpt (writeOption opt) noexcept |
word | group () const |
word | member () const |
const fileName & | rootPath () const |
const fileName & | caseName () const |
const fileName & | instance () const noexcept |
fileName & | instance () noexcept |
const fileName & | local () const noexcept |
fileName | path () const |
fileName | path (const word &instance, const fileName &local=fileName::null) const |
fileName | objectPath () const |
fileName | objectRelPath () const |
fileName | localFilePath (const word &typeName, const bool search=true) const |
fileName | globalFilePath (const word &typeName, const bool search=true) const |
IOstreamOption | parseHeader (const dictionary &headerDict) |
bool | readHeader (Istream &is) |
bool | readHeader (dictionary &headerDict, Istream &is) |
template<class Type > | |
bool | typeHeaderOk (const bool checkType=true, const bool search=true, const bool verbose=true) |
template<class Type > | |
void | warnNoRereading () const |
bool | writeHeader (Ostream &os) const |
bool | writeHeader (Ostream &os, const word &objectType) const |
void | writeHeader (dictionary &dict, IOstreamOption streamOpt) const |
void | writeHeader (dictionary &dict, const word &objectType, IOstreamOption streamOpt) const |
bool | good () const noexcept |
bool | bad () const noexcept |
InfoProxy< IOobject > | info () const |
void | operator= (const IOobject &io) |
readOption & | readOpt () noexcept |
writeOption & | writeOpt () noexcept |
bool & | registerObject () noexcept |
bool & | globalObject () noexcept |
template<> | |
bool | isHeaderClassName () const |
template<class StringType > | |
Foam::word | groupName (StringType base, const word &group) |
![]() | |
ClassName ("dictionary") | |
dictionary () | |
dictionary (const fileName &name) | |
dictionary (const fileName &name, const dictionary &parentDict, Istream &is, bool keepHeader=false) | |
dictionary (Istream &is) | |
dictionary (Istream &is, bool keepHeader) | |
dictionary (const dictionary &parentDict, const dictionary &dict) | |
dictionary (const dictionary &dict) | |
dictionary (const dictionary *dict) | |
dictionary (const dictionary &parentDict, dictionary &&dict) | |
dictionary (dictionary &&dict) | |
autoPtr< dictionary > | clone () const |
virtual | ~dictionary () |
const fileName & | name () const noexcept |
fileName & | name () noexcept |
word | dictName () const |
fileName | relativeName (const bool caseTag=false) const |
bool | isNullDict () const noexcept |
const dictionary & | parent () const noexcept |
const dictionary & | topDict () const |
label | startLineNumber () const |
label | endLineNumber () const |
SHA1Digest | digest () const |
tokenList | tokens () const |
bool | found (const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const |
entry * | findEntry (const word &keyword, enum keyType::option matchOpt=keyType::REGEX) |
const entry * | findEntry (const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const |
const entry * | findScoped (const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const |
dictionary * | findDict (const word &keyword, enum keyType::option matchOpt=keyType::REGEX) |
const dictionary * | findDict (const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const |
const entry & | lookupEntry (const word &keyword, enum keyType::option matchOpt) const |
ITstream & | lookup (const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const |
template<class T > | |
T | get (const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const |
template<class T > | |
T | getOrDefault (const word &keyword, const T &deflt, enum keyType::option matchOpt=keyType::REGEX) const |
template<class T > | |
T | getOrAdd (const word &keyword, const T &deflt, enum keyType::option matchOpt=keyType::REGEX) |
template<class T > | |
bool | readEntry (const word &keyword, T &val, enum keyType::option matchOpt=keyType::REGEX, bool mandatory=true) const |
template<class T > | |
bool | readIfPresent (const word &keyword, T &val, enum keyType::option matchOpt=keyType::REGEX) const |
template<class T , class Predicate > | |
T | getCheck (const word &keyword, const Predicate &pred, enum keyType::option matchOpt=keyType::REGEX) const |
template<class T , class Predicate > | |
T | getCheckOrDefault (const word &keyword, const T &deflt, const Predicate &pred, enum keyType::option matchOpt=keyType::REGEX) const |
template<class T , class Predicate > | |
T | getCheckOrAdd (const word &keyword, const T &deflt, const Predicate &pred, enum keyType::option matchOpt=keyType::REGEX) |
template<class T , class Predicate > | |
bool | readCheck (const word &keyword, T &val, const Predicate &pred, enum keyType::option matchOpt=keyType::REGEX, bool mandatory=true) const |
template<class T , class Predicate > | |
bool | readCheckIfPresent (const word &keyword, T &val, const Predicate &pred, enum keyType::option matchOpt=keyType::REGEX) const |
bool | isDict (const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const |
const dictionary & | subDict (const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const |
dictionary & | subDict (const word &keyword, enum keyType::option matchOpt=keyType::REGEX) |
dictionary & | subDictOrAdd (const word &keyword, enum keyType::option matchOpt=keyType::REGEX) |
dictionary | subOrEmptyDict (const word &keyword, enum keyType::option matchOpt=keyType::REGEX, const bool mandatory=false) const |
const dictionary & | optionalSubDict (const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const |
wordList | toc () const |
wordList | sortedToc () const |
template<class Compare > | |
wordList | sortedToc (const Compare &comp) const |
List< keyType > | keys (bool patterns=false) const |
bool | substituteKeyword (const word &keyword, bool mergeEntry=false) |
bool | substituteScopedKeyword (const word &keyword, bool mergeEntry=false) |
entry * | add (entry *entryPtr, bool mergeEntry=false) |
entry * | add (const entry &e, bool mergeEntry=false) |
entry * | add (const keyType &k, const word &v, bool overwrite=false) |
entry * | add (const keyType &k, const string &v, bool overwrite=false) |
entry * | add (const keyType &k, const label v, bool overwrite=false) |
entry * | add (const keyType &k, const scalar v, bool overwrite=false) |
entry * | add (const keyType &k, const dictionary &d, bool mergeEntry=false) |
template<class T > | |
entry * | add (const keyType &k, const T &v, bool overwrite=false) |
entry * | set (entry *entryPtr) |
entry * | set (const entry &e) |
entry * | set (const keyType &k, const dictionary &v) |
template<class T > | |
entry * | set (const keyType &k, const T &v) |
bool | remove (const word &keyword) |
bool | changeKeyword (const keyType &oldKeyword, const keyType &newKeyword, bool overwrite=false) |
bool | merge (const dictionary &dict) |
void | clear () |
void | transfer (dictionary &dict) |
void | checkITstream (const ITstream &is, const word &keyword) const |
bool | read (Istream &is) |
bool | read (Istream &is, bool keepHeader) |
void | writeEntry (Ostream &os) const |
void | writeEntry (const keyType &keyword, Ostream &os) const |
void | writeEntries (Ostream &os, const bool extraNewLine=false) const |
void | write (Ostream &os, const bool subDict=true) const |
const_searcher | csearch (const word &keyword, enum keyType::option=keyType::REGEX) const |
const_searcher | search (const word &keyword, enum keyType::option=keyType::REGEX) const |
searcher | search (const word &keyword, enum keyType::option=keyType::REGEX) |
const_searcher | csearchScoped (const word &keyword, enum keyType::option) const |
const_searcher | searchScoped (const word &keyword, enum keyType::option) const |
searcher | searchScoped (const word &keyword, enum keyType::option) |
const dictionary * | cfindScopedDict (const fileName &dictPath) const |
const dictionary * | findScopedDict (const fileName &dictPath) const |
dictionary * | findScopedDict (const fileName &dictPath) |
dictionary * | makeScopedDict (const fileName &dictPath) |
const_searcher | csearchCompat (const word &keyword, std::initializer_list< std::pair< const char *, int >> compat, enum keyType::option=keyType::REGEX) const |
bool | foundCompat (const word &keyword, std::initializer_list< std::pair< const char *, int >> compat, enum keyType::option=keyType::REGEX) const |
const entry * | findCompat (const word &keyword, std::initializer_list< std::pair< const char *, int >> compat, enum keyType::option) const |
const entry & | lookupEntryCompat (const word &keyword, std::initializer_list< std::pair< const char *, int >> compat, enum keyType::option) const |
ITstream & | lookupCompat (const word &keyword, std::initializer_list< std::pair< const char *, int >> compat, enum keyType::option=keyType::REGEX) const |
template<class T > | |
T | getCompat (const word &keyword, std::initializer_list< std::pair< const char *, int >> compat, enum keyType::option=keyType::REGEX) const |
template<class T > | |
T | getOrDefaultCompat (const word &keyword, std::initializer_list< std::pair< const char *, int >> compat, const T &deflt, enum keyType::option=keyType::REGEX) const |
template<class T > | |
bool | readCompat (const word &keyword, std::initializer_list< std::pair< const char *, int >> compat, T &val, enum keyType::option=keyType::REGEX, bool mandatory=true) const |
template<class T > | |
bool | readIfPresentCompat (const word &keyword, std::initializer_list< std::pair< const char *, int >> compat, T &val, enum keyType::option=keyType::REGEX) const |
void | operator= (const dictionary &rhs) |
void | operator+= (const dictionary &rhs) |
void | operator|= (const dictionary &rhs) |
void | operator<<= (const dictionary &rhs) |
template<class T > | |
T | lookupOrDefault (const word &keyword, const T &deflt, enum keyType::option matchOpt=keyType::REGEX) const |
template<class T > | |
T | lookupOrAddDefault (const word &keyword, const T &deflt, enum keyType::option matchOpt=keyType::REGEX) |
template<class T > | |
T | lookupOrDefaultCompat (const word &keyword, std::initializer_list< std::pair< const char *, int >> compat, const T &deflt, enum keyType::option matchOpt=keyType::REGEX) const |
ITstream & | operator[] (const word &keyword) const |
bool | found (const word &keyword, bool recursive, bool patternMatch=true) const |
entry * | lookupEntryPtr (const word &keyword, bool recursive, bool patternMatch) |
const entry * | lookupEntryPtr (const word &keyword, bool recursive, bool patternMatch) const |
const entry * | lookupScopedEntryPtr (const word &keyword, bool recursive, bool patternMatch) const |
const dictionary * | subDictPtr (const word &keyword) const |
dictionary * | subDictPtr (const word &keyword) |
const entry & | lookupEntry (const word &keyword, bool recursive, bool patternMatch) const |
ITstream & | lookup (const word &keyword, bool recursive, bool patternMatch=true) const |
template<class T > | |
T | lookupOrDefault (const word &keyword, const T &deflt, bool recursive, bool patternMatch=true) const |
template<class T > | |
T | lookupOrAddDefault (const word &keyword, const T &deflt, bool recursive, bool patternMatch=true) |
template<class T > | |
bool | readIfPresent (const word &keyword, T &val, bool recursive, bool patternMatch=true) const |
template<class T > | |
T | lookupType (const word &keyword, bool recursive=false, bool patternMatch=true) const |
bool | getBool (const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const |
Same as get< bool >(const word&, keyType::option) More... | |
label | getLabel (const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const |
Same as get< label >(const word&, keyType::option) More... | |
scalar | getScalar (const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const |
Same as get< scalar >(const word&, keyType::option) More... | |
string | getString (const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const |
Same as get< string >(const word&, keyType::option) More... | |
word | getWord (const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const |
Same as get< word >(const word&, keyType::option) More... | |
fileName | getFileName (const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const |
Same as get< fileName >(const word&, keyType::option) More... | |
template<class Compare > | |
Foam::wordList | sortedToc (const Compare &comp) const |
template<class T > | |
Foam::entry * | add (const keyType &k, const T &v, bool overwrite) |
template<class T > | |
Foam::entry * | set (const keyType &k, const T &v) |
![]() | |
ILList ()=default | |
ILList (T *item) | |
ILList (Istream &is) | |
ILList (const ILList< LListBase, T > &lst) | |
ILList (ILList< LListBase, T > &&lst) | |
template<class CloneArg > | |
ILList (const ILList< LListBase, T > &lst, const CloneArg &cloneArg) | |
template<class INew > | |
ILList (Istream &is, const INew &inew) | |
~ILList () | |
bool | eraseHead () |
bool | erase (T *item) |
void | clear () |
void | transfer (ILList< LListBase, T > &lst) |
void | operator= (const ILList< LListBase, T > &lst) |
void | operator= (ILList< LListBase, T > &&lst) |
Static Public Member Functions | |
static bool | active () |
static void | disable () |
static bool | print (Ostream &os) |
static bool | writeNow () |
![]() | |
template<class Type > | |
static Type & | store (Type *p) |
template<class Type > | |
static Type & | store (autoPtr< Type > &ptr) |
template<class Type > | |
static Type & | store (autoPtr< Type > &&ptr) |
template<class Type > | |
static Type & | store (refPtr< Type > &ptr) |
template<class Type > | |
static Type & | store (refPtr< Type > &&ptr) |
template<class Type > | |
static Type & | store (tmp< Type > &ptr) |
template<class Type > | |
static Type & | store (tmp< Type > &&ptr) |
![]() | |
static bool | bannerEnabled () noexcept |
static bool | bannerEnabled (bool on) noexcept |
static bool | fileNameComponents (const fileName &path, fileName &instance, fileName &local, word &name) |
template<class StringType > | |
static word | groupName (StringType base, const word &group) |
static word | group (const word &name) |
static word | member (const word &name) |
static word | scopedName (const std::string &scope, const word &name) |
static IOobject | selectIO (const IOobject &io, const fileName &altFile, const word &ioName="") |
static Ostream & | writeBanner (Ostream &os, const bool noSyntaxHint=false) |
static Ostream & | writeDivider (Ostream &os) |
static Ostream & | writeEndDivider (Ostream &os) |
![]() | |
static int | reportOptional () noexcept |
static int | reportOptional (const int level) noexcept |
static autoPtr< dictionary > | New (Istream &is) |
Static Public Attributes | |
static int | allowed |
![]() | |
static const Enum< fileCheckTypes > | fileCheckTypesNames |
static char | scopeSeparator |
static fileCheckTypes | fileModificationChecking |
static float | fileModificationSkew |
static int | maxFileModificationPolls |
![]() | |
static int | writeOptionalEntries |
static const dictionary | null |
static refPtr< OSstream > | reportingOutput |
Protected Member Functions | |
profiling (const IOobject &io, const Time &owner, const bool allEnabled=true) | |
profiling (const dictionary &dict, const IOobject &io, const Time &owner) | |
Information * | create () |
Information * | create (Information *parent, const string &descr) |
void | beginTimer (Information *info) |
Information * | endTimer () |
![]() | |
bool | readHeaderOk (const IOstreamOption::streamFormat fmt, const word &typeName) |
![]() | |
void | setBad (const string &s) |
Static Protected Member Functions | |
static void | initialize (const IOobject &ioObj, const Time &owner) |
static void | initialize (const dictionary &dict, const IOobject &ioObj, const Time &owner) |
static void | stop (const Time &owner) |
static profilingInformation * | New (const string &descr) |
static void | unstack (const profilingInformation *info) |
![]() | |
static void | writeHeaderContent (Ostream &os, const IOobject &io, const word &objectType, const dictionary *metaDataDict=nullptr) |
static void | writeHeaderContent (dictionary &dict, const IOobject &io, const word &objectType, IOstreamOption streamOpt, const dictionary *metaDataDict=nullptr) |
Friends | |
class | profilingTrigger |
class | Time |
Additional Inherited Members | |
![]() | |
friend | const_searcher |
friend | searcher |
![]() | |
static bool | masterOnlyReading = false |
Code profiling.
This is typically activated from within system/controlDict as follows (defaults shown):
or simply using all defaults:
Definition at line 78 of file profiling.H.
typedef profilingInformation Information |
Definition at line 86 of file profiling.H.
typedef profilingTrigger Trigger |
Definition at line 87 of file profiling.H.
Definition at line 223 of file profiling.C.
References Foam::BitSetOps::create(), DetailInfo, and Foam::nl.
|
protected |
Definition at line 254 of file profiling.C.
References dict, and dictionary::getOrDefault().
~profiling | ( | ) |
Definition at line 279 of file profiling.C.
|
protected |
Definition at line 37 of file profiling.C.
References IOobject::info().
|
protected |
Definition at line 56 of file profiling.C.
References profilingInformation::id().
|
protected |
Definition at line 82 of file profiling.C.
References clockValue::now(), and profilingInformation::setActive().
|
protected |
Definition at line 90 of file profiling.C.
References clockValue::elapsed(), profilingInformation::setActive(), and profilingInformation::update().
Definition at line 139 of file profiling.C.
Referenced by Time::setMonitoring().
|
staticprotected |
Definition at line 152 of file profiling.C.
References dict.
|
staticprotected |
Definition at line 165 of file profiling.C.
Referenced by Time::~Time().
|
staticprotected |
Definition at line 174 of file profiling.C.
References Foam::max().
|
staticprotected |
Definition at line 199 of file profiling.C.
References Foam::abort(), profilingInformation::description(), Foam::endl(), Foam::FatalError, FatalErrorInFunction, profilingInformation::id(), and Foam::nl.
Referenced by profilingTrigger::stop().
|
static |
Definition at line 104 of file profiling.C.
Referenced by Time::run().
|
static |
Definition at line 110 of file profiling.C.
Definition at line 116 of file profiling.C.
References os().
|
static |
Definition at line 127 of file profiling.C.
const Foam::Time & owner | ( | ) | const |
Definition at line 290 of file profiling.C.
|
noexcept |
Definition at line 296 of file profiling.C.
Reimplemented from baseIOdictionary.
Definition at line 302 of file profiling.C.
References Ostream::beginBlock(), Ostream::endBlock(), IOstream::good(), Foam::nl, clockValue::now(), os(), DynamicList::resize(), Ostream::write(), and Ostream::writeEntry().
|
virtual |
Reimplemented from regIOobject.
Definition at line 378 of file profiling.C.
References IOstreamOption::ASCII, and regIOobject::writeObject().
|
friend |
Definition at line 148 of file profiling.H.
|
friend |
Definition at line 149 of file profiling.H.
|
static |
Definition at line 93 of file profiling.H.
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.